[unknown button type]

For users

I placed a binary on the google code page : http://code.google.com/p/rabbitvcs/downloads/list

For developers

First of all, let me note that this guide is very much a work in progress and is meant as a set of helpful guidelines rather than a step-by-step tutorial; you will need to know what you're doing in order to follow this.

Dependencies

Installing RabbitVCS on OSX is painful, because it uses a lot of dependencies that are generally seen on Linux/Gnome systems and that are not readily available on OSX.

macports can do all of this automatically to much extent, but macports built packages are hard to package and send to others. Since I want to provide an installer and not require end-users to use macports, I will not be using macports.

Python

I am using Python 2.7, the 32 bits version, from the python website (python-2.7-macosx10.5.dmg)

GTK

Go to http://gtk-osx.sourceforge.net/ and use their build script. I modified their jhbuild script to install GTK into /opt/gtk-2.24 (because by default it installs in your home dir, which is quite inconvenient for packaging since the target user will not have a home dir with the same name as yours). I also made it build 32-bits, with compatibility for OSX 10.5.

PyGTK and other GTK goodies

Set your environment :

export GTK_MODULES="/opt/gtk-2.24/lib/gtk-2.0/2.10.0/engines/libpixmap.so:/opt/gtk-2.24/lib/gtk-2.0/2.10.0/engines/libaurora.so"
export PKG_CONFIG_PATH=/opt/gtk-2.24/lib/pkgconfig

I installed the Aurora them engine to get something nicer than the default GTK theme :

CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386" ./configure --prefix=/opt/gtk-2.24/
make
sudo make install

Then add the following line to /opt/gtk-2.24/etc/gtk-2.0/gtkrc :

/opt/gtk-2.24/share/themes/Aurora/gtk-2.0/gtkrc

Build and install libglade (note that RabbitVCS seems to be moving away from libglade now so this may soon be obsolete) :

CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -I/opt/gtk-2.24/include" ./configure --prefix=/opt/gtk-2.24/ 
make
sudo make install

pygobject :

CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -I/opt/gtk-2.24/include" ./configure --prefix=/opt/gtk-2.24/ --disable-introspection
make
sudo make install

pycairo :

CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -I/opt/gtk-2.24/include" ./configure --prefix=/opt/gtk-2.24/
make
sudo make install

pygtk :

CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -I/opt/gtk-2.24/include -I/opt/gtk-2.24/include/glib-2.0 -I/opt/gtk-2.24/lib/glib-2.0/include " ./configure --prefix=/opt/gtk-2.24/
make
sudo make install

RabbitVCS Dependencies

configobj

python setup.py install --prefix=/opt/rabbit

simplejson

export PYTHONPATH=/opt/rabbit/lib/python2.7/site-packages
python setup.py install --prefix=/opt/rabbit

pysvn

Simply download the binary from http://pysvn.tigris.org/servlets/ProjectDocumentList?folderID=2860 :
http://pysvn.tigris.org/files/documents/1233/48020/py27_python_org_pysvn_svn1612-1.7.4-1321-intel.dmg

Install pySVN in /opt/rabbit to save a dependency to the end-user

RabbitVCS itself

 python setup.py build
 python setup.py install --prefix=/opt/rabbit/
 mkdir -p /opt/rabbit/bin
 cp clients/cli/rabbitvcs /opt/rabbit/bin/rabbitvcs

Icons

RabbitVCS uses SVG icons. Adding SVG support to GTK would require even more dependencies so for now I just convert the icons to png. Imagemagick is a good way to do that

mogrify -resize 16x16 -format png -background none *.svg

Running

Create the file “rabbitvcs_osx” in /opt/rabbit/bin :

#!/bin/sh
export GTK_DATA_PREFIX="/opt/gtk-2.24"
export XDG_DATA_HOME="/opt/gtk-2.24/share"
export XDG_DATA_DIRS="/opt/rabbit/share:/opt/gtk-2.24/share"
export GTK_PATH="/opt/gtk-2.24/lib/gtk-2.0/2.10.0/engines:/opt/gtk-2.24/lib:/opt/gtk-2.24/lib/gtk-2.0:/opt/gtk-2.24/lib/gtk-2.0/2.10.0"
export GTK2_RC_FILES="/opt/gtk-2.24/etc/gtk-2.0/gtkrc"
export PYTHONPATH="/opt/rabbit/lib/python2.7/site-packages:/opt/gtk-2.24/lib/python2.7/site-packages:/opt/gtk-2.24/lib/python2.7/site-packages/gtk-2.0:$PYTHONPATH"
export PYTHON="/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32"
$PYTHON /opt/rabbit/bin/rabbitvcs "$@"

at last, you are ready to run Rabbit using (for instance) :

/opt/rabbit/bin/rabbitvcs_osx settings