[HelpOnLanguages] [TitleIndex] [WordIndex]

InstallFromScratchOnUbuntuDapper

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.

2. Modify and update apt sources

Use your favourite editor to edit the file: /etc/apt/source.list and uncomment the 'universe' lines as descibed in the comments of this file.

3. Install Qt4

sudo apt-get install libqt4-core libqt4-debug libqt4-debug-dev libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf

/!\ Note: If you are following this set of instructions on a system where you already have Qt3 development tools installed, there will be a conflict between Qt3 tools and Qt4 tools. For example, qmake will point to the Qt3 version not the Qt4. You can use apt alternatives to correct this so that the Qt4 version of applications is used in all cases:

sudo update-alternatives --config qmake
sudo update-alternatives --config uic
sudo update-alternatives --config designer
sudo update-alternatives --config assistant
sudo update-alternatives --config qtconfig
sudo update-alternatives --config moc
sudo update-alternatives --config lupdate
sudo update-alternatives --config lrelease
sudo update-alternatives --config linguist

Use the simple command line dialog that appears after running each of the above commands to select the Qt4 version of the relevant applications.

4. Install openModeller dependencies

5. Prepare your development environment

5.1. Create a working directory

As a convention I do all my development work in $HOME/dev/<language>, so in this case we will create a work environment for C++ development work like this:

mkdir -p ${HOME}/dev/cpp
cd ${HOME}/dev/cpp

5.2. Install additional software dependencies related to openModeller

sudo apt-get install gdal-bin libgdal1-dev libgeos-dev libexpat1-dev proj libtool libgdal-doc libhdf4g-dev libhdf4g-run autoconf2.13 automake1.9 python-dev swig libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev libterralib1-dev libterralib1-doc libterralib1c2a

5.3. Install additional packages for Terralib support

sudo apt-get install libterralib1-dev libterralib1-doc libterralib1c2a

5.4. Install the CVS client

sudo apt-get install cvs

6. 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:

6.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!

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

6.3. Build the code

cd ~/dev/cpp/om
./autogen.sh --enable-python --enable-soap --prefix="/usr/local/"
make
sudo make install

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

7. Install omgui1

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

cd omgui1./build.sh

Make sure to replace 'developername' above with your sourceforge account name!

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

7.3. Give it a test run

./runRelease.sh

or

./runDebug.sh

8. And Finally

If you have further problems or issues please see the OmguiFaq for common problems and their resolution.


2014-08-13 10:45