Project::OSiRiON
Home . Downloads . Documentation . Forum . Wiki . Tracker

Building the development version

The latest release is usually lagging behind current development. If you want to check the latest developments for yourself, you can get the most recent source code and game data from the subversion repository.

Building the development version is very similar to building from source code. The system requirements still apply. Additionally you will need a subversion client.

Obtaining the source code

On linux, you can use the Subversion command line client tool. The following command will create a new subdirectory osirion and download the source code into it.

svn checkout svn://osirion.org/osirion osirion

On windows, you can use the Turtoisesvn SubVersion client to access the SVN repositories. You can download it here:

Enter the new directory:

cd osirion

Obtaining the game data

The game data should be located in the data subdirectory of the main distribution. You can use the game data package from the website or get it from the osirion-data subversion repository:

Run the following command from within the main distribution directory to download the game data into the data subdirectory:

svn checkout svn://osirion.org/osirion-data data

Configuring the source code

Create the configure script:

autoreconf -fi

Create a build directory, If something goes wrong, or building doesn't work any more after updating, you can just delete the build directory and start over without destorying the working copy. Enter the build directory and configure the source code:

mkdir build
cd build
../configure --with-bullet=/usr/local --enable-static-bullet

Use the --help option to get a list of all available options:

../configure --help

Building the binaries

Compile the source code:

make -j2

The -j2 options tells make to use two threads while building, if you have a quad-core cpu, you can use -j4.

The binaries will be built in the src/ subdirectory of the build directory.

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

Leave the build directory:

cd ..

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:

./build/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:

./build/src/osiriond

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

Updating

Once you downloaded the source code and the game data from the subversion repository, there is no need to re-download the entire distribution when there are updates available. You can update your local copy and rebuild it.

Update the source code:

cd osirion
cd build
make clean
cd ..
svn update

Update the game data:

cd data
svn update
cd ..

Rebuild the binaries:

autoreconf
cd build
../configure --with-bullet=/usr/local --enable-static-bullet
make -j2
cd ..

Source data (optional)

There is a seperate repository for files that are used to create the game data, like blender, gimp or vector graphics files. It is not necessary to download these files to play the game, but if you are interested in contributing to the game you might want to get them.

To download the source data from the subversion repository:

svn checkout svn://osirion.org/osirion-data-src data-src

Radiant support files (optional)

You can skip this section if you do not intent to create models with netradiant or gtkradiant 1.5. These files probably won't work with other versions. You can find precompiled netradiant packages here:

These instructions assume gtkradiant is installed in the directory /usr/local/games/netradiant. If it is installed in a different directory on your system, edit these instructions accordingly.

Copy the support files to the gtkradiant folder:

cd data
cd gtkradiant
cp -vr * /usr/local/games/netradiant

Open the file /usr/local/games/netradiant/games/osirion.game in your favourite editor. Look for a line that begins with:

enginepath_linux=

Make sure it points to your osirion data directory. For example, if you checked out the source code into /home/user/osirion, then the data will be in /home/user/osirion/data and the line should look like this:

enginepath_linux="/home/user/osirion/data"

Save the changes.

Organization of the distribution

/doc 					Documentation

	index.html			Documentation content
	attributions.html		List of game data attributions
	installation_release.html	Installing the latest release
	installation_source.html	Building from source code
	installation_develop.html	Building the development version (this file)
	guide.html			Player guide
	manual.html			User manual

/src 					C++ source code

	/audio				audio library
	/auxiliary			auxiliary functions
	/client				osirion client
	/core				game-independent core library
	/dedicated			osiriond dedicated server
	/filesystem			filesystem library
	/game				game-specific functions 
		/base			base game module
		/example		example game module
		/intro			intro game module
	/math				mathematical classes and functions
	/sys				low-level system functions
	/render				render library
	/ui				user interface library

/data					Data files

	/base				game data files
		/bitmaps		essential textures
		/ini			game world definitions
		/maps			3D models (.map format)
		/materials		material definitions
		/models			3D models (.ase and .obj format)
		/particles		particle definitions
		/textures		game world textures

	/gtkradiant			radiant support files