My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
BuildingFromSource  
Instructions for compiling from source
Phase-Implementation
Updated Mar 10, 2012 by pstav...@gmail.com

Getting the Source

If you are using a source archive/tarball, just extract the sources and goto Build Steps

If you wish to use the latest code from version control, first ensure that you have a Mercurial client installed (if you don't have one, install a client for your platform from Mercurial Downloads). Then run the following command -

$ hg clone http://ostinato.googlecode.com/hg/ ostinato

Once the command completes, the source code will be available in the ostinato directory.

After cloning the repository, at any time to retrieve any further updates to the code, run from inside the ostinato directory -

$ hg pull -u

NOTE: On the Source tab, there is a "Create a clone" button - you should click on that ONLY if you want to start contributing to Ostinato development yourself; if you just want to use Ostinato and build from source, follow the above procedure

Prerequisites

Ostinato has the following dependencies -

Build Steps

The following instructions use the command line shell to build Ostinato. If you wish to use the QtCreator IDE see Using QtCreator

Linux/BSD

Ensure that you have installed all the Prerequisites. Pre-built packages for all the pre-requisites can be obtained via your distribution's package manager (remember to use the devel packages); for protobuf, you need to install two packages - the protobuf devel library and the protobuf compiler (protoc)

Make sure that the protobuf compiler protoc is in the path while building Ostinato.

Run the following commands from the top level directory -

$ qmake
$ make
$ make install

NOTE: make install requires superuser privileges - depending on your platform either run it as root or via sudo

To provide a custom install path, pass PREFIX=/absolute/path/to/prefix/dir to qmake. The binaries are installed in $PREFIX/bin/. The default prefix for Unix platforms is /usr/local.

You can use the qmake options -config debug or -config release to force either debug or release mode.

Windows

These instructions assume the MinGW compiler.

Ensure that you have installed all the Prerequisites. QT, Winpcap both offer pre-built ready-to-use binary packages. Protocol Buffers is however available as source only - you will need to build it first before you can build Ostinato (protobuf needs to be built using the MSYS shell).

Once you have installed all the pre-requisites, set the CPLUS_INCLUDE_PATH and LIBRARY_PATH environment variables to include the path to the header and library files of all the pre-requisites. Also make sure that the protobuf compiler protoc.exe is in your path while building Ostinato.

Run the following commands from the top level source directory -

$ qmake
$ make
$ make install

make install will, by default, install the binaries in <top-level-directory>/bin. To provide a custom install path, pass PREFIX=/absolute/path/to/prefix/dir to qmake. The binaries are installed in $PREFIX/bin/.

To enable exclusive control over a port and prevent stray packets being generated by the OS, Ostinato uses the bindconfig application. Download and copy the executable in the same directory as the server (drone.exe)

Mac OS X

Ensure that you have installed all the Prerequisites. libpcap is typically available out of the box on Mac OS X. Qt is available via fink or macports. protobuf is available on macports but not on fink (at the time of this writing); you may build protobuf from source.

Make sure that the protobuf compiler protoc is in the path while building Ostinato.

Run the following commands from the top level directory -

$ qmake -spec macx-g++
$ make
$ sudo make install

make install will, by default, install the application bundles in /Applications/bin. To provide a custom install path, pass PREFIX=/absolute/path/to/prefix/dir to qmake. The bundles are installed in $PREFIX/bin/.

You can use the qmake options -config debug or -config release to force either debug or release mode.

Using Qt Creator

Ensure that you have installed all the Prerequisites. See notes for your platform in Build Steps regarding the pre-requisites (ignore the ostinato build instructions there).

Once you have installed all the pre-requisites -

  1. Goto File | Open Project
  2. Select ost.pro
  3. Run Build | Build All

To run Ostinato, you need to run both the server and client executables - by default Qt Creator will just run one of them. To work around this, create a batch/shell script in the top-level directory which starts both the server and client and configure Qt Creator to run the batch/shell script -

  1. Goto Projects Mode (Ctrl-4) | Run Settings
  2. Click on 'Add'
  3. In the drop down select 'Custom Executable'
  4. Configure the ost.bat/ost.sh that you created as the executable

Windows Only: You will most likely need to configure the include and library paths for WinPcap and ProtoBuf in the project's build environment -

  1. Goto Projects Mode (Ctrl-4) | Build Environment
  2. Add/modify the following environment variables
    • CPLUS_INCLUDE_PATH
    • LIBRARY_PATH

Notes

If you would like to use Ostinato as a "portable application", create an empty file "ostinato.ini" in the same directory as the Ostinato executable.

Comment by rajathku...@gmail.com, May 31, 2011

hi,

I have downloaded the mercurial client version, but still not able to obtain the source code for ostinato.

i am getting this error when i run the following command "$ hg clone http://ostinato.googlecode.com/hg/ ostinato: , abort: error : connection attempt failed because the connected party did not properly respond after a period of time "..

kindly help.


Sign in to add a comment
Powered by Google Project Hosting