<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <meta name="keywords" content="osirion, free, game, space, trade, combat, freelancer, privateer, opengl, radiant, gpl, creative commons"> <link rel="stylesheet" type="text/css" href="osirion.css"> <link rel="icon" type="image/png" href="http://osirion.org/icon.png"> <title>Project::OSiRiON - Building from source code</title> </head> <body> <div id="page"> <!-- header and menu ======================================= --> <table class = "osirionmenu" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <a href="http://osirion.org"><img class="osirionmenu" src="images/banner.png" alt="Project::OSiRiON"></a> </td> </tr><tr> <td class="osirionmenu"> <a class="osirionmenu" href="http://osirion.org/">News</a> . <a class="osirioncurrent" href="index.html">Documentation</a> . <a class="osirionmenu" href="http://osirion.org/index.php?page=screenshots">Screenshots</a> . <a class="osirionmenu" href="http://osirion.org/index.php?page=downloads">Downloads</a> . <a class="osirionmenu" href="http://osirion.org/forum/">Forum</a> . <a class="osirionmenu" href="http://osirion.org/wiki/">Wiki</a> . <a class="osirionmenu" href="http://osirion.org/tracker/">Tracker</a> </td> </tr> </table> <div id="pagecontent"> <div class="content"> <h1 class="content">Building from source code</h1> <p class="content"> 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. </p> <ul class="content"> <li class="content"><a href="#requirements">Requirements</a> <li class="content"><a href="#building_ubuntu">Building on Ubuntu Linux</a> <li class="content"><a href="#building_windows">Building on Windows</a> <li class="content"><a href="#building_bullet">Builiding the Bullet physics library</a> <li class="content"><a href="#download_source">Obtaining the source code</a> <li class="content"><a href="#configure">Configuring the source code</a> <li class="content"><a href="#building">Building the binaries</a> <li class="content"><a href="#download_data">Obtaining the game data</a> <li class="content"><a href="#running">Running</a> </ul> </div> <!-- div content --> <!-- System requirements =================================== --> <Div class="content"> <h2 class="content" id="requirements">Requirements</h2> <p class="content"> The following packages are required to build the the dedicated server: </p> <ul class="content"> <li class="content">zlib <li class="content"><a href="http://www.bulletphysics.com/">Bullet physics library</a> <li class="content">ncurses or pdcurses (optional) </ul> <p class="content"> Additionally, the client requires: </p> <ul class="content"> <li class="content">libjpeg <li class="content">libpng <li class="content">libSDL 1.2 <li class="content">OpenGL <li class="content">OpenAL or OpenAL Soft <li class="content">Ogg Vorbis </ul> <p class="content"> You will also need gcc, GNU make, automake and libtool. </p> </div> <!-- div content --> <!-- Building on Ubuntu Linux ============================== --> <div class="content"> <h2 class="content" id="building_ubuntu">Building on Ubuntu Linux</h2> <p class="content"> To build the game on Ubuntu, you can install the required tools and dependencies by running the following commands in a terminal window: </p> <pre class="content"> 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 </pre> <p class="content"></p> </div> <!-- div content --> <!-- Building on Windows =================================== --> <div class="content"> <h2 class="content" id="building_windows">Building on Windows</h2> <p class="content"> You can build the game on windows using a MinGW/MSYS environment. You can use the instructions in <a href="http://ingar.satgnu.net/devenv/mingw32/">this document</a> to create a complete environment, capable of building the Project::OSiRiON source code. </p> <p> Note that the current win32 build environment uses <span class="fixed">/local32</span> instead of <span class="fixed">/usr/local</span>. Edit the building instructions accordingly. </div> <!-- div content --> <!-- Building the Bullet physics library =========================== --> <div class="content"> <h2 class="content" id="building_bullet">Building the Bullet physics library</h2> <p class="content"> The engine uses the <a href="http://www.bulletphysics.com/">Bullet Physics Library</a> for physics support. You can download the bullet source code here: <ul class="content"> <li class="content"><a href="http://code.google.com/p/bullet/downloads/list">http://code.google.com/p/bullet/downloads/list</a> </ul> </p> <p class="content"> To download and install the library: </p> <pre class="content"> 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 .. </pre> <p class="content"> If you do not want to install bullet in <span class="fixed">/usr/local</span>, you can edit the <span class="fixed">--prefix</span> option here. Edit the the <span class="fixed">--with-bullet</span> option when configuring the Project::OSiRiON source code accordingly. </p> <p class="content"> It is recommended you use this specific version of the library, physics behaviour could be different in other versions. </p> </div> <!-- div content --> <!-- Obtaining the source code ===================================== --> <div class="content"> <h2 class="content" id="download_source">Obtaining the source code</h2> <p class="content"> Download the source package from the website: </p> <ul class="content"> <li class="content"><a href="http://osirion.org/files/osirion-latest-src.tar.bz2">osirion-latest-src.tar.bz2</a> </ul> <p class="content"> Unzip the package into a directory of your liking and enter the new directory: </p> <div class="fixed"> wget http://osirion.org/files/osirion-0.2.2-svn1195-src.tar.bz2<br> tar jxf osirion-0.2.2-svn1195-src.tar.bz2<br> cd osirion-0.2.2-svn1195-src<br> </div> <p class="content"></p> </div> <!-- div content --> <!-- Configuring the source code =================================== --> <div class="content"> <h2 class="content" id="configure">Configuring the source code</h2> <p class="content"> Enter the new directory and configure the source code: </p> <pre class="content"> ./configure --with-bullet=/usr/local --enable-static-bullet </pre> <p class="content"> If you do not need the client and want to build the dedicated server only you can pass the <span class="fixed">--without-client</span> option to configure: </p> <pre class="content"> ./configure --with-bullet=/usr/local --enable-static-bullet --without-client </pre> <p class="content"> 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 <span class="fixed">--without-curses</span> option to configure. </p> <pre class="content"> ./configure --with-bullet=/usr/local --enable-static-bullet --without-client --without-curses </pre> <p class="content"> You can use the <span class="fixed">--help</span> option to get a list of all available options: </p> <pre class="content"> ./configure --help </pre> <p class="content"></p> </div> <!-- div content --> <!-- Building the binaries ========================================== --> <div class="content"> <h2 class="content" id="building">Building the binaries</h2> <p class="content"> Compile the source code: </p> <pre class="content"> make </pre> <p class="content"> The binaries will be built in the <span class="fixed">src/</span> subdirectory of the main distribution. </p> <p class="content"> <b>Important</b>: <span class="fixed">make install</span> is not supported. Results are unpredictable. </p> </div> <!-- div content --> <!-- Obtaining the game data ======================================= --> <div class="content"> <h2 class="content" id="download_data">Obtaining the game data</h2> <p class="content"> Download the game data package from the website: </p> <ul class="content"> <li class="content"><a href="http://osirion.org/files/osirion-latest-data.zip">osirion-latest-data.zip</a> </ul> <p class="content"> Unzip the package into the osirion directory. The game data should be located in the <span class="fixed">data/</span> subdirectory of the main distribution. </p> </div> <!-- div content --> <!-- Running ======================================================= --> <div class="content"> <h2 class="content" id="running">Running</h2> <p class="content"> The client and the dedicated server will look for game data in the <span class="fixed">data</span> subdirectory of the current working directory. Since the binaries are build in the <span class="fixed">src</span> you will have start them with the <span class="fixed">src/</span> prefix. </p> <p class="content"> To start the client: </p> <pre class="content"> src/osirion </pre> <p class="content"> 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. </p> <p class="content"> To start the dedicated server: </p> <pre class="content"> src/osiriond </pre> <p class="content"> If you are using windows, the binaries will be called <span class="fixed">osirion.exe</span> and <span class="fixed">osiriond.exe</span>. </p> </div> <!-- div content --> <!-- footer ================================================ --> </div> <!-- div pagecontent --> <div id="pagefooter"> <div class="floatright"> <a href="http://validator.w3.org/check?uri=referer"> <img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Strict" height="31" width="88"> </a> </div> <p> Copyright © 2007-2012 Project::OSiRiON </p> </div> </div> </body> </html>