OSXBuild10.6
From PyWiki
Contents |
Introduction
Warning, this is a document that is a work in progress for Snow Leopard. see OSXBuildV2
Building Python-Ogre under OSX is a straight forward, if slightly lengthy process. However please don't expect it to be a classic UNIX/MAC build cycle as it's not. Python-Ogre is different in that it needs to build the underlying C/C++ libraries then create and compile the wrapper code. However all is not lost as there is a fairly simple build script and configuration that handles most of the complexity.
Note: we create all the libraries etc into the ./root/usr/... area so as to not overwrite any system libraries etc that you may have. Hence making the Python-Ogre build process a simple and "safe" one -- ie we never overwrite any system files or existing libraries.
What you need
- OS X version 10.6.x
- XCode 3.2
Step 1
On to our Python-Ogre install by creating a master development directory under your home directory and checkout Python-Ogre from the SVN. This may take a long time, go get some coffee.
cd ~ mkdir development cd development svn co http://python-ogre.svn.sourceforge.net/svnroot/python-ogre/trunk/python-ogre python-ogre curl http://54.org/alfred/python-ogre/OSXBuild10.6.patch | patch -p0 -N -d python-ogre
Step 2
Download and build the support libraries. We use a single build script (BuildModule.py) that can retrieve, build, generate wrapper code and compile the Python-Ogre modules (do a -h for more info or look at the script). It basically reads a set of commands from the environment.py script and executes them. By default all the logging is to log.out so if you have any problems have a look there.
python2.5 python-ogre/BuildModule.py -r -b cmake gccxml boost pygccxml scons pyplusplus ois ogreThen run the demos by double-clicking the .app file in the Finder:
open ogre/Mac/build/Release
Step 3
Generate the wrapper code(-g), compile(-c) and install it
python2.5 python-ogre/BuildModule.py -g -c ogre ois python2.5 python-ogre/BuildModule.py -b install
Testing by running demos
You can now run the Python-Ogre demos
export PYTHONPATH=~/development/root/usr/lib/python2.5/site-packages export DYLD_LIBRARY_PATH=~/development/root/usr/lib (cd python-ogre/demos/ogre; python2.5 Demo_Smoke.py) (cd python-ogre/demos/ogre; python2.5 Demo_SkeletalAnimation.py)