Difference between revisions of "Installation:Windows"

From GeopsyWiki
Jump to navigation Jump to search
 
(52 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
 
   geopsy -clear-tools
 
   geopsy -clear-tools
   dinver -clar-plugins
+
   dinver -clear-plugins
  
 
== Source package ==
 
== Source package ==
  
Compiling from the source package may be an option if the binary package is not yet available. It takes a bit longer and requires several steps. Once a build environment is ready updates are relatively straight forward. Getting [[#Git | Git]], [[#Qt | Qt]] and compiling [[#FFTW | FFTW]] are required only once. When updating from a previous Geopsy release you can skip these steps and go directly to [[#Geopsy package | Geopsy package]]. As a general comment, do not move directories after their installation, prefer a new installation instead.
+
Compiling from the source package may be an option if the binary package is not yet available. It takes a bit longer and requires several steps. Once a build environment is ready, updates are relatively straight forward. Getting [[#Git | Git]], [[#Qt | Qt]] and compiling [[#Lapack | Lapack]] and [[#FFTW | FFTW]] are required only once. When updating from a previous Geopsy release you can skip these steps and go directly to [[#Geopsy package | Geopsy package]]. As a general comment, do not move directories after their installation, prefer a new installation instead.
  
'''This tutorial is under construction, use it at your own risks!'''
 
 
=== Git ===
 
=== Git ===
  
[https://git-scm.com/download/win Git] is a widely used version control tool, required to access the ''geopsy''  and ''Qt'' main repositories. The binary package for Windows comes with a [https://www.gnu.org/software/bash bash] terminal which is used here also for compilation.
+
[https://git-scm.com/download/win Git] is a widely used version control tool, required to access the ''geopsy'' main repository. The binary package for Windows comes with a [https://www.gnu.org/software/bash bash] terminal which will be used for compilation.
  
 
Download the 64-bit standalone installer (version 2.39.1 at the time of writing this tutorial). Start the installer and follow the instructions. Default options are fine except a few detailed hereinafter. Among default options:
 
Download the 64-bit standalone installer (version 2.39.1 at the time of writing this tutorial). Start the installer and follow the instructions. Default options are fine except a few detailed hereinafter. Among default options:
Line 36: Line 35:
 
   * Select "Checkout as-is, commit Unix-style line endings" for line ending conversions
 
   * Select "Checkout as-is, commit Unix-style line endings" for line ending conversions
  
=== Mingw-w64 ===
+
=== Qt ===
 +
 
 +
[http://www.qt.io Qt] libraries and development tools must be available. Only ''Qt'' releases posterior or equal to 5.15.2 are supported. To test if ''Qt'' is already installed, start 'Git Bash' terminal from 'Microsoft Windows' main menu and type:
 +
 
 +
  $ qmake -version
 +
  #  QMake version 3.1
 +
  #  Using Qt version 5.15.2 in Z:/Qt/6.5.2/6.5.2/mingw_64/lib
 +
  $ lupdate -version
 +
  #  lupdate version 6.5.2
 +
 
 +
If Qt 5.15.2 (or a more recent version) is installed, you can jump directly to [[#Lapack|Lapack]]. If not you must first install ''Qt''.
  
[https://www.mingw-w64.org Mingw-w64] provides GNU C++ compiler for Windows. Download [https://github.com/skeeto/w64devkit w64devkit]. This tutorial is based on [https://github.com/skeeto/w64devkit/releases/download/v1.17.0/w64devkit-1.17.0.zip w64devkit-1.17.0] but another more recent release might also work. Extract the archive to
+
[[Installing Qt binary packages]] provides the detailed steps to install ''Qt''. In this tutorial, we choose to install ''Qt'' in 'Z:/Qt/6.5.2', at least 63 Gb are required during the installation. Once installed the package weights around 56 Gb.
  C:\geopsy\Mingw-w64
 
and start
 
  C:\geopsy\Mingw-w64\w64devkit.exe
 
to have a ''sh'' terminal with GNU compiler.
 
  
=== Qt ===
+
In ''Git Bash'' terminal, configure the PATH to Qt executables:
 +
  $ echo "export PATH=/z/Qt/6.5.2/6.5.2/mingw_64/bin:/z/Qt/6.5.2/Tools/mingw1120_64/bin:\$PATH" >> ~/.profile
 +
  $ source ~/.profile
 +
  $ cd /c/geopsy
 +
  $ qmake -v
 +
  QMake version 3.1
 +
  Using Qt version 6.5.2 in Z:/Qt/6.5.2/6.5.2/mingw_64/lib
 +
  $ lupdate -version
 +
  lupdate version 6.5.2
 +
  $ g++ --version
 +
'mingw32-make' must be renamed to simply 'make' in '/z/Qt/6.5.2/Tools/mingw1120_64/bin'
 +
  $ cd /z/Qt/6.5.2/Tools/mingw1120_64/bin
 +
  $ mv mingw32-make.exe make.exe
 +
 
 +
=== Python ===
 +
 
 +
[https://www.python.org Python] is required for the last step of [[#Lapack|Lapack]] installation. Optionally, ''geopsypack'' can be compiled with Python: several [[Python_interface|Python modules]] are currently available. So there are good reasons to install Python now, if it is not yet installed.
 +
 
 +
[https://www.python.org/download/windows Window installer (64-bit) for release 3.11.5] is chosen in this tutorial. Select custom installation and install to
 +
  /c/geopsy/python
 +
 
 +
=== Lapack ===
 +
 
 +
[https://netlib.org/lapack Linear Algebra PACKage]
 +
 
 +
Download the latest release source archive (currently, [https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.11.0.tar.gz lapack-3.11.0.tar.gz]).
 +
 
 +
  cd /c/geopsy
 +
  mkdir lapack
 +
  cd lapack
 +
  tar xvfz ~/Downloads/lapack-3.11.0.tar.gz
 +
  cd lapack-3.11.0
 +
  cp make.inc.examples make.inc
 +
 
 +
Edit 'make.inc' at line 27 (source [https://github.com/Reference-LAPACK/lapack/issues/890] failed tests issue)
 +
 
 +
  LDFLAGS =-Wl,--stack=8388608
 +
 
 +
The last testing steps of Lapack require [[#Pythpn|Python]]. Edit 'lapack_testing.py' and replace the first line by
 +
  #!/c/geopsy/python/python
 +
 
 +
It is now ready to build
 +
  make -j 4
 +
 
 +
''geopsypack'' expect Blas library to be named ''libblas.a'', hence rename it
 +
  cp librefblas.a libblas.a
 +
 
 +
=== FFTW ===
 +
 
 +
[http://www.fftw.org Fastest Fourier Transform of the West].
  
This is an interface library that provides portability to virtually all platforms. A binary package for Microsoft Windows can be downloaded from [https://www.qt.io Qt]. Go to "Download. Try". Under "Downloads for open source use", click on "Go open source". Go to the bottom of the page and click on "Download the Qt Online Installer". Click on "Download" button.
+
FFTW >= 3.0.1 is required. Version 3.3.10 has been successfully tested.
  
A Qt exe file should be available in your Download directory. Launch "qt-unified-windows-x64-...-online". A Qt account is required to proceed with the installation. A new one can created within the installer. Once logged in, accept the Qt Open Source Usage Obligations.
+
Download the archive from [http://www.fftw.org/fftw-3.3.10.tar.gz FFTW].
  
By default Qt is installed in "~/Qt" but other locations can be chosen. This tutorial assumes that Qt is installed in "~/Geopsy/Qt-5.14". Qt provide a lot of components, to get the minimal footprint, select only one Qt version and inside this version, only "macOS" (Qt 5.14.2 for this tutorial). After the license agreement, the installation should start. Do not launch Qt Creator at the end.
+
Unpack it
  
In a terminal, add Qt path to your profile:
+
  cd /c/geopsy
 +
  mkdir fftw
 +
  cd fftw
 +
  tar xvfz ~/Downloads/fftw-3.3.10.tar.gz
 +
  cd fftw-3.3.10
  
  echo "export PATH=~/Geopsy/Qt-5.14/5.14.2/clang_64/bin:\$PATH" >> ~/.zshrc
+
Configure FFTW:
  
Update your current environment:
+
  ./configure
  
  source ~/.zshrc
+
Build FFTW:
  
qmake should be available:
+
  make -j 4
  
  qmake -v
+
=== geopsypack ===
  
  QMake version 3.1
+
If you want the very latest updates you can access directly our Git repository. If you prefer a more stable release go to [[#Download|Download]] section.
  Using Qt version 5.14.2 in /Users/wathelem/Geopsy/Qt-5.14/5.14.2/clang_64/lib
+
Be careful that compilation may fail. To know if the build has a chance to complete successfully, first have a look at [http://www.geopsy.org/download/nextrelease.php NextRelease]. If there is a complete green bar in front of ''src-testing-*'', you will probably get to the end of the build without error. If it is not completely green, come back later or contact the developers.
  
To run Qt graphical applications some files must be copied to a specific system path.
+
Download ''geopsypack'' from Git repository and install. Note that we recommend to build in a separate directory from the sources which is not located inside the source tree. Eventually replace 3.5 by the desired branch. The branch name is composed of the first two numbers of the version number. For instance, version 3.5.0 is built from branch 3.5 .
  
   sudo mkdir -p /Library/Geopsy.org/${GEOPSY_BRANCH}/plugins
+
   $ cd /c/geopsy
   cd ~/Geopsy/Qt-5.14/5.14.2/clang_64/plugins
+
  $ mkdir src
   sudo cp -r platforms imageformats  /Library/Geopsy.org/${GEOPSY_BRANCH}/plugins
+
  $ cd src
 +
  $ git clone git://geopsy.org/geopsypack
 +
  $ mv geopsypack 3.5
 +
   $ cd 3.5
 +
  $ git checkout 3.5
 +
   $ git submodule update --init
  
=== Defining the branch and the version ===
+
Configure and build:
 +
  $ ./configure -builddir /c/geopsy/build/3.5 \
 +
                -prefix /c/geopsy/usr/3.5 \
 +
                -I /c/geopsy/fftw/fftw-3.3.10/api -L /c/geopsy/fftw/fftw-3.3.-10/.libs \
 +
                -L /c/geopsy/lapack/lapack-3.11.0 \
 +
                -I /c/geopsy/python/include
 +
  $ make -j 4 -C /c/geopsy/build/3.5
 +
  $ make install -C /c/geopsy/build/3.5
  
The current branch and the current version are defined by the following variables
+
That's it, you should have a running ''geopsypack'' including the latest modifications.
  
   export GEOPSY_BRANCH=3.5
+
If you want to update an existing source tree:
   export GEOPSY_VERSION=3.5.0-preview
+
  $ cd /c/geopsy/src/3.5
 +
   $ git pull
 +
  $ git checkout 3.5
 +
   $ git submodule update --init
 +
Reconfigure and build:
 +
  $ cd /c/geopsy/build/3.5
 +
  $ ./configure.cache
 +
  $ make -j 4
 +
  $ make install

Latest revision as of 08:17, 16 January 2024

Binary package

The binaries are distributed inside a single .zip file. Extract all the files and the directories to your preferred location and start using it.

All the executable applications are in bin. Among them, GeopsyLand is of interest for Windows users. It provides the list of graphical applications on the left panel and a simple emulation of a Linux terminal on the right panel. Environment variables are properly set by default (PATH) and all command line tools can be directly executed inside the terminal.

If you installed several geopsy or dinver versions, it is mandatory to set the appropriate path for tools and plugins before running them. Run in terminal:

 geopsy -clear-tools
 dinver -clear-plugins

Source package

Compiling from the source package may be an option if the binary package is not yet available. It takes a bit longer and requires several steps. Once a build environment is ready, updates are relatively straight forward. Getting Git, Qt and compiling Lapack and FFTW are required only once. When updating from a previous Geopsy release you can skip these steps and go directly to Geopsy package. As a general comment, do not move directories after their installation, prefer a new installation instead.

Git

Git is a widely used version control tool, required to access the geopsy main repository. The binary package for Windows comes with a bash terminal which will be used for compilation.

Download the 64-bit standalone installer (version 2.39.1 at the time of writing this tutorial). Start the installer and follow the instructions. Default options are fine except a few detailed hereinafter. Among default options:

 * Git components
 * Vim as editor
 * Let git decide the name of the initial branch
 * Git from the command line and also 3rd party software
 * bundled OpenSSH
 * OpenSSL library
 * MinTTY
 * Default (fast forward or merge)
 * File system caching
 * No experimental options

For some other options, the default is not preferred.

 * Installation in 'C:\geopsy\Git' (Avoid spaces in directory names like 'Program files')
 * Select "Checkout as-is, commit Unix-style line endings" for line ending conversions

Qt

Qt libraries and development tools must be available. Only Qt releases posterior or equal to 5.15.2 are supported. To test if Qt is already installed, start 'Git Bash' terminal from 'Microsoft Windows' main menu and type:

 $ qmake -version
 #  QMake version 3.1
 #  Using Qt version 5.15.2 in Z:/Qt/6.5.2/6.5.2/mingw_64/lib
 $ lupdate -version
 #  lupdate version 6.5.2

If Qt 5.15.2 (or a more recent version) is installed, you can jump directly to Lapack. If not you must first install Qt.

Installing Qt binary packages provides the detailed steps to install Qt. In this tutorial, we choose to install Qt in 'Z:/Qt/6.5.2', at least 63 Gb are required during the installation. Once installed the package weights around 56 Gb.

In Git Bash terminal, configure the PATH to Qt executables:

 $ echo "export PATH=/z/Qt/6.5.2/6.5.2/mingw_64/bin:/z/Qt/6.5.2/Tools/mingw1120_64/bin:\$PATH" >> ~/.profile
 $ source ~/.profile
 $ cd /c/geopsy
 $ qmake -v
 QMake version 3.1
 Using Qt version 6.5.2 in Z:/Qt/6.5.2/6.5.2/mingw_64/lib
 $ lupdate -version
 lupdate version 6.5.2
 $ g++ --version

'mingw32-make' must be renamed to simply 'make' in '/z/Qt/6.5.2/Tools/mingw1120_64/bin'

 $ cd /z/Qt/6.5.2/Tools/mingw1120_64/bin
 $ mv mingw32-make.exe make.exe

Python

Python is required for the last step of Lapack installation. Optionally, geopsypack can be compiled with Python: several Python modules are currently available. So there are good reasons to install Python now, if it is not yet installed.

Window installer (64-bit) for release 3.11.5 is chosen in this tutorial. Select custom installation and install to

 /c/geopsy/python

Lapack

Linear Algebra PACKage

Download the latest release source archive (currently, lapack-3.11.0.tar.gz).

 cd /c/geopsy
 mkdir lapack
 cd lapack
 tar xvfz ~/Downloads/lapack-3.11.0.tar.gz
 cd lapack-3.11.0
 cp make.inc.examples make.inc

Edit 'make.inc' at line 27 (source [1] failed tests issue)

 LDFLAGS =-Wl,--stack=8388608

The last testing steps of Lapack require Python. Edit 'lapack_testing.py' and replace the first line by

 #!/c/geopsy/python/python

It is now ready to build

 make -j 4

geopsypack expect Blas library to be named libblas.a, hence rename it

 cp librefblas.a libblas.a

FFTW

Fastest Fourier Transform of the West.

FFTW >= 3.0.1 is required. Version 3.3.10 has been successfully tested.

Download the archive from FFTW.

Unpack it

 cd /c/geopsy
 mkdir fftw
 cd fftw
 tar xvfz ~/Downloads/fftw-3.3.10.tar.gz
 cd fftw-3.3.10

Configure FFTW:

 ./configure

Build FFTW:

 make -j 4

geopsypack

If you want the very latest updates you can access directly our Git repository. If you prefer a more stable release go to Download section. Be careful that compilation may fail. To know if the build has a chance to complete successfully, first have a look at NextRelease. If there is a complete green bar in front of src-testing-*, you will probably get to the end of the build without error. If it is not completely green, come back later or contact the developers.

Download geopsypack from Git repository and install. Note that we recommend to build in a separate directory from the sources which is not located inside the source tree. Eventually replace 3.5 by the desired branch. The branch name is composed of the first two numbers of the version number. For instance, version 3.5.0 is built from branch 3.5 .

 $ cd /c/geopsy
 $ mkdir src
 $ cd src
 $ git clone git://geopsy.org/geopsypack
 $ mv geopsypack 3.5
 $ cd 3.5
 $ git checkout 3.5
 $ git submodule update --init

Configure and build:

 $ ./configure -builddir /c/geopsy/build/3.5 \
               -prefix /c/geopsy/usr/3.5 \
               -I /c/geopsy/fftw/fftw-3.3.10/api -L /c/geopsy/fftw/fftw-3.3.-10/.libs \
               -L /c/geopsy/lapack/lapack-3.11.0 \
               -I /c/geopsy/python/include
 $ make -j 4 -C /c/geopsy/build/3.5
 $ make install -C /c/geopsy/build/3.5

That's it, you should have a running geopsypack including the latest modifications.

If you want to update an existing source tree:

 $ cd /c/geopsy/src/3.5
 $ git pull
 $ git checkout 3.5
 $ git submodule update --init

Reconfigure and build:

 $ cd /c/geopsy/build/3.5
 $ ./configure.cache
 $ make -j 4
 $ make install