]> Pileus Git - ~andy/gtk/blob - README.win32
Add comment about gtk-1-3-win32-production branch currently being ahead in
[~andy/gtk] / README.win32
1 The Win32 port of GTK+ is a work in progress, and not as stable or
2 correct as the Unix/X11 version. For more information about the Win32
3 port, see http://www.gimp.org/win32/ .
4
5 This (CVS HEAD) version of the Win32 backend does *not* necessarily
6 even compile properly. There is a gtk-1-3-win32-production branch that
7 was branched off from before the addition of the no-flicker and other
8 recent functionality. That is what should be used by "production" code
9 until the CVS HEAD version is useable. (But note, the Win32 backend
10 has never been claimed to be "production quality", although it works
11 surprisingly well for the GIMP.)
12
13 Note that right now (January 2002), the gtk-1-3-win32-production
14 branch has more functionality and somewhat cleaner code in gdk/win32.
15 The code that handles pixmaps and images (DIB sections) and colormaps
16 (palettes) has been substantially refactored and cleaned up. (For
17 instance, 256-color mode now work.) Those improvements have not yet
18 been done here.
19
20 Building GTK+ on Win32
21 ======================
22
23 There are two ways to build GTK+ for win32:
24
25 1) Use the autoconf-generated configure script, and the resulting
26 Makefiles (which use libtool and gcc to do the compilation). I use
27 this myself, but it might be hell to setup correctly. 
28
29 Personally I run configure with:
30 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
31
32 2) Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
33 makefile.msc in gdk and gtk.
34
35 Alternative 1 also generates Microsoft import libraries (.lib), if you
36 have lib.exe available. It should also work for cross-compilation from
37 Unix.
38
39 There are hand-written makefiles for mingw (look for makefile.mingw in
40 various directories), but those haven't been kept up-to-date, and
41 probably won't work without editing. Sorry. If you make them work
42 again, by all means do submit patches.
43
44 Note that I use mainly gcc myself, and thus the build setup for
45 Microsoft's nmake and cl might be a bit rusty. Hans Breuer has been
46 taking care of those makefiles. At times, we disagree a bit, and the
47 msc makefiles might not produce compatible or identically named DLLs
48 and import libraries as the autoconfiscated makefiles and libtool do.
49
50 Using GTK+ on Win32
51 ===================
52
53 To use GTK+ on Win32, you also need either one of the above mentioned
54 compilers. Other compilers might work, but don't count on it. The same
55 instructions on how to set up a correct version of gcc should also be
56 followed if you want to build applications that use GTk+ with gcc. For
57 prebuilt developer packages (DLLs, import libraries, headers), see the
58 above website.
59
60 Multi-threaded use of GTK+ on Win32
61 ===================================
62
63 Multi-threaded GTK+ programs might work in special simple cases, but
64 not in general. Sorry. If you have all GTK+ and GDK calls in the same
65 thread, it might work. Otherwise, probably not at all. Possible ways
66 to fix this are being investigated.
67
68 Wintab
69 ======
70
71 The tablet support uses the Wintab API. The Wintab development kit can
72 be downloaded from http://www.pointing.com. Pass the --with-wintab
73 flag to configure if you use that. If you use nmake and you don't care
74 for Wintab, undefine HAVE_WINTAB in config.h.win32 and remove
75 references to the wntab32x library from the makefile before building.
76
77 Libintl
78 =======
79
80 GTK wants to be built with the GNU "intl" library for
81 internationalisation (i18n). Get the version ported to Win32 (not a
82 very big deal) from the web site mentioned above. The "intl" library
83 as gets built as a DLL called libintl-1.dll. If you don't want any
84 i18n stuff, undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
85 config.h.win32 file, and remove references to the intl library from
86 the makefiles.
87
88 Note that while the GNU gettext package is under the GPL, the "intl"
89 part of it is under the LGPL (like GTK or GLib), as of
90 gettext-0.10.40.
91
92 ActiveIMM
93 =========
94
95 If you want to build a GTK+ that supports ActiveIMM (the Input Method
96 Manager for non-EastAsia locales that can be used on Win9x/NT4), you
97 need the dimm.h header file. That is somewhat difficult to find, but
98 http://msdn.microsoft.com/downloads/samples/internet/wizard/ seems to
99 be a good place to look nowadays. If you use autoconfiscated build,
100 pass the --with-ie55 flag to configure specifyin the location of the
101 ie55_lib directory created by downloading the IE5.5 headers and libs
102 from the above URL.
103
104 --Tor Lillqvist <tml@iki.fi>