This is a guide explaining how to build the project on various platforms. The source code can be downloaded from SVN as described here. Note that only the content of trunk is necessary. The source themselves reside in the src subdirectory while data are loaced in the output subdirectory.

Building for Windows

The development on Windows was done using Visual Studio 2008. To start it go to the Win32 directory and open Ocerus.sln. Visual Studio will load the solution and the project files. To build the application just build the _Ocerus project. The Develop configuration is recommended. All dependencies will build automatically. Then right-click the _Ocerus project, select Properties and Debugging and set Working Directory to the location of the output directory. Now you can run the _Ocerus project and the application will start.

There are several configurations available while building the project. The basic one is Develop which is used (as the name suggests) for the development. It enables some of the debugging tools together with optimizations, so that the application runs smooth. The Debug configuration is used for debugging where Develop fails. It is generally very slow but the memory and breakpoints are more consistent. The Release configuration is meant for the final product. It does more optimizations then Develop, so the program is a bit faster.

The Deploy configuration creates binaries without the editor support. These are then used to deploy the game itself. The binaries are copied into the deploy folder where the editor can access it. The deploying process is then initiated directly from the editor's main menu. It grabs the game data, combines it with the engine binaries for the selected platform and copies everything into the output folder.

Building for Linux

This part describes how to install Ocerus on linux system. Unlike Ocerus Windows version, the Linux version compiles with shared system libraries in mind. This however means that you need the following libraries in the system:

All of these libraries are opensource and most of them are probably in your distribution. You also need the following tools:

Ubuntu Linux 10.10

The following step-by-step guide is written for Ubuntu Linux 10.10:

1. Install necessary tools

sudo apt-get install build-essential cmake cmake-curses-gui

2. Install CEGUI

Unfortunatelly CEGUI in version 0.7.1 is not present in most of linux distributions, so you need to compile it yourself. But first you need to install CEGUI build dependencies:

sudo apt-get install libfreetype6-dev libpcre3-dev libxml2-dev \
                     libglew1.5-dev libdevil-dev libpng-dev \
                     libmng-dev libxpm-dev libxcursor-dev \
                     libxxf86vm-dev

Then you need to extract CEGUI sources to a directory. You can find the CEGUI-0.7.1.tar.gz file on the CD:

tar xzf CEGUI-0.7.1.tar.gz
cd CEGUI-0.7.1

After that you need to configure CEGUI with the following command:

./configure --enable-devil \
            --enable-libxml \
            --disable-tinyxml \
            --disable-expat \
            --disable-lua-module \
            --disable-ogre-renderer \
            --enable-opengl-renderer

If you do not want to install the application to system paths (and you should not want to) you can define installation prefix with --prefix parameter:

./configure --prefix=/usr/local \
            --enable-devil \
            --enable-libxml \
            --disable-tinyxml \
            --disable-expat \
            --disable-lua-module \
            --disable-ogre-renderer \
            --enable-opengl-renderer

Then just run:

make
make install

3. Install other dependencies

sudo apt-get install libois-dev libboost-system-dev \
                     libboost-filesystem-dev libboost-regex-dev \
                     libexpat-dev libsdl1.2-dev libunittest++-dev

4. Compile OCERUS

Ocerus uses the CMake build system that allows to compile projects out of sources, so your build directory is different than your source directory. So first create your build directory.

mkdir ocerus-build
cd ocerus-build

Then you have to configure the project. The configuration process looks for all the dependencies. If you installed CEGUI to a different directory, you need to tell CMake about it. CEGUI uses pkg-config to propagate library information so you need to setup PKG_CONFIG_PATH environment variable. For instance, if your installation prefix was /usr/local, you need to set PKG_CONFIG_PATH with the following command:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

After that you are ready to configure the project. Use path to ocerus source dir as an argument to cmake command:

cmake /mnt/cdrom/sources

If you want to change some build options, you can use ccmake command:

ccmake /mnt/cdrom/sources

Finally type make:

make

After the project was build, you can immediatelly run it by typing:

./ocerus-main