Setup for OSX

 System requirements:

OSX 10.5 libraries:

sudo port install cmake libxml2 pkgconfig doxygen wget freetype boost liblo python_select
sudo port upgrade --enforce-variants boost +python26

(not yet tested with python2.7)

OSX 10.6 libraries:

sudo port install cmake python_select libxml2 pkgconfig doxygen wget freetype +universal \
boost +python27 liblo +univeral

The +universal option after a library ensures that both i386 and 64 bit are built. This is only needed if you plan to build OSG and SPIN in 64 bit mode (recommended). If you already have some installed libraries which were not built for 64 bits architecture, you may get errors during compilation of other ports. To upgrade an existing port (eg, freetype), do this:

sudo port upgrade --enforce-variants freetype +universal

you will also need to select the proper version of python, by doing the following:

 
sudo port select python python27

 

For Physics Modeling

if you wish to enable physics modeling in SPIN,  the Bullet library must be installed, by doing:

	sudo port install bullet
 
 
 
Download and compile ccpintrospection:
git clone git@github.com:sat-metalab/cppintrospection.git
cd cppintrospection
./autogen.sh
./configure
make
sudo make install
 
 
 
Python Configuration

 

You may need to set your machine to point to the correct version of python.  To do this, type the following in the shell;

> sudo python_select python26

 

Python needs to know where scripts are located for SPIN. One way to do this is to modiy the "site.py" file, located somehwere in your python installation. The following worked for OSX 10.6.x:

locate site.py

choose the file that corresponds to your python installation and add the following two lines to that file:

import sys
sys.path.append('/usr/local/share/spinFramework/scripts')

Building OpenSceneGraph (OSG):

At the time of writing this, the MacPorts packages for OSG are broken (they do not contain osgIntrospection), so you will need to compile OSG manually.

If the packages ever get updated, you can probably install OSG via Macports like this:

sudo port install OpenSceneGraph-devel +universal