SourceForge.net Logo CinePaint Logo
Home Press Mailing List Documentation Screenshots People SourceForge Downloads

Look ma! No X11! GIMP running natively on Mac OS X Aqua.
Note that this is a buggy pre-alpha test build only, not ready for users yet.
Garbled text in bucket-fill dialog (top right) is due to error in GTK+OSX.

Building GIMP with GTK-OSX

by John-Michael Mulesa

Disclaimer: This is for testing purposes only. GTK+OSX is a work-in-progress and not really complete enough yet for a complex app like GIMP (e.g., can't hold out a brush stroke, can't use paintbucket, interface glitches, etc.). Use this HOWTO at your own risk!

Requirements

Building

  1. Decompress both packages
  2. Make sure to compile and install dependencies to gimp first (not gtk; stuff like image/print libraries)
  3. Start by compiling gtk-osx with ProjectBuilder (install notes in package)
  4. Once you have that all done you should have GLib.framework, GDK.framework, and GTK.framework in your /Library/Frameworks directory
  5. Create directory /gmp
  6. Place your gtk-config (this one, not one with gtk) and your glib-config (with gtk) in /gmp/bin (create the bin folder)
  7. Open ProjectBuilder and create a new Carbon Application named gimp-1.2, then build it
  8. Open a terminal window and cd to the gimp-1.2.5 directory
  9. Run this command (add disable options if needed):
    ./configure --with-gtk-prefix=/gmp --prefix=/gmp --bindir=/path to gimp/gimp-1.2.app/Contents/MacOS --sbindir=/path to gimp/gimp-1.2.app/Contents/MacOS
  10. Run make, it should die on the first "can't find gtk/gtk.h".
  11. Create an empty ProjectBuilder project
  12. Go to the Finder, and search for all the files that end in .h inside the gimp directory
  13. Select everything (all files should end in .h) and drag them into the empty ProjectBuilder project
  14. Repeat last two steps for .c files as well
  15. Now, using ProjectBuilder's handy find and replace feature, search for "gtk/gtk.h" (with quotes) and replace all with <gtk/gtk.h>. This is an error in GIMP that you have to fix to use GTK+OSX.
  16. Running make will stop on a lot of these errors (not only gtk/gtk.h). Whenever one comes up, do the same thing you did with gtk/gtk.h
  17. If you get an error about animationplay.c that mentions something about gdkwin32.h find this in the code:

#ifndef GDK_WINDOWING_WIN32
# include <gdk/gdkx.h>


and insert this line:

#undef GDK_WINDOWING_WIN32

#ifndef GDK_WINDOWING_WIN32
# include <gdk/gdkx.h>

This fixes an error that GIMP tries to compile for Win32 instead of for unix under GTK+OSX.

Installation and Running

  1. Once you have completed above steps make will have compiled successfully
  2. make install
  3. To start it, open a terminal window, and navigate to the gimp-1.2 executable inside gimp-1.2.app and run it from the terminal. Double-clicking the app won't work.
  4. You should now have the gimp running on Mac OS X!

Hope all goes well for you! Send all questions to gtk-osx-developer@lists.sourceforge.net


Created December 23, 2003. Updated December 24, 2003. Questions to rower@movieeditor.com
License: Documentation written as part of the GTK+OSX project is released under the OSI MIT license (a BSD-style license) and copyright the original authors.