Switch branches/tags
Nothing to show
Find file Copy path
82af751 Apr 30, 2012
0 contributors

Users who have contributed to this file

119 lines (87 sloc) 4.54 KB
Building on Mac OS/X:
Install: GTK+, pygobject, pycairo, pygtk
How to install pygobject, pycairo, pygtk:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig/
GTK Python bindings for Mac OS X 10.5 Leopard
Following my previous post we are now ready to compile and install the python bindings in order to have UMIT ready to go.
we start with pygobject which is cursed by Murphy's law. At the first attempt I got make stopped by an error message, that could be fixed by telling which python version we would like to use (one more time thanks to macports).
tar -jxf pygobject-2.14.1.tar.bz2
cd pygobject-2.14.1
./configure --prefix=/usr/local --disable-glibtest CFLAGS="-arch i686" PYTHON=/usr/bin/python2.5
sudo make install
next pycairo:
tar -zxf pycairo-1.4.12.tar.gz
cd pycairo-1.4.12.tar
./configure --prefix=/usr/local CFLAGS="-arch i686" PYTHON=/usr/bin/python2.5
sudo make install
and finally pygtk:
tar -jxf pygtk-2.12.1.tar.bz2
cd pygtk-2.12.1
./configure --prefix=/usr/local CFLAGS="-arch i686" PYTHON=/usr/bin/python2.5
sudo make install
that's the end of our saga. You can now enjoy UMIT on your Mac OS :)
Building on Windows:
Install: GTK+, python, pycairo, Visual Studio
Download the all-in-one-bundle from here:
and install to c:\gtk
Cairo is a 2D graphics library used by the TileEngine and comes along with GTK. With GTK+
you can also run the gtk frontend that's included in the source (you can find it in
MicropolisCore/src/run-gtkfrontend, it's a python script).
Download the latest 2.x version from the download page ( and
install the MSI to c:\python.
Pycairo is a set of Python bindings for cairo. You need the pycairo.h header files from the
source distribution to build the TileEngine project. Download py2cairo-1.10.0 (if you're using python 2.x)
and unzip to c:\pycairo.
Visual Studio:
You can download Visual Studio Express edition from here:
You'll need the Visual C++ 2010 Express edition to build the core project.
Download the latest source from the Google project here:
via subversion to a folder of your choice.
The following files have hard coded paths to tools that you may or may not need to modify
based on your installs. This is why I suggest putting things in generic paths (without version numbers)
MicropolisCore/src/CellEngine/python/CellEngine.vcproj (various places)
MicropolisCore/src/MicropolisEngine/python/Micropolis.vcproj (various places)
DisplayName="SWIG Executable"
Description="Specifies the name of the SWIG executable, typically &quot;C:\swig\swig.exe&quot;."
MicropolisCore/src/TileEngine/python/TileEngine.vcproj (various places)
Open up MicropolisCore.sln in MicropolisCore/src and rebuild the solution. If all the paths are setup and the
files are in place it should build completely.
You should now have 3 DLLs built along with the output from SWIG which will be python files and in the csMicropolis
folder a series of C# files (which are managed wrappers around the C++ micropolisengine.dll)
The Python files can be used with any Python front-end you want to build. There's a pre-build frontend
that uses GTK+ to run the game with most of the features of the X11 version.
You can read a series of blog posts by Bil Simser on building and modifying the code here: