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

General

Rorserver uses the cmake configuration system which generates make files/Visual Studio solution files. You can use cmake to specify options for building rorserver, e.g. RORSERVER_GUI (requires wxWidgets), RORSERVER_WITH_ANGELSCRIPT (recommended for use of scripts with the server) and RORSERVER_WITH_WEBSERVER.

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: svn://svn.code.sf.net/p/rorserver/code/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 don't touch the other options.
    • Everything should turn red, that's 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 (e.g. using Build/Build Solution)
  • the result binaries are in C:\dev\ror-server\bin

Here is a video made by xGRAVEKILLERx: http://www.youtube.com/watch?v=fv9OHDwFICI&context=C40841f2ADvjVQa1PpcFNqYajus_l62QL69zqkNd0FRzFc686tvX0=

Linux

install required build dependencies

You will need to install compilers with their dependencies, cmake and subversion:

  • 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 svn://svn.code.sf.net/p/rorserver/code/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).


About Rigs of Rods

    Rigs of Rods is a unique soft body physics simulator.


Some Tools


Partners

SourceForge.net

Follow us

Twitter youtube Facebook RSS Feed


impressum