Compiling 3rd party libraries
From Rigs of Rods Wiki
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.
You can find shell scripts that summarize all steps into one script here: Ubuntu/Debian/Mint
Libraries required for RoR:
- AngelScript: SDK 2.22.1
- Caelum: version 0.6.1 at least, has to be compatible with Ogre 1.7/1.8
- mygui: svn revision 4344 (specific SVN version)
- mysocketw: latest
- ogre: 1.7.x or 1.8.x
- OIS: 1.3 (any version >= 1.2 should work)
- openal-soft >= 1.8.466 (older versions could work)
- paged geometry: latest
- wxWidgets >= 2.6 (older versions could work)
- replace -j2 parameter after make with the appropriate CPU core number (if unsure use the number which "grep -c processor /proc/cpuinfo" prints)
- when using sudo, be prepared to enter your password. Sudo is used to install the compiled software most of the time.
- on gentoo you need to change the installation prefix of all packages to /usr instead of the default /usr/local (EDIT: not really, see this page for more info. At that page, slightly different versions are reported to work, too)
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
it is recommended to create a dependencies directory and work in that:
mkdir ~/ror-deps cd ~/ror-deps
You will need freeimage for Ogre. Its not a direct Dependency of RoR. if your distribution does not have a package for freeimage, you have to compile it by hand:
wget http://sourceforge.net/projects/freeimage/files/Source%20Distribution/3.15.0/FreeImage3150.zip/download -O FreeImage3150.zip unzip FreeImage3150.zip cd FreeImage make -j2 sudo make install cd ..
sudo apt-get install libfreeimage-dev
Let's start off with Ogre since it is required by other libraries.
Ogre3D is the graphic engine RoR uses.
hg clone https://bitbucket.org/sinbad/ogre -b v1-8 cd ogre cmake -DFREETYPE_INCLUDE_DIR=/usr/include/freetype2/ \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DOGRE_BUILD_SAMPLES:BOOL=OFF . make -j2 sudo make install cd ..
DON'T FORGET THE " ." after "...BOOL=OFF"
Handles user input, included in some distributions' repositories.
build latest SVN:
svn co https://wgois.svn.sourceforge.net/svnroot/wgois/ois/trunk/ ois-trunk cd ois-trunk bash bootstrap ./configure make -j2 sudo make install cd ..
- you may need to comment out "export WANT_AUTOMAKE='1.7'" to "#export WANT_AUTOMAKE='1.7'" in the file bootstrap
sudo apt-get install libois-dev
svn co https://my-gui.svn.sourceforge.net/svnroot/my-gui/trunk my-gui -r 4344 cd my-gui cmake -DFREETYPE_INCLUDE_DIR=/usr/include/freetype2/ \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DMYGUI_BUILD_DEMOS:BOOL=OFF \ -DMYGUI_BUILD_DOCS:BOOL=OFF \ -DMYGUI_BUILD_TEST_APP:BOOL=OFF \ -DMYGUI_BUILD_TOOLS:BOOL=OFF \ -DMYGUI_BUILD_PLUGINS:BOOL=OFF . make -j2 sudo make install cd ..
For Ubuntu 12.04 ppa is available: http://www.ubuntuupdates.org/package/getdeb_games/precise/games/getdeb/mygui
wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu precise-getdeb games" >> /etc/apt/sources.list.d/getdeb.list' sudo apt-get update sudo apt-get install libmygui3 libmygui-dev
since there is no uninstall script run this to remove PagedGeometrygit clone https://github.com/Hiradur/ogre-paged.git cd ogre-paged cmake -DCMAKE_BUILD_TYPE:STRING=Release \ -DPAGEDGEOMETRY_BUILD_SAMPLES:BOOL=OFF . make -j2 sudo make install cd ..
sudo rm /usr/local/lib/libPagedGeometry.so sudo rm -rf /usr/local/include/Paged
hg clone -r 3b0f1afccf5cb75c65d812d0361cce61b0e82e52 https://caelum.googlecode.com/hg/ caelum cd caelum cmake -DCaelum_BUILD_SAMPLES:BOOL=OFF . make -j2 sudo make install cd .. # important step, so the plugin can load: sudo ln -s /usr/local/lib/libCaelum.so /usr/local/lib/OGRE/
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
MySocketWNOTE: You have to install the OpenSSL development package before you compile. In Ubuntu and Debian run
, in CentOS runsudo apt-get install libssl-dev
.yum install libssl-dev
git clone https://github.com/Hiradur/mysocketw.git cd mysocketw make -j2 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_*.h
OpenAL usually is provided by your distribution's repository.
sudo apt-get install libopenal1 libopenal-dev
RoR needs wxWidgets version 2.6 at least. Should be available in most repositories.
sudo apt-get install libwxgtk3.0-dev
If you get errors running the make command on e.g. Debian and Ubuntu, you might need to change the makefile. Uncomment the lines marked below:
git clone https://github.com/imperative/CommunityHydrax.git cd CommunityHydrax # make fails on some distributions. If that is the case, use this command instead: # make -j2 PREFIX=/usr/local make -j2 sudo make install cd ..
mkdir angelscript cd angelscript wget http://www.angelcode.com/angelscript/sdk/files/angelscript_2.22.1.zip unzip angelscript_*.zip cd sdk/angelscript/projects/gnuc SHARED=1 VERSION=2.22.1 make -j2 --silent # sudo make install fails when making the symbolic link, this removes the existing versions rm -f ../../lib/* sudo SHARED=1 VERSION=2.22.1 make install #cleanup files made by root rm -f ../../lib/* cd ../../../../../
LUA scripting support was removed from Rigs of Rods in SVN revision 1899.
You only need to install this if you use an older Rigs of Rods revision.
You need version 5.1+ which is provided by many distributions.
sudo apt-get install liblua5.1-0 liblua5.1-0-dev
Verification of the instruction on this page
- Ubuntu 14.04.1 64 bit -- User:Hiradur 30th Dec, 2014
- Ubuntu 12.04 64 bit --User:emgiezet 14:14, 9 Oct 2012 (GMT+1) - cannot install MyGUI, libois (OIS) is available from apt-get repo
- Ubuntu 11.10 64 bit --User:Blackthorn 22:37, 01 June 2012 (GMT-7) plugins.cfg is in the wrong location, it can be found in /ror-trunk/tools/linux/binaries/ it should be in /ror-trunk/bin/
- Ubuntu 10.4 32 bit --tdev 00:13, 24 June 2010 (UTC)
- Ubuntu 10.10 64 bit --User:berserk9779 09:09 25 January 2011 (GMT-3)
All dependencies compile fine at the time of writing, but another issue prevents from me from running the game and properly test things out at this time.
- Ubuntu 10.04 64 bit --User:ambiguous 19:05 30 January 2011 (GMT)
All dependencies compiled fine, but RoR svn version 1603 had a broken selector/menu, but 0.37.126 from sourceforge worked.
- Gentoo 64 bit (x86_64) no-multilib, 2.6.36-gentoo-r5
- Gentoo 32 bit 3.2.12-gentoo - more details at User:mudrd8mz
- Linux Mint 10 (Ubuntu 10.10) 64 bit--User:KingBeetle 03:04 03 March 2011 (GMT-5)
- Had to change install prefix in makefile for Hydrax from /usr to /usr/local
- Debian Squeeze (Debian 6) 64 bit User:woozy 13 April 2011:
- Also had to change install prefix in makefile for Hydrax from /usr to /usr/local. Edited the wiki to incorporate the change
- Debian Squeeze (/etc/debian_version "6.0.3", amd64, x86_64 GNU/Linux)
- User:beardy Sat Jan 28 18:42:15 CET 2012 Building instructions worked.