Dev preview

From Sirikata Wiki
Jump to: navigation, search

Note This preview version is now 2 years (or more) out of date and this page is really only kept around for archival purposes. Instead check out the instructions for checking out and building the current code.

This dev preview version is what you see running in our teaser video. This release is a few months old as of March 2009. We have made dramatic improvements since then. Go to Github for the bleeding edge version.

Building the The Sirikata Dev Preview

This page describes how to get and build The Sirikata Dev Preview (codename Meru). Once this is complete you should be able to follow the instructions on Running The Sirikata Dev Preview to run the Meru server and client.

We provide the preview across 3 operating systems. Note that currently Linux works best, Windows works well, and OS X is missing a number of features, but is functional. If desired you should be able to mix and match platforms, e.g. to run servers on a Linux cluster and clients on Windows desktops.

Building on Linux

Currently we only provide support for Ubuntu Linux. It should be possible to build and run on other distributions but we haven't tested them and don't have scripts to make setup easy.

Make sure you have svn installed. Then checkout the Linux version of Meru:


curl -o meru-0.1.tar.bz2 http://www.sirikata.com/res/dev_preview/meru-0.1.tar.bz2
tar -jxf meru-0.1.tar.bz2


The initial checkout includes all the dependencies, so it may take awhile. There are a lot of dependencies that need to be installed. Many can be satisfied by packages that exist on the platform, but a few need to be compiled from source. We've put together a script that should install everything you need based on a clean installation of Ubuntu 8.04. Because we'll be installing packages using apt-get and also installing some packages to /usr/local you'll need to run the script with root privileges.


cd linuxmeru/dependencies
sudo ./install your_username_here


Quite a few packages are built from source, so run that and take a break. Double check for any errors on the console and then continue.

Up until now, all the steps only need to be performed once. Now we'll move on to actually compiling the dev preview itself. We actually have a couple of our own libraries that need to be compiled as well. We use cmake as our build system but we've setup a simple Makefile which takes care of building everything you need.


cd ../meru
make

That should take care of configuring and building Mid, Mios, Mutil, Navi, and finally the platform. You can use the same Makefile to update your build (from linuxmeru/meru/):


make

or to just update the build of Meru (if you want to ignore all the libraries for speed purposes):

make meru

and clean out your current build to allow you to completely rebuild from scratch:


make clean

If it built successfully you should see a message indicating the it linked successfully and the file linuxmeru/meru/data/bin/meru should exist. You can now proceed to Running The Sirikata Dev Preview.

Building on Windows

You should be able to use Windows XP or Vista to build and run Meru. We regularly use and test building with Visual Studio 2005. Visual Studio 2008 may also work, but you will need to rebuild all dependent libraries and/or download the new sirikata dependencies from http://sirikata.googlecode.com . Install one of these if you don't have it yet.

You will need both subversion and cmake to be able to checkout and compile the source. For svn you can either use command line binaries from the subversion project [[1]], the version that comes with Cygwin [[2]], or a visual client like TortoiseSVN [[3]]. For CMake you should use the official compiled version available from [[4]]. The version you can get with cygwin won't work since it won't generate Visual Studio projects.

With all the tools installed you can move to checking out and building. First simply checkout the Windows version of the code at:

http://www.sirikata.com/res/dev_preview/MeruWin32Source0.1.zip

This includes all the dependencies as well as the source code and some other resources so it will take awhile to checkout. This process is especially slow on windows and even worse using TortoiseSVN. You should only need to do this once though.

With the source checked out we can move on to building it. We need to build a few libraries that are included with Meru and then we can build Meru itself. We use CMake to setup the builds and the process is similar for each piece:

  • Run CMake in the build directory for the component.
    • Set the directory to the build directory for the project, e.g. for Meru it would be win32meru/meru/build/cmake
    • Set the build directory to the same path
    • Hit configure
    • Hit configure once more
    • Hit generate
  • Load the solution into Visual Studio and build (possibly multiple times, for Debug, Release, etc)

This is a pain the first time, but the libraries shouldn't change much so you'll generally only have to deal with the Meru project files. Note that CMake will rerun automatically from in the project when you start a build to ensure everything is up to date, so manually running CMake is only required the first time.

Some libraries depend on each other. You should build them in this order (with build directories in parentheses):

  • Mutil - win32meru/meru/externals/Mutil/Build/CMake
  • Mid - win32meru/meru/externals/Mid/Build/CMake
  • Mios - win32meru/meru/externals/Mios/Build/CMake
  • MeruNetworking - win32meru/meru/externals/MeruNetworking/Build/CMake
  • Meru - win32meru/meru/build/cmake

Note that you'll need matching build profiles for the libraries, e.g. you must use Mid Debug with Meru Debug. The Debug and Release versions of all projects are named differently so they can peacefully coexist (debug versions have _d in their name).

The output binaries will be placed at

  • Debug - win32meru/Debug/meru_d.exe
  • Release - win32meru/Release/meru.exe

Note that on windows Debug is often too slow to be usable. If you need the interface to be responsive you probably want to use Release unless you actually need to use the debugger.

Building on Mac OS X

The dev preview should run on OS X 10.4 and 10.5. We only provide support for x86. We have no plans to support PPC Macs. Be aware that the UI library does not work on OS X. Although we provide sufficient code to make the dev preview run, certain pieces are unusable (and therefore some things are more difficult to test).

The only dependency that must be installed system-wide is Mono. There's an installer on the mono website [[5]]. Currently you need to be sure you have version 1.9. Run the installer and then return.

You will also need cmake. You can either use something like macports to install it or use the official OS X version from Kitware [[6]]. Install it and return.

Next, checkout the apple version of the dev preview:

curl -o MeruOSXSource0.1.zip http://www.sirikata.com/res/dev_preview/MeruOSXSource0.1.zip

The initial checkout includes all the dependencies besides Mono, so it may take awhile.

Up until now, all the steps only need to be performed once. Now we'll move on to actually compiling dev preview itself. We actually have a couple of our own libraries that need to be compiled as well. We use cmake as our build system but we've setup a simple Makefile which takes care of building everything you need.

cd ../meru
make

That should take care of configuring and building Mid, Mios, Mutil, Navi, and finally Meru. You can use the same Makefile to update your build of Meru (from applemeru/meru/):

make

or to just update the build (if you want to ignore all the libraries for speed purposes):

make meru

and clean out your current build to allow you to completely rebuild from scratch:

make clean

If it built successfully you should see a message indicating the it linked successfully and the file applemeru/meru/data/bin/meru should exist. You can now proceed to Running The Sirikata Dev Preview.