Project::OSiRiON
News . Documentation . Screenshots . Downloads . Forum . Wiki . Tracker

Building from source code

To build Project::OSiRiON from source code you need a working C++ compiler and have the necessary libraries and header files installed. The official binaries are compiled with gcc on linux, and mingw on windows.

Requirements

The following packages are required to build the the dedicated server:

Additionally, the client requires:

  • libjpeg
  • libpng
  • libSDL 1.2
  • OpenGL
  • OpenAL or OpenAL Soft
  • Ogg Vorbis

You will also need gcc, GNU make, automake and libtool.

Building on Ubuntu Linux

To build the game on Ubuntu, you can install the required tools and dependencies by running the following commands in a terminal window:

sudo su -
apt-get install autoconf automake libtool subversion
apt-get install libjpeg8 libjpeg8-dev
apt-get install libpng3 libpng3-dev
apt-get install libvorbisfile3 libvorbis-dev
apt-get install libglu1-mesa-dev
apt-get install libopenal1 libopenal-dev
apt-get install libsdl1.2debian libsdl1.2-dev

Building on Windows

You can build the game on windows using a MinGW/MSYS environment. You can use the instructions in this document to create a complete environment, capable of building the Project::OSiRiON source code.

Note that the current win32 build environment uses /local32 instead of /usr/local. Edit the building instructions accordingly.

Building the Bullet physics library

The engine uses the Bullet Physics Library for physics support. You can download the bullet source code here:

To download and install the library:

wget http://bullet.googlecode.com/files/bullet-2.81-rev2613.tgz
tar zxvf bullet-2.81-rev2613.tgz
cd bullet-2.81-rev2613
./autogen.sh
./configure --prefix=/usr/local --disable-demos
make
sudo make install
cd ..

If you do not want to install bullet in /usr/local, you can edit the --prefix option here. Edit the the --with-bullet option when configuring the Project::OSiRiON source code accordingly.

It is recommended you use this specific version of the library, physics behaviour could be different in other versions.

Obtaining the source code

Download the source package from the website:

Unzip the package into a directory of your liking and enter the new directory:

wget http://osirion.org/files/osirion-0.2.1-svn1082-src.tar.bz2
tar xf osirion-0.2.1-svn1082-src.tar.bz2
cd osirion-0.2.1-svn1082-src

Configuring the source code

Enter the new directory and configure the source code:

./configure --with-bullet=/usr/local --enable-static-bullet

If you do not need the client and want to build the dedicated server only you can pass the --without-client option to configure:

./configure --with-bullet=/usr/local --enable-static-bullet --without-client

If configure finds ncurses or pdcurses, the dedicated server will use this library and a have a curses console. To disable curses detection, pass the --without-curses option to configure.

./configure --with-bullet=/usr/local --enable-static-bullet --without-client --without-curses

You can use the --help option to get a list of all available options:

./configure --help

Building the binaries

Compile the source code:

make

The binaries will be built in the src/ subdirectory of the main distribution.

Important: make install is not supported. Results are unpredictable.

Obtaining the game data

Download the game data package from the website:

Unzip the package into the osirion directory. The game data should be located in the data/ subdirectory of the main distribution.

Running

The client and the dedicated server will look for game data in the data subdirectory of the current working directory. Since the binaries are build in the src you will have start them with the src/ prefix.

To start the client:

src/osirion

If the client opens a new window and immediatly close it again, it probably could not find the game data and exited. Check your installation.

To start the dedicated server:

src/osiriond

If you are using windows, the binaries will be called osirion.exe and osiriond.exe.