Compiling Sources under Linux
From Rigs of Rods Wiki
RoR is known to compile and work under:
- Ubuntu (8.10, 9.10, 10.04) 32 and 64 bit
- Gentoo 2010 32 and 64 bit
- Debian Lenny 32 bit
- Arch Linux
(please extend this list)
Precompiled packages for the game (0.38.66) and it's depedencies are available in archlinuxgr repo.
Add to /etc/pacman.conf:
[archlinuxgr] SigLevel = Never Server = http://archlinuxgr.tiven.org/archlinux/$arch
Then update and install rigsofrods:
pacman -Sy rigsofrods
Prepare ~/.rigsofrods directory:
mkdir ~/.rigsofrods cp -r /opt/rigsofrods/bin/skeleton/* ~/.rigsofrods
Run the configurator first and then the game (Included .desktop launchers in /usr/share/applications).
Getting the required build dependencies (distribution specific)
Ubuntu 10.04 lucid lynx (and Ubuntu 12.04.1 and 13.04)
IMPORTANT: You need to compile some components by hand, like ogre and mygui. Look below at "Compiling 3rd party libraries"
sudo apt-get install automake subversion cmake build-essential libfreetype6-dev libzzip-dev nvidia-cg-toolkit \ libwxgtk2.8-dev libfreeimage-dev libgl1-mesa-dev libxrandr-dev libx11-dev libxt-dev libxaw7-dev \ libglu1-mesa-dev libxxf86vm-dev libboost-dev pkg-config uuid-dev libuuid1 libgtk2.0-dev liblua5.1-0-dev \ libopenal-dev scons cmake-qt-gui libboost-all-dev libcurl4-openssl-dev doxygen mercurial
mkdir /etc/portage echo "media-libs/freeimage ~x86" >> /etc/portage/package.keywords echo "media-libs/freeimage" >> /etc/portage/package.unmask emerge -av cmake devil boost nvidia-cg-toolkit subversion wxGTK freeimage zziplib eselect wxwidgets set 1
Compiling 3rd party libraries
IMPORTANT: Please install all the software that is not shipped within your distribution from hand. Please read Compiling 3rd party libraries, this is required to fulfill the required dependencies.
Also, please note that the ogre version that is shipped within most distributions is too old. Read the above link to get instructions on how to install the correct version.
check-out the subversion trunk somewhere:
hg clone http://hg.code.sf.net/p/rigsofrods/codehg ror-codehg cd ror-codehg
There are several different ways to configure RoR, either a Command Line Interface (aka CLI) or through a GUI interface. CLI the most straight forward if you are only interested in compiling standard RoR, this is the recommended method.
you can also use 'ccmake' or 'cmake -DROR_USE_<name>="TRUE"'
for example using the command line cmake:
cmake -DROR_USE_MYGUI="TRUE" \ -DROR_USE_OPENAL="TRUE" \ -DROR_USE_LUA="TRUE" \ -DROR_USE_SOCKETW="TRUE" \ -DROR_USE_MOFILEREADER="TRUE" \ -DROR_USE_PAGED="TRUE" \ -DROR_USE_CAELUM="TRUE" \ -DROR_USE_ANGELSCRIPT="TRUE" .
GUIThe cmake GUI might not be provided on all in systems.
To start the cmake gui run:
- press "Configure"
- select "Unix Makefiles" and "Use default native compilers" (that are the default options) and press "Finish"
- press "Configure" again until all list entries are white
- look at the log window for information and errors (look for red lines with " > " in front)
- enable the components you want to compile in: ROR_*
- press "Configure" again until the "Generate" button is click-able
- press "Generate"
- close cmake-gui
To start building simply run:
Note: For those not familiar with make you can add a -jx flag where x is the number of simultaneous build jobs you want. Good measure is either (Number of Cores + 1) or (Number of Cores * 2), depending on how much RAM your system has. 8 jobs can use up to 6GB of memory on a 64bit machine, but only 2GB on a 32 bit machine
Updating existing sources
if you already got the sources and just want to update, follow the steps below:
cd ror-codehg hg pull hg update rm -f CMakeCache.txt rm -rf CmakeFiles/ cmake-gui . make -j3
if you are done compiling you may want to continue to read Starting RoR under Linux