Compiling OpenBirds
I'm using Eclipse +
CDT to compile
OpenBirds. It is possible to do with oldschool Makefile,
but for now
i'll just use CDT's managed make build. The Makefile
is included in CVS but is unmaintained. Eclipse and CDT
are available from repositories for at least Fedora Core 4/5.
It is good to use SUN Java instead of gcj to run Eclipse as i didn't manage to get CVS/SSH to work
on gcj.
Dependencies
All the dependencies are available as binary packages for at least Ubuntu Dapper and Fedora Core 4/5. In Ubuntu you'll need Universe repository and in FC you should add Livna. Livna lacks ODE rpm but google for it and you'll find it. Use synaptic/yumex/apt-get/yum/whatever you like to get the dependencies.This list contains the names of rpm (FC5) and deb (Ubuntu) packages that are needed. The package file names usually contain version numbers also. Use the latest version available.
- OpenSceneGraph: OpenSceneGraph-devel.rpm libopenscenegraph-dev.deb
- OpenAL: openal-devel.rpm libopenal-dev.deb
- ALUT: freealut-devel.rpm libalut-dev.deb
- SDL: SDL-devel.rpm libsdl1.2-dev.deb
- SDL_net: SDL_net-devel.rpm libsdl-net1.2-dev.deb
- ODE: ode.rpm ode-devel.rpm libode0-dev.deb
Compiling
- Create a new managed make C++ project
- Import files from CVS
- Checkout module "motti". NOT module "openbirds" which is a ancient version!!! See CVS instructions page for correct checkout settings
You might want to disable automatic building until the project builds correctly as it is quite slow and annoying.
Excluded files
These files must be excluded from compilation process. These are test programs and currently unmaintained classes. Right-click on file | Properties | C/C++ Build and check Exclude from build.- physicsmodel/sailplanemanager.h and .cpp
- physicsmodel/testcarmanager.h and .cpp
- dynamicworld/dynamicworld_test.cpp
- dynamicworld/smoothtest.cpp
Linking
OpenBirds must be linked with the following libraries. Add these to Project | Properties | C/C++ Build | Tool Settings | GCC C++ Linker | Libraries (-l).- SDL
- SDL_net
- osgParticle
- osgText
- osgGA
- osgDB
- osgUtil
- osg
- ode
- openal
- alut
OpenBirds should now build without warnings. Now you should copy the data files to the empty data directory you got from CVS and the .conf files to some location where OB can find them (~, /etc/openbirds, .. from the binary).