2. Installation
Geopsy's heart beat is made of three packages: geopsycore, geopsygui and geopsy, the later one being the application itself. A series of plugins can be added for particular signal processings: e.g. H/V (geopsyhv), ambient vibration array method (geopsyarray),...
Geopsy is currently distributed inside Sesarray package). Compiling from source distributions may take some time whilst binary packages are ready once downloaded. Binary packages are currently available for Mac OS X and Windows.
For binary distributions (Windows and Mac OS X only), download the corresponding archives and follow instructions (user friendly installer). Installation from source is detailed here below.
The recommended compiler is gcc (>=3.3.5), available for all platforms (also for Windows, minGw). With any versions >=3.4, time needed for compiling is greatly reduced thanks to pre-compiled headers. This optimization is automatically handled by ./configure (see below). Building process is divided in two main steps: compiling Qt 4 (if not already available on your platform) and Sesarray.
Building 3rd party libraries
All 3rd party libraries except Qt are included in Sesarray package (lapack, fftw, libf2c). Qt must be built before starting Sesarray installation.
Fastest method
If you are running a recent Linux distribution you have Qt 4 available as a binary package. Use the specific tools (yast, rpm, apt, emerge...) provided by your distribution to install the Qt packages: qt and qt-devel (naming can be a little different).
Once these packages are ready, you can check if Qt build tools are really available. Open a terminal:
Check Qt 4 installation |
$ qmake -version QMake version 2.01a Using Qt version 4.3.3 in /usr/lib64/qt4 $ lupdate -version lupdate version 4.3.3 |
If you get these answers (or more recent version), you can jump directly to the installation of Sesarray. If not, you must first solve this problem (contact your system administrator) before proceeding to Sesarray installation. If the version numbers are lower than those shown above, consider compiling Qt 4 manually (see next section).
Longest method
Compile Qt 4 from scratch only if you are working with an old Linux distribution or if you have other good reasons to do it. It is time consuming and generally requires third party package installation (particularly 'devel' packages for distribution based on binary packages).
Qt archive delivered by Trolltech is a huge file mainly dedicated to developers (about 100 Mb). It requires more than 1.5 Gb of disk space to build completely. Before starting, you must download the latest Qt libraries available at www.trolltech.com.
Building Qt |
$ tar xvfpz qt-x11-opensource-src-X.X.X $ cd qt-x11-opensource-src-X.X.X $ ./configure $ make |
By default Qt is installed in /usr/local/Trolltech, which generally requires root privileges.
Installing Qt with 'su' |
$ su - $ make install $ exit |
If you cannot log to 'root', you may also use 'sudo':
Installing Qt with 'sudo' |
$ sudo make install |
If neither of these two techniques worked for you, you can install Qt somewhere else where you have write permissions, for instance in ~/Trolltech/Qt-X.X.X. Never continue this installation without running 'make install' correctly. Pointing PATH and LD_LIBRARY_PATH directly to Qt source tree is likely to produce unexpected results. If you move Qt source tree, you must build Qt again. To change installation directory you must configure and make Qt again.
Building Qt and installing in your home directory |
$ cd qt-x11-opensource-src-X.X.X $ ./configure -prefix ~/Trolltech/Qt-X.X.X $ make $ make install |
Finally, you must define the installation directory in PATH environment variable.
Defining Qt in PATH for bash |
$ export PATH=/usr/local/Trolltech/Qt-X.X.X or $ export PATH=~/Trolltech/Qt-X.X.X |
Defining Qt in PATH for sh |
$ setenv PATH /usr/local/Trolltech/Qt-X.X.X:$PATH or $ setenv PATH ~/Trolltech/Qt-X.X.X:$PATH |
Add this definition to your profile to keep it permanently in your environment (~/.bashrc, ~/.profile, ...).
Building Sesarray
Unix like systems (Linux, Mac OS X, ...)
Unpacking the archive |
$ tar xvfpz sesarray-src-X.X.X.tar.gz $ cd sesarray-src-X.X.X |
A configure script creates the necessary Makefiles. Usual options for configure are available (option '-help' for details, '-prefix' to change installation directory).
Configure the installation path (Linux and Mac) |
$ ./configure |
You will be prompted for the license agreement. You are ready to compile and to install the package:
Compile and install |
$ make install |
Windows
Building sesarray package is useless under Windows and time consuming. Prefer the binary release if you just want to use the software and do not want to loose your time. This section might be of interest for developpers or maintainers of this software.
This tutorial guides you through all steps required for building sesarray package from sources. Windows does not contain by default all necessary development tools. Hence, we first guide you through their installation before the installation of the package itself.
Contents:
- Installing Mingw and MSYS environment
- Customizing a MS-DOS terminal suitable for building Qt4
- Building Qt4
- Installing Qt4 for MSYS
- Building sesarray
Installing Mingw and MSYS environment
- Download the following files (also available at http://www.mingw.org/download.shtml#hdr2):
- Download install-mingw.zip from ftp://ftp.geopsy.org/softwares/qt and unzip it (for instance with 7-zip).
- If you want to customize the installation path you must edit the header of file install-mingw.bat.
- Inside the extracted folder, double-click on "install.bat". This script launch the installation of all mingw and msys packages sequentially. During msys installation, you will prompted in the terminal for a post-install. It is really important to answer as specified at first in the terminal.
Customizing a MS-DOS terminal suitable for building
- Drag the MS-DOS terminal icon from the Start menu ( usually in Programs/Accessories ) to your Desktop or anywhere else.
- Right click on it and select "Properties"
- Add " /K c:\sesarray\setenv.bat" to the target. The target must be like that:
%SystemRoot%\system32\cmd.exe /K c:\sesarray\setenv.bat
- Modify the starting folder to "c:\sesarray"
- Close the dialog box
- Rename the MS-DOS terminal shortcut to "sesarray-term"
- Create folder c:\sesarray
- Create a new text file called c:\sesarray\setenv.bat containing:
set PATH=c:\mingw\bin;c:\qt\bin;%PATH%
- To test the terminal, double click on "sesarray-term", you should have a terminal waiting for commands with the correct environment. Type echo %PATH% to check it. It should be something like:
c:\mingw\bin;c:\qt\bin;c:\WINNT\system32 ...etc
Building Qt4
- Download the latest version for Windows from http://www.trolltech.com/download/qt/windows.html
- Unzip the archive "qt-win-opensource-src-X.X.X.zip", for instance with 7-zip
- Move and rename qt-win-opensource-src-X.X.X folder to c:\qt
- If you want to use QSA (scripting engine), patch Qt as explained above inside a MSYS terminal. Then, run ./configure and make in the MSDOS terminal .
- Double-click on "sesarray-term" and type:
$ cd ..\qt $ configure -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg $ make
- Wait for at least one hour... depending upon your machine performances!
Installing Qt4 for MSYS
- Change the PATH environment variable to include Qt path
- Create file ~/.profile with the following lines (e.g. with vi):
$ vi ~/.profile
- Inside vi, type 'i' to start edition and insert the next line:
export PATH=/c/qt/bin:$PATH
- To save and exit, hit 'ESCAPE', then type ':wq'
- Restart MSYS and check that you can start qmake for instance:
$ qmake -v QMake version: 2.00a Using Qt version 4.1.1 in C:\qt\lib
Building sesarray
- Download sesarray-src-X.X.X.tar.gz (the source archive, not the specific Windows sesarray-win which contains only binary executables). In the following, sesarray-src-X.X.X.tar.gz is supposed to be in c:\sesarray. Replace X.X.X by the appropriate version.
- Open a MSYS terminal (usually there is an icon on the desktop)
- Change current directory to /c/sesarray by typing:
$ cd /c/sesarray
- Uncompress the archive by typing:
$ tar xvfpz sesarray-src-X.X.X.tar.gz
- Enter in sesarray-src-X.X.X directory:
$ cd sesarray-src-X.X.X
- Configure the package by typing:
$ sh configure -prefix "C:\Program Files\sesarray"
- compile under MSYS
$ make install
That's all, you should have a working version of sesarray in C:\Program Files\sesarray.
Final touch
With the last step, you were probably happy to see geopsy.exe ready in C:\Program Files\sesarray\bin and you double-clicked on it. Desesperated you are because of missing dlls (mingwm10.dll, QtCored4.dll or QtGuid4.dll).
To correct this, you must copy these dynamic libraries into a directory listed in your system %PATH%. Either add C:\mingw\bin and C:\qt\bin to the system path (see Start Menu/control panel/System/Advanced/Environment Variables), or copy these libraries to C:\Program Files\sesarray\bin, close to all other sesarray binaries. With the last method, you can copy the whole directory C:\Program Files\sesarray to other Windows computers without much effort
Thanks for your patience!