
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
- Mac OS X
- gimp-1.2.5.tar.gz (gimp.org)
- gtk-osx-0.6.tar.gz (gtk-osx.sourceforge.net)
Building
- Decompress both packages
- Make sure to compile and install dependencies to gimp first
(not gtk; stuff like image/print libraries)
- Start by compiling gtk-osx with ProjectBuilder (install notes
in package)
- Once you have that all done you should have GLib.framework,
GDK.framework, and GTK.framework in your /Library/Frameworks
directory
- Create directory /gmp
- Place your gtk-config (this one,
not one with gtk) and your glib-config (with gtk) in /gmp/bin
(create the bin folder)
- Open ProjectBuilder and create a new Carbon Application named
gimp-1.2, then build it
- Open a terminal window and cd to the gimp-1.2.5 directory
- 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
- Run make, it should
die on the first "can't find gtk/gtk.h".
- Create an empty ProjectBuilder project
- Go to the Finder, and search for all the files that end in
.h inside the gimp directory
- Select everything (all files should end in .h) and drag them
into the empty ProjectBuilder project
- Repeat last two steps for .c files as well
- 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.
- 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
- 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
- Once you have completed above steps make
will have compiled successfully
- make install
- 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.
- 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.