Contribute > Developing Code

  • Private Changes

    Anyone can download the source code for Open Rails and make changes to suit themselves and create a personal version. Instructions for this are below.

  • Public Changes

    If your changes might be useful to others, then we encourage you to submit them for inclusion into the product. We will respond to all submissions and give credit in the project record for submissions that are included.

  • SVN Version Control System

    The Open Rails project uses Apache Subversion (often abbreviated to SVN) as the versioning and revision control system for our software. Revisions are archived in a repository and can be compared, restored and merged, so that versions are safe and several developers can work independently without (too much) conflict.

    The Open Rails source code is managed on our SVN server:
    Read-only access is provided from the guest login:

    • Username = orpublic
    • Password = orpublic

    From your PC, you can use an SVN client such as TortoiseSVN to access the files, or simply view the repository from a web browser.

    P.S. - Our thanks to UKTrainSim.com for donating the SVN server space and admin services.

  • Accessing The Code With TortoiseSVN

    If you are not familiar with SVN, please study the TortoiseSVN Help first.

    On your desktop,

    1. From Windows Explorer, choose a folder to hold the project code.
    2. Right click on the folder, select SVN Checkout...
    3. In the Checkout dialog box, enter the URL of repository : http://svn.uktrainsim.com/svn/openrails/trunk
    4. Enter Username :  orpublic
    5. Enter Password :  orpublic
    6. Check that the Checkout directory : shows the folder where you want the files extracted to - e.g. C:\Users\Wayne\Desktop\openrails
    7. Click OK.

    The main folders in the repository are:

    • Addons - accessory files shipped with the installation package
    • Architecture - an incomplete experiment in restructuring the program
    • Archive - abandoned code
    • Documentation - operations manual and other documentation
    • Program - empty space for executables once they are compiled
    • Source - the principal source code files
    • SVNTesting - sandbox for training new users on SVN
  • Compiling the Open Rails Project

    To compile and debug the Open Rails source code, ensure you have the following Microsoft products installed:


    After you have downloaded the code:

    1. Open folder Source
    2. Double click on file ORTS.sln to launch Visual Studio with the Open Rails project open
    3. From the Visual Studio menu bar, select Build > Rebuild Solution
    4. On the status bar (lower left), wait for the message 'Rebuild All succeeded'

    The executable files have now been re-built and placed in your empty Program folder.

  • Running the RunActivity.exe code in debug mode

    Note: When debugging you will bypass the normal start menu and must specify an activity on the command line.

    On the Visual Studio menu bar,

    1. Select View > Solution Explorer
    2. In the Solution Explorer box (on the right), right click on RunActivity > Properties
    3. Use the Debug tab (on the left) to open the Debug Window.
    4. Into the "Command line arguments", enter the path of the activity that you want to run: e.g. "c:\personal\msts\routes\lps\activities\ls1.act". Use quotes to cope with spaces in the path.
    5. Below this, check the checkbox for "Enable native code debugging"
    6. Press F5 to run RunActivity.exe using your activity.
  • Submitting A Change

    A change is best packaged as a "patch" file - a file which contains change instructions to alter the current version of Open Rails code to include your changes. Patches are short and readable. Also, thanks to its smart features, SVN can apply your patch successfully even if some of the Open Rails code has been changed by someone else in the meantime.

    If you are offering a fix to a Bug Report, then simply attach your patch file to a post on the Bug Tracker explaining what you have done.

    If you are offering an improvement or a new feature, then attach your file to a post on the Elvas Tower forum Open Rails Discussion. It would be helpful to post a message before you start work to give us some idea of your intentions.

    We cannot promise that your changes will make it into the code, but show us what you can do and then we can talk about it.