Building on Mac OS

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:

  • 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
    o Click the installer
  • jhbuild, GTK, Python, PyGTK
    o Download
    o 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
    o python
    o curl
    o python
    o pip install twisted pytest trueskill
  • Slugathon
    o cd ~/Source
    o git clone git://
    o cd Slugathon
    o python ./ build
    o python ./ 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.)