Compiling Server

From Rigs of Rods Wiki

Jump to: navigation, search

This is a short guide how to checkout, compile and start the RoR multiplayer server :)

Contents

windows

required software

building

  • Create an empty directory anywhere where you have enough free disk space (~35 MB): C:\dev\ror-server
  • Right-click on the directory, select "SVN Checkout"
    • In the URL field, enter: https://rorserver.svn.sourceforge.net/svnroot/rorserver/trunk and hit OK

Then start cmake: START->Programs->CMake->cmake-gui(beta)

  • Configure cmake:
    • "Where is the source code": C:\dev\ror-server
    • "Where to build the binaries": C:\dev\ror-server
    • Click the "Configure" button. Choose "Visual Studio" and dont touch the other options.
    • Everything should turn red, thats ok.
    • Click the "Generate" button; some red text may come up, for now, don't worry about it.
  • open C:\dev\ror-server\rorserver.sln with visual studio and compile it
  • the result binaries are in C:\dev\ror-server\bin

Linux

install required build dependencies

  • for debian x86 (lenny) also for ubuntu 8.10 - 10.4:
    • sudo apt-get install subversion build-essential cmake

building

# create rorserver user (required!) with no login rights:
useradd rorserver -s /bin/false
# then get the sources, compile and install them:
svn co https://rorserver.svn.sourceforge.net/svnroot/rorserver/trunk rorserver-trunk
cd rorserver-trunk/
cmake -DCMAKE_INSTALL_PREFIX:STRING=/usr .
make -j3 && sudo make install

running a server under linux

go to /etc/rorserver and look at the .cfg files. One file represents one server.

Edit the configs, then start the service with

/etc/init.d/rorserver start


automatically restart crashed servers

the rorserver init script will check if a server is running before starting it up. Thus its safe to just execute:

/etc/init.d/rorserver start

via a cron job. It will just start a server, if its process is not running anymore (crashed).

Personal tools