Difference between revisions of "Installation:Windows"

From GeopsyWiki
Jump to navigation Jump to search
Line 103: Line 103:
 
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 ''Microsoft Windows'' menu, under 'Qt', start terminal named 'Qt-5.15.2 (MinGW 8.1.0 64-bit)'. PATH environment variable is pointing to the right locations for running 'qmake', 'make' and the compiler.
+
   $ cd /c/geopsy
  >C:
+
   $ mkdir src
   >cd /
+
   $ cd src
   >mkdir geopsy
+
   $ git clone git://geopsy.org/geopsypack
   cd /geopsy/
+
   $ mv geopsypack 3.5
   git clone git://geopsy.org/geopsypack
+
  $ cd 3.5
   cd geopsypack
+
   $ git checkout 3.5
   git checkout 3.5
+
   $ git submodule update --init
   git submodule update --init
 
If you want only the applications and libraries without GUI, you can replace ''geopsypack'' by ''geopsypack-core''.
 
  
 
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 -prefix /c/geopsy/usr/3.5
   make -j 8 -C /path/where/you/want/to/build
+
   $ make -j 4 -C /c/geopsy/build/3.5
   make install -C /path/where/you/want/to/build
+
   $ 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.
 
You can skip the rest of this tutorial.

Revision as of 21:26, 3 February 2023

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 -clar-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 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.

This tutorial is under construction, use it at your own risks!

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 /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. 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/5.15.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/5.15.2/5.15.2/mingw81_64/bin:/z/Qt/5.15.2/Tools/mingw810_64/bin:\$PATH" >> ~/.profile
 $ source ~/.profile
 $ cd /c/geopsy
 $ qmake -v
 QMake version 3.1
 Using Qt version 5.15.2 in Z:/Qt/5.15.2/5.15.2/mingw81_64/lib
 $ lupdate -version
 lupdate version 5.15.2
 $ g++ --version
 

This is an interface library that provides portability to virtually all platforms. A binary package for Microsoft Windows can be downloaded from 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 Qt git repository.

 cd /geopsy/Qt
 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


 mkdir -p ../build/$QT_BRANCH
 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 install -j 4

Defining the branch and the version

The current branch and the current version are defined by the following variables

 export GEOPSY_BRANCH=3.5
 export GEOPSY_VERSION=3.5.0-preview

Installing from Git repository

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
 $ 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

You can skip the rest of this tutorial.

Mingw-w64

Mingw-w64 provides GNU C++ compiler for Windows. Download w64devkit. This tutorial is based on w64devkit-1.17.0 but another more recent release might also work. Extract the archive to

 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. Create a .profile in your home to add path to git tools in PATH

 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