Prerequisites
I assume you have Qt, version 4 (http://qt.nokia.com) and vtk (http://www.vtk.org) with qt-support installed.
In Ubuntu 10, that requires the following packages:
VTK:
- libvtk5.2
- libvtk5-dev
- libvtk4-qt4
- libvtk5-qt4-dev
QT:
- libqt4-core
- libqt4-gui
- libqt4-dev
- qt4-qmake
Building the generator from the command line
- Check out the Generator project via svn from svn+ssh://www.informatik.tu-muenchen.de/atsccs40/home_local/repositories/svn/ScenarioGenerator/trunk
- Check out the Peano project via svn from svn+ssh://www.informatik.tu-muenchen.de/atsccs40/home_local/repositories/svn/peano/trunk
- CD into the project directory
- set environment variables according to your system (vim ~/.bashrc):
- Set the environment variables VTKINCLUDEPATH and VTKLIBPATH to point to the vtk headers and vtk librarie. In our case it looks like : export LD_LIBRARY_PATH=/usr/lib/vtk-5.2:$LD_LIBRARY_PATH export VTKLIBPATH=/usr/lib/vtk-5.2 export VTKINCLUDEPATH=/usr/include/vtk-5.2
- Set the environment variables SCENGENSRC and SCENGENGUISRC to point to the folder of src and ScenGen/src/. In our case it looks like : export SCENGENSRC=/home_local/tanlin/workspaces/ScenarioGenerator/src/ export SCENGENGUISRC=/home_local/tanlin/workspaces/ScenarioGenerator/ScenGen/src/
- Set the environment variables TARCH_SRC In our case it looks like : export TARCH_SRC=/home_local/tanlin/workspaces/peano-src-trunk/src/
- Make environment variables immediately works (source ~/.bashrc)
- generate the library tarch
Go to the root folder of Generator project and run scons target=sc-basic build=debug
.
Move the libtarch.a from build/debug/sc-basic/g++/ to the folder of src (which decide by the command above)
- Make bash scripts of buildGuiStuff.sh and cleanupGuiStuff.sh executable (chmod u+x *.sh).
- Build the executable (ScenGen) by typing
./buildGuiStuff.sh
Building the generator with Eclipse CDT
Basically perform the steps from Building the generator from the command line. When checking out the project in eclipse with the svn-plugin subclipse, choose as project type a "Makefile Project". Then generate the the Makefile as described below.
- generate a Gnu Makefile by typing
qmake -o Makefile.generator
.
Specify in the "Project Properties" / "C/C++-Build" / "Builder Properties" the Makefile generated (in the build command:
make -f Makefile.generator -j3
)
To ease the regeneration of the Makefile, you can optionally install the qt eclipse integration plugin from http://qt.nokia.com/developer/eclipse-integration
QMake Links
Building the DummyGenerator
Along with the Scenario Generator comes a DummyGenerator, to demonstrate the concepts. To build it, type
qmake -o Makefile.dummy
make -f Makefile.dummy
Alternatively, specify a new build configuration in Eclipse.
Running the ScenarioGenerator with the DummyGenerator
Make sure, that the libraries of the DummyGenerator are located in the directory ./libs. Then just execute the ScenarioGenerator in the folder of ScenGen:
./ScenGen