Difference between revisions of "Installation:Windows"

From GeopsyWiki
Jump to navigation Jump to search
 
(47 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 (branch 3.5). For branch 3.6, the recommended ''Qt'' release is 6.8.3. 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 6.8.3 in Z:/Qt/6.8.3/6.8.3/mingw_64/lib
 +
  $ lupdate -version
 +
  #  lupdate version 6.8.3
 +
 
 +
If Qt is installed, you can jump directly to [[#Lapack|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.8.3', about 3 Gb are required if the only the proprosed options are selected. Selecting everything may end up with a huge amount of disk waste (if only ''geopsy'' is considered).
 +
 
 +
In ''Git Bash'' terminal, configure the PATH to Qt executables:
 +
  $ echo "export PATH=/z/Qt/6.8.3/6.8.3/mingw_64/bin:/z/Qt/6.8.3/Tools/mingw1310_64/bin:\$PATH" >> ~/.profile
 +
  $ source ~/.profile
 +
  $ cd /c/geopsy
 +
  $ qmake -v
 +
  QMake version 3.1
 +
  Using Qt version 6.8.3 in Z:/Qt/6.5.2/6.5.2/mingw_64/lib
 +
  $ lupdate -version
 +
  lupdate version 6.8.3
 +
  $ g++ --version
 +
'mingw32-make' must be renamed to simply 'make' in '/z/Qt/6.5.2/Tools/mingw1120_64/bin'
 +
  $ cd /z/Qt/6.8.3/Tools/mingw1310_64/bin
 +
  $ mv mingw32-make.exe make.exe
 +
 
 +
=== mingw64 ===
 +
 
 +
[https://www.mingw-w64.org mingw-w64] is usually installed with [[Installing Qt binary packages|Qt binary package]]. Make sure that it is installed in a "normal" path. Troubles have been encountered with shared discs under Virtual Box. It can be fixed by copying ''mingw'' to another location.
 +
 
 +
  cd /z/Qt/6.8.3/Tools
 +
  cp -r mingw1310_64 /e
 +
 
 +
Edit '.profile' so that ''PATH'' contains
 +
 
 +
  /e/mingw1310_64/bin
 +
 
 +
  $ which g++
 +
  /e/mingw1310_64/bin/g++
 +
 
 +
=== HDF5 ===
 +
 
 +
[https://www.hdfgroup.org/solutions/hdf5 HDF5] library can be linked to open access to HDF5 files in ''geopsy''.
 +
 
 +
Compilation with mingw not documented. Best to use Microsoft Visual Studio, but the whole compilation must be ported to MSVC.
 +
 
 +
=== Python ===
  
[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
+
[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.
  C:\geopsy\Mingw-w64
 
and start
 
  C:\geopsy\Mingw-w64\w64devkit.exe
 
''Git'', ''make'' and ''g++'' should be available
 
  ~ $ git --version
 
  git version 2.39.1.windows.1
 
  ~ $ make --version
 
  GNU Make 4.4
 
  Built for x86_64-w64-mingw32
 
  ~ $ g++ --version
 
  g++ (GCC) 12.2.0
 
  
Copy and paste in the terminal works with the selection and right mouse button. There is also a menu in the upper left corner, under 'Modify' you can also copy and paste.
+
[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
Create a .profile in your home to add path to git tools in PATH
+
   /c/geopsy/python3.11
  cd
 
  vi .profile
 
Type 'i' to get into INSERT mode
 
   export PATH=C:/geopsy/Git/usr/bin:$PATH
 
Type 'ESC' to exit INSERT mode, then ':wq' to write and quit.
 
  source .profile
 
  
=== Qt ===
+
Version number is required for Geopsy configuration step.
  
[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:
+
Numpy compilation with mingw not documented. Using MSVC and a regular Python environment may be simpler.
  
  qmake -version
+
=== Lapack ===
  #  QMake version 3.1
 
  #  Using Qt version 5.15.2 in /home/wathelem/devel/Qt/5.11.2/gcc_64/lib2.01a
 
  lupdate -version
 
  #  lupdate version 5.15.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://netlib.org/lapack Linear Algebra PACKage]
  
[[Installing Qt binary packages]] provides the detailed steps to install ''Qt''. In this tutorial we chose to install ''Qt'' in 'Z:/Qt/5.15.2', at least 65 Gb are required.
+
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]).
  
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. While writing this tutorial, the installation wizard stopped on an error with OpenSSL handshake. This method is thus left away. A longer path is preferred here based on [https://www.qt.io Qt] git repository.
+
  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
  
  cd /geopsy/Qt
+
Edit 'make.inc' at line 27 (source [https://github.com/Reference-LAPACK/lapack/issues/890] failed tests issue)
  export QT_BRANCH=5.15
 
This definition can be also added to ~/.profile for next sessions.
 
  git clone git://code.qt.io/qt/qt5.git
 
  cd qt5
 
  git checkout $QT_BRANCH
 
  perl init-repository
 
You can leave your computer for a coffee break, the last command took about an hour to complete. The source code needs a few workarounds
 
* In qfilesystemengine_win.cpp around line 670, add "#if ... #endif"
 
  #if _WIN32_WINNT < _WIN32_WINNT_WIN8
 
  typedef struct _FILE_ID_INFO {
 
    ULONGLONG VolumeSerialNumber;
 
    FILE_ID_128 FileId;
 
  } FILE_ID_INFO, *PFILE_ID_INFO;
 
  #endif
 
  
 +
  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/python3.11/python
  
  mkdir -p ../build/$QT_BRANCH
+
It is now ready to build
  cd ../build/$QT_BRANCH
 
  ../../qt5/configure -prefix ../../../install/Qt/$QT_BRANCH -nomake examples -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtgraphicaleffects -skip qtgamepad -skip qtlocation -skip qtmultimedia -skip qtpurchasing -skip qtwebengine -skip qtwebchannel -skip qtwebsockets -skip qtwebview -opengl desktop -opensource -confirm-license
 
The configuration lasted approximately 10 minutes.
 
 
   make -j 4
 
   make -j 4
  make install -j 4
 
  
=== Defining the branch and the version ===
+
''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].
 +
 
 +
FFTW >= 3.0.1 is required. Version 3.3.10 has been successfully tested.
 +
 
 +
Download the archive from [http://www.fftw.org/fftw-3.3.10.tar.gz FFTW].
 +
 
 +
Unpack it
 +
 
 +
  cd /c/geopsy
 +
  mkdir fftw
 +
  cd fftw
 +
  tar xvfz ~/Downloads/fftw-3.3.10.tar.gz
 +
  cd fftw-3.3.10
  
The current branch and the current version are defined by the following variables
+
Configure FFTW:
  
   export GEOPSY_BRANCH=3.5
+
   ./configure
  export GEOPSY_VERSION=3.5.0-preview
 
  
== Installing from Git repository ==
+
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|Download]] section.
 
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.
Line 115: Line 151:
 
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 .
 
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 .
  
From the main ''Windows'' menu, under 'Qt', start terminal named 'Qt-5.15.2 (MinGW 8.1.0 64-bit)'.
+
   $ cd /c/geopsy
   cd /path/where/you/want/to/store/source/tree
+
  $ mkdir src
   git clone git://geopsy.org/geopsypack
+
  $ cd src
   cd geopsypack
+
   $ git clone git://geopsy.org/geopsypack
   git checkout 3.5
+
   $ mv geopsypack 3.5
   git submodule update --init
+
  $ cd 3.5
If you want only the applications and libraries without GUI, you can replace ''geopsypack'' by ''geopsypack-core''.
+
   $ git checkout 3.5
 +
   $ git submodule update --init
  
 
Configure and build:
 
Configure and build:
   ./configure -builddir /path/where/you/want/to/build -prefix /path/where/you/want/to/intall -march native
+
   $ ./configure -builddir /c/geopsy/build/3.5 \
   make -j 8 -C /path/where/you/want/to/build
+
                -prefix /c/geopsy/usr/3.5 \
   make install -C /path/where/you/want/to/build
+
                -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.
 
That's it, you should have a running ''geopsypack'' including the latest modifications.
  
 
If you want to update an existing source tree:
 
If you want to update an existing source tree:
   cd /path/where/you/stored/geopsypack/source/tree
+
   $ cd /c/geopsy/src/3.5
   git pull
+
   $ git pull
   git checkout 3.4
+
   $ git checkout 3.5
   git submodule update --init
+
   $ git submodule update --init
 
Reconfigure and build:
 
Reconfigure and build:
   cd /path/where/you/want/to/build
+
   $ cd /c/geopsy/build/3.5
   ./configure.cache
+
   $ ./configure.cache
   make -j 8
+
   $ make -j 4
   make install
+
   $ make install
 
 
You can skip the rest of this tutorial.
 

Latest revision as of 12:48, 14 April 2026

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 (branch 3.5). For branch 3.6, the recommended Qt release is 6.8.3. 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 6.8.3 in Z:/Qt/6.8.3/6.8.3/mingw_64/lib
 $ lupdate -version
 #  lupdate version 6.8.3

If Qt 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.8.3', about 3 Gb are required if the only the proprosed options are selected. Selecting everything may end up with a huge amount of disk waste (if only geopsy is considered).

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

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

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

 $ cd /z/Qt/6.8.3/Tools/mingw1310_64/bin
 $ mv mingw32-make.exe make.exe

mingw64

mingw-w64 is usually installed with Qt binary package. Make sure that it is installed in a "normal" path. Troubles have been encountered with shared discs under Virtual Box. It can be fixed by copying mingw to another location.

 cd /z/Qt/6.8.3/Tools
 cp -r mingw1310_64 /e

Edit '.profile' so that PATH contains

 /e/mingw1310_64/bin
 $ which g++
 /e/mingw1310_64/bin/g++

HDF5

HDF5 library can be linked to open access to HDF5 files in geopsy.

Compilation with mingw not documented. Best to use Microsoft Visual Studio, but the whole compilation must be ported to MSVC.

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/python3.11

Version number is required for Geopsy configuration step.

Numpy compilation with mingw not documented. Using MSVC and a regular Python environment may be simpler.

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/python3.11/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