Build from Source

Introduction

The RoadRunner library is written in C/C++. It has been compiled successfully on Windows using Visual Studio and Borland compilers, and on Linux and Mac OS X, using the gcc compiler. Binary distributions are available for Windows, Mac, and Linux.

These directions are provided for you to successfully compile and link the RoadRunner library on your platform.

Choose the instructions for your platform:

For each individual compiler some steps, or variable in the procedure may need a special setting or a tweak. Such tweaks are found on the page associated with the platform and compiler in question. That said, before executing the steps please take a look at the information below to become familiar with the libRoadRunner code base.

The Source

The source code for RoadRunner is managed in a Git repository located on GitHub. The build instructions will assume that you have cloned the code from the default branch, which has the address:

git clone https://github.com/AndySomogyi/roadrunner.git

Any standard git client can be used to clone the code repository.

Optionally you can download a release version of the source code without git.

https://github.com/AndySomogyi/roadrunner/releases
Developers

If you would like to contribute to the roadrunner project, please first fork the code on GitHub and submit pull requests to submit new code.

The ThirdParty libraries

RoadRunner depends on several ThirdParty libraries.

git clone https://github.com/AndySomogyi/roadrunner_thirdparty

On Windows, all such necessary dependencies are satisfied by the process described for Visual Studio, while on Linux, various ThirdParties may need to be installed separately. This will be noted in the build instructions as needed.

Build process overview

The final ‘product’ of building the RoadRunner source is binary libraries and applications. In short, the libraries will be

  • ThirdParty libraries – various C and C++ libs
  • RoadRunner C++ library
  • RoadRunner SWIG Python-API library (Bindings for Python)
  • (Optionally) RoadRunner C-API library (Wrapper for the C++ library)

Useful applications that will be built are:

  • RoadRunner command line application: rr
  • RoadRunner command line application: rr_c (application using the C-API of roadrunner)

In short, the whole build process will require the following steps

  1. Code is cloned from the repository.
  2. CMake is used to create Build Files for your particular compiler. At least two sets of build files are required to completely build Roadrunner, A) ThirdParty libs build files, and B) build files for the RoadRunner library and RoadRunner applications.
  3. The ThirdParty libraries are built and installed using a compiler, by the generated build files from step 2.
  4. RoadRunner library, and associated applications are built.

Get started on building and compiling

The instructions linked at the top of this page will go through the process of setting up a development environment using the Visual Studio compiler. Specific tweaks for any compiler can found be on the page associated with the relevant compiler. See below for links to specific compilers.

Notes on Generating or updating the API Documentation

The documentation is automatically generated using comments in the individual source files. To update the documentation, individual sources files must be modified. To generate new documentation, follow these steps:

1) Download and install Doxygen from

http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc

2) Download and install LateX

http://miktex.org/download (windows), otherwise install LateX for your OS

3) Download and install sphinx. Follow the instructions on their install page for your OS.

http://sphinx-doc.org/latest/install.html

Instructions for Developers to re-generate all the docs from the current code base

All built documentation is stored at:

https://github.com/sys-bio/roadrunner/tree/gh-pages

If you already have cloned the gh-pages in the past then just do a git pull in the gh-pages directory, otherwise you will need to create a clone for yourself, use the command:

git clone -b gh-pages https://github.com/sys-bio/roadrunner.git gh-pages

Clone the gh-pages branch into src along side roadrunner, ie

src —
gh-pages
roadrunner

 You can either generate the docs from the command line or from the doxygen wizard.

Command Line

To build a particular set of docs, follow the instructions (make sure doxygen is on your path):
#cpp_api_docs
cd ~/src/roadrunner/source
doxygen.exe doxygen.conf
#c_api_docs
cd ~/src/roadrunner/wrappers/C
doxygen.exe core_c_api.doxy
#c_plugin_api_docs
cd ~/src/roadrunner/plugins/wrappers/C/
doxygen.exe Doxyfile_c_api.doxy
#c++_plugin_api_docs
cd ~/src/roadrunner/plugins/source
doxygen.exe Doxyfile_cpp_api.doxy
#SWITCH CONSOLE the following works in MSYS ONLY on windowd
#sphinx pydoc
cd ~/src/roadrunner/wrappers/SWIGPython/doc
make html

Using Doxygen wizard

When you want to change options, or if you are more comfortable with the Doxygen GUI application, follow these instructions:

2) Run Doxygen wizard (the executable is usually called doxywizard)

3) Go to File->Open and select the docs you want to create, eg src\roadrunner\wrappers\C\core_c_api.doxy

5) Select the Run tab and click on the Run doxygen button, this will generate the docs in src\gh-pages\c_api_docs. Similar arguments apply to the other docs.

7) The documentation has been generated into gh-pages. Use git commit and then git push on the gh-pages subdirectory to update the online documentation.

git commit -am “My message[ci skip]”
git push

Old SVN tip preserved for posterity

8) Tip: You might find that a new html file generated from doxygen does not render in the browser. In order to make the html render correctly, make sure you add the text/html mime type to the file. Under TortoiseSVN, select the file and choose properties from the TortoiseSVN popup menu. Select svn:mime-type in the property type and add text/html to the property value. Select OK and commit the change. The html file will now render correctly.

Alternatively you can make SVN do this for you by editing the SVN configuration file. To do this, select Settings under TortoiseSVN. In the general tab (usually the first you’ll see) there is a button marked Edit towards the right hand corner, select this and the config file will be loaded into your favourite editor. In the config file locate the line, miscellany and uncomment the line marked: enable-auto-props = yes. Finally, locate the line [auto-props] and add the following lines to the end of section:

*.html = svn:mime-type=text/html
*.css = svn:mime-type=text/css
*.js = svn:mime-type=text/javascript
*.txt = svn:mime-type=text/plain;svn:eol-style=native
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.pdf = svn:mime-type=application/pdf
*.jpeg = svn:mime-type=image/jpg
*.tiff = svn:mime-type=image/tiff
*.tif = svn:mime-type=image/tiff