New Project Home
GTK+OSX is now consolidated at http://gtk-osx.sourceforge.net/, where you'll find up-to-date information about building, bundling, and integrating GTK+ applications on Mac OSX. There is a forum, a mailing list, and a tracker there. The following is deprecated! The current information is at http://sourceforge.net/apps/trac/gtk-osx/wiki/Build
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 http://metissian.com/projects/macosx/subversion/
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: http://github.com/jralls/gtk-osx-build/raw/master/gtk-osx-build-setup.sh
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.
Also note that if the build doesn't work, first try to rerun the script to update jhbuild modulesets etc. The failure might already be fixed.
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 the GTK+ core modules jhbuild build # Start a shell for manual building or running GTK+ applications jhbuild shell
Some useful commands:
# List all packages (in optional module name) jhbuild list [module-name] # Info about a package jhbuild info gtk+ # To build just one package jhbuild buildone glib # Build themes and icons themes needed for some applications (optional) jhbuild build meta-gtk-osx-themes
Bugs regarding the OS X version should be reported at http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B for the "quartz" component.
