Misc GIMP-related packages for Windows

Tor Lillqvist (tml)
GTK+ Pages -- Windows port

This page

The significance of this page is currently much less than what has earlier been the case. Especially if you are an end-user there isn't anything for you here.

Is this the official home for GTK+ on Windows?
Where are the GTK+ binaries?

No. At the GTK+ site.

Where is GIMP?

There are GIMP installers for Windows (that include GTK+) and a FAQ at gimp-win.sourceforge.net. The installers are created by Jernej Simoncic.

What about GNOME then?

Browse around at http://ftp.gnome.org/pub/gnome/binaries/win32/. There used to be a more detailled list here, but just follow that link and have a look.

Various stuff not linked to from the GTK+ site

The links below are to packages that are used mainly by GIMP, and thus not listed on the GTK+ site.

GIMP plugin development package

  • gimp-dev-2.4.zip Developer package for GIMP 2.4. Contains headers and import libraries (both .dll.a and .lib). Useful for people building plug-ins.

  • gimp-dev-2.2.7.zip Developer package for GIMP 2.2.

PSPI

pspi is a GIMP plug-in that runs Photoshop plug-ins (.8bf files). See separate page.

Very obsolete versions

  • gtk+-1.3.0-20040315.zip . GTK+ 1.3.0 runtime package. This is the gtk-1-3-win32-production branch of GTK+. The GTK+ version is 1.3.0, which is quite old. The GTK+ API was still mostly like GTK+ 1.2.7, which is what was current when this branch was created. Unfortunately, very few of the platform-independent fixes (in the gtk widgets) that went into GTK+ 1.2 since 1.2.7 are present. Unlike GTK+ 1.2 on Unix, GTK+ 1.3.0 on Windows is built to use GLib 2.x. There is no binary distribution of any GLib 1.2 for Windows.

  • gtk+-dev-1.3.0-20030115.zip. Corresponding developer package. (How can it be so much older than the runtime package, you ask? Because the API or ABI does not change, there is no change to headers or import libraries.)

  • The source for this GTK+ version is in gtk+-1.3.0-20040315-src.zip. There is no other distribution of the source to this GTK+ branch. You can get it from GNOME SVN, though, look for the gtk-1-3-win32-production branch of the gtk+ module.

pkg-config

pkg-config is a replacement for the glib-config and gtk-config scripts that long ago were used on Unix. (No such scripts were ever distributed with my Windows port, though.)

You can use the pkg-config command in your makefiles like this:

GLIB_CFLAGS=`pkg-config --cflags glib-2.0`
GLIB_LIBS=`pkg-config --libs glib-2.0`
...
foobar.exe : $(FOOBAR_OBJS)
	   $(CC) -o $@ $(FOOBAR_OBJS) $(GLIB_LIBS)

Etc. That only works with a Unixish Make and especially with a command interpreter (shell) that understands backquotes. (I hope you notice those backquotes in the above Makefile snippet, and understand what they mean. If you don't, educate yourself.)

I advise not to use a folder with spaces or other funny character in the name as top. Otherwise you will get problems when using pkg-config output in makefiles.

If you are a MSVC user and use nmake, it's a bit more complicated. nmake (or the standard Windows command interpreter it uses, command.com or cmd.exe) doesn't support backquotes. You must run pkg-config manually with the switch --msvc-syntax, and paste its output into your nmake makefile.

On NT/2k/XP, it is possible to have nmake create temporary files containing the output from pkg-config, and use those in a nmake makefile like this:

foobar.exe: foobar.obj __gtk_libs.mak
	cl -MD foobar.obj @__gtk_libs.mak
	@del __gtk_libs.mak

foobar.obj: foobar.c __gtk_cflags.mak
	cl -MD -c @__gtk_cflags.mak foobar.c
	@del __gtk_cflags.mak

__gtk_cflags.mak:
	pkg-config --msvc-syntax --cflags gtk+-2.0 >$@

__gtk_libs.mak:
	for /F "delims==" %i in ('pkg-config --msvc-syntax --libs gtk+-2.0') \
		do echo /link %i >$@

Note in the above makefile fragment that the __gtk_libs.mak file is created using the for /F syntax available only in the cmd.exe command interpreter on NT/2k/XP. These obscure acrobatics are needed because we want __gtk_libs.mak to contain a line that starts with /link, but pkg-config cannot output the /link flag itself as a cl command line might contain several invokations of pkg-config --libs. We cannot put the /link on the cl command line that links foobar.exe either, as cl then gets confused and runs the linker with a command file that on one line has @__gtk_libs.mak, and link.exe doesn't like that. Sigh.


Valid HTML 3.2!