Contents
1. Introduction
This page describes the complete setup process for creating a omgui1 development environment on Ubuntu Dapper. It assumes you have made a fresh install and have a 'clean' system. These instructions should work fine if this is a system that has already been in use for a while, you may need to just skip those steps which are irrelevant to you.
Note: This is a 'cut and paste' tutorial - in most cases you can simply copy the commands listed in codeblocks that look like this:
somecommand to be pasted
And paste them into your console simply by pressing the middle mouse button. Then follow any prompts that may appear in the console window.
I prepared these instructions on a Macbook intel dual core 2ghz machine with 1gb ram running MacOS 10.4.6. Your mileage may vary if you are using an older version of Mac OS X.
2. Setup your Build Environement
2.1. Set up xcode
Install xcode by inserting the OSX install cd and double clicking on the XCODE installation package
2.2. Install Qt4
Get Qt4 for Mac from Trolltech (http://trolltech.com/). At the time of writing the latest version available was 4.1.3, which I downloaded into my ~/installers directory. Now issue the following commands to extract and build Qt4:
mkdir -p $HOME/src
cd $HOME/src
tar xfz ~/installers/qt-mac-opensource-src-4.1.3.tar.gz
./configure -prefix /usr/local/Qt4.1.3/
make
sudo make install
Note: It will take some time to build....
2.3. Setup Fink
Fink provides apt on the Mac and will let us easily install various library dependencies. To get fink, visit the Fink Dowload Page and get the latest version (at the time of writing it was 0.8). Open the dmg and run the installer. Then from your console run:
sudo apt-get update
sudo apt-get install automake1.9 autoconf2.5 libtool
At the time of writing this, proj and gdal etc were not yet available in finks universal / intel binary apt repositories, so I had to build them from source. However to save yourself this pain, check for yourself if they are available yet before carrying out the next set of instructions.
2.4. Install proj, gdal, expat etc
touch ~/.cvspass
2.4.1. GSL
sudo apt-get install gsl
2.4.2. Expat
Checkout a version of Expat from SourceForge CVS site. The latest packaged source distribution won't work because it uses a buggy version of libtool (v1.4.x). To check out expat from CVS, use the following commands:
cd $HOME/src
cvs -d:pserver:anonymous@expat.cvs.sourceforge.net:/cvsroot/expat login
cvs -z3 -d:pserver:anonymous@expat.cvs.sourceforge.net:/cvsroot/expat co -P expat
Build and install Expat using the following commands:
cd expat
./configure
make install
2.4.3. PROJ
cd $HOME/src
cvs -d :pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot login
cvs -d :pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot co proj
cd proj
./configure make install
2.4.4. GDAL
Download the source version of GDAL. I have used latest version from CVS HEAD from March 3, 2006.
e.g.
cd $HOME/src
export CVSROOT=:pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot
cvs co gdal
cd gdal
./configure --with-png=no
make
sudo make install
I have disabled png above due to library conflicts - when I resolve this issue Ill reenable it.
2.4.5. GSL
GSL (The gnu scientific library) is needed for the CSM algorithm. There are prebuild mingw binaries and developer files available for it from the GnuWin32 project. {http://kent.dl.sourceforge.net/sourceforge/gnuwin32/gsl-1.6.exe Download the installer] and then install into c:\temp or somewhere impermanent. Now copy the files into your c:\MinGW folder. You can do this any way you prefer - just make sure your bin, lib, include etc directories are grafted into the same place in the c:\MinGW tree.
3. Install openModeller Library
You need the openModeller library to be installed before you can build the openModeller GUI. libom is not available from apt yet, so you need to build it from source:
3.1. Check out the source code from sourceforge
cd ~/dev/cpp
There are two ways the source can be checked out. Use the anonymous method if you do not have edit privaleges for the openModeller CVS repository, or use the developer checkout if you have permissions to commit source code changes.
1. Anonymous Checkout
cvs -d:pserver:anonymous@openmodeller.cvs.sourceforge.net:/cvsroot/openmodeller login
cvs -z3 -d:pserver:anonymous@openmodeller.cvs.sourceforge.net:/cvsroot/openmodeller co -P om
2. Developer Checkout
export CVS_RSH=ssh
cvs -z3 -d:ext:developername@openmodeller.cvs.sourceforge.net:/cvsroot/openmodeller co -P om
Make sure to replace 'developername' above with your sourceforge account name!
3.2. Update your system lib search path
Use your favourite editor to add the following line to /etc/ld.so.conf :
/usr/local/lib
Then run the following command:
sudo ldconfig
3.3. Build the code
cd ~/dev/cpp/om
./autogen.sh --enable-python --enable-soap --prefix="/usr/local/"
make
sudo make install
3.4. Give it a test run
cd examples
om_console request.txt
Good now we have openModeller library installed and the openModeller console apps, lets move on to building the GUI...
4. Install omgui1
4.1. Check out the source code from sourceforge
cd ~/dev/cpp
Note: This step may look the same as previous, but we are checking out omgui1 now not om!
There are two ways the source can be checked out. Use the anonymous method if you do not have edit privaleges for the openModeller CVS repository, or use the developer checkout if you have permissions to commit source code changes.
1. Anonymous Checkout
cvs -d:pserver:anonymous@openmodeller.cvs.sourceforge.net:/cvsroot/openmodeller login
cvs -z3 -d:pserver:anonymous@openmodeller.cvs.sourceforge.net:/cvsroot/openmodeller co -P omgui1
2. Developer Checkout
export CVS_RSH=ssh
cvs -z3 -d:ext:developername@openmodeller.cvs.sourceforge.net:/cvsroot/openmodeller co -P omgui1
Make sure to replace 'developername' above with your sourceforge account name!
4.2. Run the build script
cd omgui1
./build.sh
Note: The build.sh and settings.pro file contains various options that affect how omgui1 is built, you may want to edit them as needed.
4.3. Give it a test run
bin/omgui1
5. And Finally
If you have further problems or issues please see the OmguiFaq for common problems and their resolution.