These are the steps necessary to build Panda3D on Mac OS X. The steps may be different on another system, like a system with Python installed in a different location or via a different method.
Mac OS X Leopard comes with Python 2.5, this is suitable for building and using Panda3D. If you are upgrading from a previous version of Panda3D built on a prior version of Mac OS X you may have remove your old Python installation.
To follow these build instructions you will need MacPorts installed on your system. If you don't already have MacPorts start by downloading and installing it.
Let's get started. First change to your home folder and create a directory to keep the Panda source code. cd by itself changes you to your home folder.
$ cd $ mkdir src $ cd src
$ curl -O http://panda3d.org/download/panda3d-1.5.0/panda3d-1.5.0.tar.gz
$ tar xzf panda3d-1.5.0.tar.gz $ cd panda3d-1.5.0
$ curl -O http://edalytical.com/files/patch-stdtypedefs.h $ curl -O http://edalytical.com/files/patch-fftCompressor.cxx $ patch -p0 < patch-stdtypedefs.h $ patch -p0 < patch-fftCompressor.cxx
$ sudo port install jpeg $ sudo port install tiff $ sudo port install libtar $ sudo port install ode $ sudo port install fftw
$ cd ppremake $ aclocal $ autoheader $ automake --foreign -a $ autoconf $ ./configure $ make $ sudo make install
$ sudo chown -R eddie panda
# Panda 3D export PATH="/usr/local/panda/bin:$PATH" export DYLD_LIBRARY_PATH=/usr/local/panda/lib export PYTHONPATH=/usr/local/panda/lib:/usr/local/panda/lib/direct:$PYTHONPATH
$ source ~/.bash_login
#define PYTHON_IPATH /usr/include/python2.5 #define PYTHON_LPATH /usr/lib/python2.5 #define JPEG_IPATH /opt/local/include #define JPEG_LPATH /opt/local/lib #define PNG_IPATH /usr/X11/include/libpng #define PNG_LPATH /usr/X11/lib/ #define TIFF_IPATH /opt/local/include #define TIFF_LPATH /opt/local/lib #define TAR_IPATH /opt/local/include #define TAR_LPATH /opt/local/lib #define FFTW_IPATH /opt/local/include #define FFTW_LPATH /opt/local/lib #define FFTW_LIBS drfftw #define CG_IPATH /Library/Frameworks/Cg.framework/Headers #define CG_LPATH /Library/Frameworks/Cg.framework #define CG_LIBS #define CG_FRAMEWORK Cg #define HAVE_CG 1 #define CGGL_LIBS #define CGGL_FRAMEWORK Cg #define HAVE_CGGL 1 #define ZLIB_IPATH /opt/local/include/ #define ZLIB_LPATH /opt/local/lib #define ODE_IPATH /opt/local/include #define ODE_LPATH /opt/local/lib
$ cd ../dtool $ ppremake $ make $ make install
$ cd ../panda $ ppremake $ make $ make install
$ cd ../direct $ ppremake $ make $ make install
$ genPyCode
$ python >>> import direct.directbase.DirectStart >>> run()
If the build succeeded you should see a window with a gray background.