Building and Installing AVANGO

This document provides a quick introduction how to build and install AVANGO under GNU Linux with the command line. In case you want to build AVANGO under Linux with eclipse (you need the CDT plugin enabled), please follow the instructions given here:

In case you want to build AVANGO under Windows with Visual Studio, follow these instructions:

Before leaving this page, have a look how to obtain the AVANGO source code and what are the dependencies of AVANGO.

Dependencies

The following dependencies have to be met to build AVANGO.

Development Tools

Suitable C++ compiler
Building AVANGO has been tested with the GNU C++ compiler, the Intel C++ compiler and the Microsoft C++ compiler. Note that the C++ TR1 feature set is required.
 Python
Version must be at least 2.4. No work has been done to make AVANGO compatible with the upcoming 3.0 release.
 SCons
Used by the AVANGO build system. Requires at least version 0.96.93. Version 1.0 is supported.
Subversion client
Required to obtain AVANGO source code.

Libraries

 OpenSceneGraph
Versions 2.6 and above are all supported.
 Boost
Version must be at least 1.34. Most modern Linux distributions provide packages and precompiled binaries exist for Windows.

Obtaining the AVANGO source code

The following command fetches the development version of the AVANGO source code using the subversion command line program. You can find more information about available packages and our source code repository here.

svn checkout http://www.avango.org/svn/trunk/

Building

The AVANGO build system uses SCons. A list of all available build options is shown using the following command in the AVANGO source directory:

scons --help

Options can be set on the command line, such as

scons DEBUG=yes CXX=g++

or by using a file called localdefs.py. It is read in and executed as a Python script. This is an example:

PREFIX = '/opt/avango'
LIBRARY_PATH = '/opt/openscenegraph/lib'
INCLUDE_PATH = '/opt/openscenegraph/include'
BUILD='build'
DEBUG=True
OPENSCENEGRAPH=True

The AVANGO build system assumes that all required files are in the default search paths. These search paths can be extended with the appropriate build option, e.g. LIBRARY_PATH for the search path for libraries. In the example above we extended the search path to contain a OpenSceneGraph? installation. Multiple paths are separated with an ':' on Linux and a ';' on Windows.

Note that the AVANGO build system does not differentiate between different search paths for different libraries. This is intentional. See the AVANGO build documentation? for detailed information.

To build AVANGO, issue the following command in the source directory:

scons

This will automatically build and execute test programs that verify correct behavior. All tests should run without failure. If some tests do fail on your setup, please contact the development team.

Installing

The AVANGO build system uses the PREFIX option as the path where AVANGO should be installed. If your localdefs.py file contains the following line,

PREFIX='/usr/local'

your files will be installed under /usr/local. Note that this is also the default location used if this option is omitted (even under Windows).

To install issue the following command in the source directory:

scons install

If the installation directory is not in your default search path, you need to set both the library and the Python search path. If you installed AVANGO under /opt/avango the following commands can be executed to run AVANGO (this examples assumes that you are using version 2.5 of Python):

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/avango/lib
export PYTHONPATH=$PYTHONPATH:/opt/avango/lib/python2.5

If your are using Windows and installed AVANGO under C:\AVANGO you can use the following commands:

set PATH=%PATH%;C:\AVANGO\lib
set PYTHONPATH=%PYTHONPATH%;C:\AVANGO\lib\python2.5

You can now e.g. start the Snowland demo in the examples directory. Change to that directory and execute the following command

python snowland.py