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