Build instructions

NOTE: This is mainly meant for developers wanting to help out with GTK+ Mac OS X, or for developers wanting to port their GTK+ applications for Mac OS X.

Also note that it is NOT recommended to mix and match libraries from Fink and/or MacPorts to build GTK+ and its dependencies.

Prerequisites

You need OS X 10.4 or newer, and the developer tool Xcode 2.5 or newer.

Subversion (svn) is needed to check out the source code for the various components. If you are building on OS X 10.5, svn is already included with the OS, but if you are running 10.4 you need to install it. Prebuilt binaries can be downloaded from here.

Jhbuild build script

The recommended way to build GTK+ is to use jhbuild, which is a build script that is used to build GTK+, GNOME and many other projects. The easiest way to set it up for building GTK+ for Mac OS is to use the script provided here. Download it and run it to check out jhbuild and the necessary configuration files to go with it:

sh gtk-osx-build-setup.sh

Note: If you have set up the jhbuild configuration before, not using this script, it is recommended that you redo it, since the locations of moduleset files and the configuration itself has changed. It is also recommended re-running the script if you run into problems, as there might be updates fixing such issues.

Then start by running the bootstrap process to set up the jhbuild environment. This only needs to be done once:

jhbuild bootstrap
jhbuild build meta-gtk-osx-bootstrap

Then it's time to build the software:

# Build everything
jhbuild build

# Or to build just one package
jhbuild buildone glib

# List all packages
jhbuild list

# Info about a package
jhbuild info gtk+

# Start a shell for manual building or running GTK+ applications
jhbuild shell

Please don't send mail to the GTK+ mailing lists about build issues not concerning GTK+ directly. Use the forum here instead.