Skip to content
dripton edited this page Feb 4, 2012 · 11 revisions

Before building on Mac OS for the first time, you need to install the dependencies:

I followed these steps on 10.6 Snow Leopard and 10.7 Lion. You can probably get it to work (perhaps with slight changes) on 10.5 Leopard. I failed to get jhbuild to work at all on 10.4 Tiger.

I started here:
http://www.gtk.org/download/macos.php

  • Xcode
    o Download Xcode from the Mac App Store or from Mac Dev Center (free, but requires registration)
    o Click the installer
  • Git
    o Download Git from http://code.google.com/p/git-osx-installer/downloads/detail?name=git-1.7.7.3-intel-universal-snow-leopard.dmg
    o Click the installer
  • jhbuild, GTK, Python, PyGTK
    o Download http://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh
    o sh gtk-osx-build-setup.sh
    o Add the following to your $HOME/.bash_profile: export PATH=:~/.local/bin:~/gtk/inst/bin:$PATH
    o source $HOME/.bash_profile
    o sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
    o sudo ln -s /usr/bin/g++ /usr/bin/g++-4.2
    o jhbuild bootstrap
    o jhbuild build python
    o jhbuild build meta-gtk-osx-bootstrap
    o jhbuild build meta-gtk-osx-core
    o jhbuild buildone pycairo
    o jhbuild build pygtk
  • distribute, pip, Twisted, py.test, and trueskill
    o cd ~/Downloads
    o curl -O http://python-distribute.org/distribute_setup.py
    o python distribute_setup.py
    o curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py
    o python get-pip.py
    o pip install twisted pytest trueskill
  • Slugathon
    o cd ~/Source
    o git clone git://github.com/dripton/Slugathon.git
    o cd Slugathon
    o python ./setup.py build
    o python ./setup.py install
  • Unit tests
    o cd slugathon
    o py.test
  • Running the game
    o vim ~/.slugathon/globalprefs/passwd (add yourname:yourpass)
    o slugathon-client

(Note: I haven’t got PyInstaller working yet on the Mac. 64-bit Mac OS is not supported in PyInstaller 1.5..1, but is supported in the latest git versions. But they have other problems. Still working on it. When it’s done, Mac will be an easy install like Windows.)