You are here

Compile GIMP for Windows

Recently, I have successfully built GIMP for Windows 32 bit platform. Well, by "successfully" I mean it is running, but it is pretty unstable and has some more problems. After some time spent on Cygwin, I decided to cross compile the source code on Debian Linux. It is much faster and requires almost no change in the source code or in the configuration scripts.

So I have built all the necessary packages needed, starting with libz through gtk+ and ending with GIMP and my plug-in. I used mostly the latest stable releases of all packages having autoconf configuration. I had to skip few packages using CMake, I could not get these cross compiled. The sequence of packages needed to be built is:

libz, libiconv, libxml2, gettext, gtk-doc, glib, atk, libpng, jpeg-8d, jbigkit (needs to be compiled manually), jasper, tiff, gdk-pixbuf, freetype, fontconfig, lcms2, lcms (from the ghostscript source), ghostscript (really hard one), libspectre, poppler, pixman, cairo, pango, gtk+ (2.0), babl, harfbuzz, gegl, libcroco, librsvg, libexif, libmng, GIMP

Then I copy the whole build folder to Windows XP, and after configuring fonts, it runs. However, the problems I encountered are:
- there is no splash screen. I have no idea where it can be
- a bit unstable. For example, whenever I open the preference dialog and try to move it, it crashes the whole GIMP
- there is an error message when opening any image (but png can be loaded in the end), it complains that no gtk-loader can be found. This is probably some configuration issue of gtk+ which I will be able to resolve in the end
- there is no option to save the image in any other format than xcf. It is perhaps concerned with the previous problem
- the i18n does not work. If I add LANG environment variable, it does nothing, the GUI is still English

Regarding the problem with stability, I have compiled everything with pthreads. I saw somewhere on the web a hint to turn pthreads off when compiling GIMP. Does anybody know something about this? Is it better to compile all the gtk packages without pthreads? Does GIMP need some threads at all?

I would like to compile the Windows 64 bit version of GIMP 2.8 and possibly 3.0 when it is released (gtk+ 3.0 is possible to cross compile, tested), but it is probably useless with the problems I am having with the 32 bit version. So if anybody could help me to resolve the issues, it would be great.

OK, so I can answer my own questions, just in case that somebody would be interested in.

- unstable behavior - pixman must be configured with --disable-sse2
- error messages when opening image and missing splash screen - gdk-pixbuf-query-loaders --update-cache should be run on the target machine
- saving images other than xcf - I haven't noticed that "export" command has been added in 2.8
- internationalization - iso-codes must also be compiled and installed

Subscribe to Comments for "Compile GIMP for Windows"