Compiling without the supplied 3rd party libraries

From Rigs of Rods Wiki

Jump to: navigation, search

Contents

Summary

This is the first step needed for packaging RoR so it can be included in a linux repository, since this will allow you to package and update each component of RoR individually. The motivation for writing this article is that some devs (including the initial author of this page) feel that dealing with the current cmake system is too cumbersome as the 3rd party library should rarely if ever be altered, and thus not included in the source tree.

Hopefully a script can released to automate the process of retrieving and compiling all these sources.

This Page assumes that you have already been able to compile RoR and have all the required supporting libraries already installed but are still compiling all the libraries included in SVN.

Issues

  • The Caelum library that RoR Currently uses is ~3 years old and appears to be an early release of the system. This old version obviously has no more support for it and cannot be obtained. The problem lies in that the current versions have fundamentally different structure compared to the version RoR uses.

Versions

Libraries included with RoR:

  • Angelscript: AngelScript SDK 2.16.3 (to be updated!)
  • Caelum: Caelum-2006-11-09 (stone old, to be updated)
  • lua-5.1.2 1
  • mofilereader: latest (http://code.google.com/p/mofilereader/)
  • mygui: svn (stripped and platform stuff merged)
  • mysocketw: latest, patched!
  • ogre: 1.6.4
  • OIS: cvs latest version (keep in mind that they develop in a branch) 1
  • openal-soft-1.8.466 1
  • paged geometry: old version, need to update to svn head

1 library already included in some linux distributions, but still needs to be compiled for Windows.


Libraries

These sections are listed in the order they should be done. Ogre should be done first since several of the other libraries require that it is installed such as Caelum, MyGUI, and Paged Geometry


Ogre

Lets Start off with Ogre since it is requied by other libraries

  1. Goto http://www.ogre3d.org/download/source and retreive the latest source code (1.6.4 at the time of writing) This will take you to a Sourceforge download page.
  2. Unpack the tarball
  3. Enter the new directory (ogre)
  4. configure ogre (./configure --disable-ogre-demos) use ./configure --help to see the configuration options, --enable-openexr is another option but the plug in is not used by RoR
  5. make the target
  6. install source (sudo make install)

scripting

OGRE_BASE=ogre
OGRE_DL=$OGRE_BASE-v1-6-4.tar.bz2
INSTALL_DIR=`pwd`/$OGR_DIR
wget http://downloads.sourceforge.net/project/ogre/ogre/1.6.4/$OGRE_DL?use_mirror=cdnetworks-us-1
tar xjf $OGRE_DL
cd $OGRE_BASE
./configure --disable-ogre-demos
# adjust to fix your number of CPUs do 2x #CPU cores
make -j4 --silent
 
#enter your password
sudo make install
 
cd -


OIS

on ubnuntu 9.10 type

sudo apt-get install libois-dev libois-1.2.0

MyGUI

  1. get the source from MyGUI svn
  2. go to the new directory
  3. configure my-gui with cmake -DMYGUI_BUILD_SAMPLES:BOOL=OFF -DMYGUI_INSTALL_SAMPLES:BOOL=OFF .

svn co https://my-gui.svn.sourceforge.net/svnroot/my-gui/trunk my-gui
cd my-gui
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DMYGUI_BUILD_SAMPLES:BOOL=OFF -DMYGUI_INSTALL_SAMPLES:BOOL=OFF .
make -j4 --silent
sudo make install
cd -

Paged Geometry

this one needs to patch the source to remove an error, using 1.05 uses the following patch: Media:Pg.patch if using the scripts it will automatically be downloaded for you

wget http://www.alsbonsai.com/john/PagedGeometry_v1.05_Linux.zip
unzip PagedGeometry_v1.05_Linux.zip
cd PagedGeometry
wget http://wiki.rigsofrods.com/images/5/53/Pg.patch
patch -p0 -d include < Pg.patch
rm Pg.patch
cmake -DCMAKE_BUILD_TYPE:STRING=Release .
make -j4 --silent
sudo cp source/libPagedGeometry.so /usr/local/lib/
sudo mkdir /usr/local/include/Paged
sudo cp include/* /usr/local/include/Paged/
cd -

since there is no uninstall script run this to remove PagedGeometry

sudo rm /usr/local/lib/libPagedGeometry.so
sudo rm -rf /usr/local/include/Paged

Caelum

note the build system for Caelum is scons, on ubuntu 9.10 install this with

sudo apt-get install scons

wget http://downloads.sourceforge.net/project/caelum/caelum/0.5/Caelum-0.5.0.zip?use_mirror=hivelocity
unzip Caelum-0.5.0.zip
cd Caelum-0.5.0/
scons -j4 --silent .
 
#install files
sudo cp libCaelum.a /usr/local/lib/
sudo mkdir /usr/local/include/Caelum
sudo cp main/include/* /usr/local/include/Caelum/
cd -

since there is no uninstall script run this to remove Caelum

sudo rm /usr/local/lib/libCaelum.a
sudo rm -rf /usr/local/include/Caelum

MySocketW

This needs another patch Media:Socketw.patch to fix socketw for newer compilers

wget http://www.digitalfanatics.org/cal/socketw/files/SocketW031026.tar.gz
tar xzf SocketW031026.tar.gz
cd SocketW031026/
wget http://wiki.rigsofrods.com/images/c/c0/Socketw.patch
patch -p0 -d src < Socketw.patch
rm Socketw.patch
make -j8 --silent shared
sudo make install
cd -

since there is no uninstall script run this to remove SocketW

sudo rm /usr/local/lib/libSocketW*
sudo rm /usr/local/include/SocketW.h
sudo rm /usr/local/include/sw_base.h
sudo rm /usr/local/include/sw_config.h
sudo rm /usr/local/include/sw_inet.h
sudo rm /usr/local/include/sw_internal.h
sudo rm /usr/local/include/sw_ssl.h
sudo rm /usr/local/include/sw_unix.h

LUA

You need version 5.1+ which is provided by ubuntu 9.10

sudo apt-get install liblua5.1-0 liblua5.1-0-dev

AngelScript

TODO

MoFilereader

This needs another patch Media:MoFR.patch to fix socketw for newer compilers


#get moFileReader
wget http://mofilereader.googlecode.com/files/moFileReader.0.1.2.zip
mkdir mo
cd mo
unzip ../moFileReader.0.1.2.zip
 
#apply needed patch
wget http://wiki.rigsofrods.com/images/1/1f/MoFR.patch
patch -p0 -d src < MoFR.patch
rm MoFR.patch
 
#build moFileReader library
cd build/
cmake -DCMAKE_BUILD_TYPE=Release -DCOMPILE_DLL=ON .
make -j8
cd ../
 
#install mo FileReader
sudo cp lib/libmoFileReader.so /usr/local/lib/
sudo cp include/* /usr/local/include/
cd ../

since there is no uninstall script run this to remove SocketW

sudo rm /usr/local/lib/libmoFileReader.so
sudo rm /usr/local/include/moFileConfig.h
sudo rm /usr/local/include/moFileReader.h

OpenAL

The correct version of open al is provided by ubuntu 9.10

sudo apt-get install libopenal1 libopenal-dev
Personal tools