]> Pileus Git - ~andy/gtk/blob - README.win32
Build Wintab support always on Windows. Don't require the Wintab SDK.
[~andy/gtk] / README.win32
1 The Win32 backend in GTK+ is not as stable or correct as the X11
2 one. 
3
4 For prebuilt runtime and developer packages see
5 http://www.gimp.org/win32/downloads.html .
6
7 There is also a gtk-1-3-win32-production branch of GTK+ that was
8 branched off from before the addition of the no-flicker and other
9 functionality that was new in GTK+ 2.0.0. The vesion number used for
10 that branch is 1.3.0. It corresponds most closely to GTK 1.2.7 on
11 Unix. For new code, you shouldn't be using that.
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 can be hard to setup correctly.
21
22 Note that I first always edit the ltmain.sh file like this:
23 sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
24
25 Personally I run configure with something like:
26 CC='gcc -mtune=pentium3 -mthreads' CPPFLAGS='-I/opt/gnuwin32/include -I/opt/gnu/include -I/opt/misc/include' CFLAGS=-g LIBS=-lintl LDFLAGS='-L/opt/gnuwin32/lib -L/opt/gnu/lib -L/opt/misc/lib' ./configure --prefix=c:/devel/target/HEAD --with-gdktarget=win32 --enable-maintainer-mode --enable-debug=yes --enable-explicit-deps=no --with-included-loaders=png,bmp,gif,ico,jpeg,tiff,xpm
27
28 Then you should just be able to run "make", like on Unix.
29
30 An issue is with the gdk-pixbuf.loaders file. It's probably best to do
31 a "make install" in the gdk-pixbuf directory, and let that set up a
32 mostly correct gdk-pixbuf.loaders in the target directory. Then copy
33 that back to the source directory. It's needed in gtk/stock-icons
34 where make runs gdk-pixbuf-csource.
35
36 Etc, you get the idea.
37
38 2) Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
39 makefile.msc in gdk and gtk. Be prepared to manually edit various
40 makefile.msc files, and the makefile snippets in build/win32.
41
42 Alternative 1 also generates Microsoft import libraries (.lib), if you
43 have lib.exe available. It might also work for cross-compilation from
44 Unix.
45
46 Note that I use method 1 myself. Hans Breuer has been taking care of
47 the MSVC makefiles. At times, we disagree a bit about various issues,
48 and for instance the makefile.msc files will not produce identically
49 named DLLs and import libraries as the "autoconfiscated" makefiles and
50 libtool do. If this bothers you, you will have to fix the makefiles.
51
52 Using GTK+ on Win32
53 ===================
54
55 To use GTK+ on Win32, you also need either one of the above mentioned
56 compilers. Other compilers might work, but don't count on it. Look for
57 prebuilt developer packages (DLLs, import libraries, headers) on the
58 above website.
59
60 Multi-threaded use of GTK+ on Win32
61 ===================================
62
63 Multi-threaded GTK+ programs might work on Windows in special simple
64 cases, but not in general. Sorry. If you have all GTK+ and GDK calls
65 in the same thread, it might work. Otherwise, probably not at
66 all. Possible ways to fix this are being investigated.
67
68 Wintab
69 ======
70
71 The tablet support uses the Wintab API. Unfortunately it seems that
72 only Wacom tablet software comes with the required wintab32.dll
73 nowadays.
74
75 --Tor Lillqvist <tml@iki.fi>