Installation on Mac OS X

From Simspark
Jump to: navigation, search

For installing Simspark on Mac OS X, the following steps where necessary for me:

- download and install some additional software packages

- change some environment variables for the shell


Contents

Required software

The version numbers are the versions I have been using, other versions may or may not work.

  • Apple xcode tools (xcode_2.4.1)

This package contains gcc and most of the necessary development tools. It comes with the Mac on CD, but can also be downloaded from the Apple homepage.

Installing the required libraries

- boost (http://sourceforge.net/projects/boost/files/boost/)

- freetype-2 (http://sourceforge.net/projects/freetype/files/)

- SDL-1.2 (http://www.libsdl.org/download-1.2.php)

- jpegsrc (http://www.ijg.org/files/)

- DevIL (http://sourceforge.net/projects/openil/files/)

- ruby-1.8 (http://www.ruby-lang.org/en/downloads/)

- ode (http://sourceforge.net/projects/opende/files/)


Set some environment variables for configure

export APP_DIR=/Applications/rcssserver3d.app
export DEPS_DIR=$APP_DIR/Contents/deps

export CPPFLAGS=-I/usr/X11/include
CPPFLAGS="$CPPFLAGS -I/usr/include/malloc"# for malloc.h
export LDFLAGS=-L/usr/X11/lib

for d in SDL-1.2.14 devil-1.7.8 freetype-2.3.11 jpeg-8 ode-0.11.1 ruby-1.8.7-p249
do
    DPREFIX=$DEPS_DIR/$d
    CPPFLAGS="$CPPFLAGS -I$DPREFIX/include"
    LDFLAGS="$LDFLAGS -L$DPREFIX/lib"
    PATH=$DPREFIX/bin:$PATH
done

configure, make, make install

cd freetype-2.3.11
./configure --prefix=$DEPS_DIR/`basename $PWD`
make; make install
cd -
cd SDL-1.2.14
./configure --prefix=$DEPS_DIR/`basename $PWD`
make; make install
cd -
cd jpeg-8
./configure --prefix=$DEPS_DIR/`basename $PWD`
make; make install
cd -
cd devil-1.7.8
./configure --prefix=$DEPS_DIR/`basename $PWD`  --enable-ILU --enable-ILUT
make; make install
cd -
cd ruby-1.8.7-p249
./configure --prefix=$DEPS_DIR/`basename $PWD`
make; make install
cd -
cd ode-0.11.1
./configure --prefix=$DEPS_DIR/`basename $PWD`
make; make install
cd -

Installing the RoboCup software

Check out the source from the source forge SVN repository

svn co https://simspark.svn.sourceforge.net/svnroot/simspark simspark

Set some environment variables for CMake

export RC3D=$APP_DIR/Contents/rcssserver3d-0.6.3
export SIMSPARK=$APP_DIR/Contents/simspark-0.2
PATH=$SIMSPARK/bin:$PATH
PATH=$RC3D/bin:$PATH

- malloc export CFLAGS="-I/usr/include/malloc"

- BOOST_ROOT

export BOOST_ROOT=/opt/boost/1.42.0

- FREETYPE_DIR

export FREETYPE_DIR=$DEPS_DIR/freetype-2.3.11

- DEVIL_DIR

export DEVIL_DIR=$DEPS_DIR/devil-1.7.8

- ODE_HOME

export ODE_HOME=$DEPS_DIR/ode-0.11.1

- SDLDIR

export SDLDIR=$DEPS_DIR/SDL-1.2.14

- RUBY

export RB_INC=`ruby -r rbconfig -e "print Config::CONFIG['archdir']"`
export RB_LIB_DIR=`ruby -r rbconfig -e "print Config::CONFIG['libdir']"`
export RB_LIB=`ruby -r rbconfig -e "print Config::CONFIG['LIBRUBY']"`

cmake, make, make install

- simspark

cd simspark/trunk/spark
mkdir build
cd build
cmake \
   -DCMAKE_INSTALL_PREFIX=$SIMSPARK \
   -DRUBY_INCLUDE_PATH=$RB_INC \
   -DRUBY_LIBRARY=$RB_LIB_DIR/$RB_LIB \
   -DSDL_INCLUDE_DIR=$SDLDIR/include \
   -DFREETYPE_INCLUDE_DIR_freetype2=$FREETYPE_DIR/include/freetype2 \
   -DUSE_COREFOUNDATION=OFF \
   ..
make
make install

- rcssserver3d

cd simspark/trunk/rcssserver3d
mkdir build
cd build
export SPARK_DIR=$SIMSPARK

cmake \
   -DCMAKE_INSTALL_PREFIX=$RC3D \
   -DSDL_INCLUDE_DIR=$SDLDIR/include \
   -DFREETYPE_INCLUDE_DIR_freetype2=$FREETYPE_DIR/include/freetype2 \
   ..
make
make install

Run simspark

Set some environment variables for simspark

RC3D=/Applications/rcssserver3d.app/Contents/rcssserver3d-0.6.3
SPARK=/Applications/rcssserver3d.app/Contents/simspark-0.2
export DYLD_LIBRARY_PATH=$SPARK/lib/simspark:$RC3D/lib/rcssserver3d

Run server and agent

simspark
rcssagent3d
Personal tools