README.win32 4.51 KB
Newer Older
Tor Lillqvist's avatar
Tor Lillqvist committed
1
The Win32 port of GTK+ is a work in progress, and not as stable or
Tor Lillqvist's avatar
Tor Lillqvist committed
2
correct as the Unix/X11 version. For more information about the Win32
Tor Lillqvist's avatar
Tor Lillqvist committed
3
port, see http://www.gimp.org/win32/ .
Tor Lillqvist's avatar
Tor Lillqvist committed
4

5 6 7 8 9 10 11
This (CVS HEAD) version of the Win32 backend does *not* necessarily
even compile properly. There is a gtk-1-3-win32-production branch that
was branched off from before the addition of the no-flicker and other
recent functionality. That is what should be used by "production" code
until the CVS HEAD version is useable. (But note, the Win32 backend
has never been claimed to be "production quality", although it works
surprisingly well for the GIMP.)
Tor Lillqvist's avatar
Tor Lillqvist committed
12

13 14 15 16 17 18 19
Note that right now (January 2002), the gtk-1-3-win32-production
branch has more functionality and somewhat cleaner code in gdk/win32.
The code that handles pixmaps and images (DIB sections) and colormaps
(palettes) has been substantially refactored and cleaned up. (For
instance, 256-color mode now work.) Those improvements have not yet
been done here.

20 21 22
Building GTK+ on Win32
======================

Tor Lillqvist's avatar
Tor Lillqvist committed
23
There are two ways to build GTK+ for win32:
24

Tor Lillqvist's avatar
Tor Lillqvist committed
25 26 27
1) Use the autoconf-generated configure script, and the resulting
Makefiles (which use libtool and gcc to do the compilation). I use
this myself, but it might be hell to setup correctly. 
Tor Lillqvist's avatar
Tor Lillqvist committed
28

29 30 31
Personally I run configure with:
CC='gcc -mpentium -fnative-struct' CPPFLAGS='-I/target/include' CFLAGS=-O2 LDFLAGS='-L/target/lib' ./configure --disable-static --prefix=/target --with-gdktarget=win32 --with-wintab=/src/wtkit126 --with-ie55=/src/workshop/ie55_lib --host=i386-pc-mingw32 --enable-maintainer-mode

Tor Lillqvist's avatar
Tor Lillqvist committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
2) Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
makefile.msc in gdk and gtk.

Alternative 1 also generates Microsoft import libraries (.lib), if you
have lib.exe available. It should also work for cross-compilation from
Unix.

There are hand-written makefiles for mingw (look for makefile.mingw in
various directories), but those haven't been kept up-to-date, and
probably won't work without editing. Sorry. If you make them work
again, by all means do submit patches.

Note that I use mainly gcc myself, and thus the build setup for
Microsoft's nmake and cl might be a bit rusty. Hans Breuer has been
taking care of those makefiles. At times, we disagree a bit, and the
msc makefiles might not produce compatible or identically named DLLs
and import libraries as the autoconfiscated makefiles and libtool do.

50 51 52
Using GTK+ on Win32
===================

Tor Lillqvist's avatar
Tor Lillqvist committed
53 54 55 56 57 58
To use GTK+ on Win32, you also need either one of the above mentioned
compilers. Other compilers might work, but don't count on it. The same
instructions on how to set up a correct version of gcc should also be
followed if you want to build applications that use GTk+ with gcc. For
prebuilt developer packages (DLLs, import libraries, headers), see the
above website.
Tor Lillqvist's avatar
Tor Lillqvist committed
59

60 61 62 63 64 65 66 67 68 69 70
Multi-threaded use of GTK+ on Win32
===================================

Multi-threaded GTK+ programs might work in special simple cases, but
not in general. Sorry. If you have all GTK+ and GDK calls in the same
thread, it might work. Otherwise, probably not at all. Possible ways
to fix this are being investigated.

Wintab
======

Tor Lillqvist's avatar
Tor Lillqvist committed
71
The tablet support uses the Wintab API. The Wintab development kit can
Tor Lillqvist's avatar
Tor Lillqvist committed
72 73 74 75
be downloaded from http://www.pointing.com. Pass the --with-wintab
flag to configure if you use that. If you use nmake and you don't care
for Wintab, undefine HAVE_WINTAB in config.h.win32 and remove
references to the wntab32x library from the makefile before building.
76

77 78 79
Libintl
=======

Tor Lillqvist's avatar
Tor Lillqvist committed
80
GTK wants to be built with the GNU "intl" library for
81
internationalisation (i18n). Get the version ported to Win32 (not a
Tor Lillqvist's avatar
Tor Lillqvist committed
82 83 84 85 86 87 88 89 90 91
very big deal) from the web site mentioned above. The "intl" library
as gets built as a DLL called libintl-1.dll. If you don't want any
i18n stuff, undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
config.h.win32 file, and remove references to the intl library from
the makefiles.

Note that while the GNU gettext package is under the GPL, the "intl"
part of it is under the LGPL (like GTK or GLib), as of
gettext-0.10.40.

92 93 94 95 96 97 98 99 100 101 102 103
ActiveIMM
=========

If you want to build a GTK+ that supports ActiveIMM (the Input Method
Manager for non-EastAsia locales that can be used on Win9x/NT4), you
need the dimm.h header file. That is somewhat difficult to find, but
http://msdn.microsoft.com/downloads/samples/internet/wizard/ seems to
be a good place to look nowadays. If you use autoconfiscated build,
pass the --with-ie55 flag to configure specifyin the location of the
ie55_lib directory created by downloading the IE5.5 headers and libs
from the above URL.

Tor Lillqvist's avatar
Tor Lillqvist committed
104
--Tor Lillqvist <tml@iki.fi>