gtk2/README.win32
Tor Lillqvist f6b4585c98 Build Wintab support always on Windows. Don't require the Wintab SDK.
2007-01-19  Tor Lillqvist  <tml@novell.com>

	Build Wintab support always on Windows. Don't require the Wintab
	SDK.

	* configure.in: Drop the --with-wintab option. Drop the
	HAVE_WINTAB feature test macro and Automake variable.

	* acconfig.h
	* config.h.win32.in: Drop HAVE_WINTAB.

	* gdk/win32/gdkevents-win32.c 
	* gdk/win32/gdkinput.c 
	* gdk/win32/gdkinput-win32.h 	
	* gdk/win32/gdkinput-win32.c
	* gdk/win32/gdkmain-win32.c: Make HAVE_WINTAB ifdef blocks
	unconditional.

	* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Try
	to load wintab32.dll dynamically here. If it is found look up the
	handful Wintab functions we use.
	(rest of file): Use these function pointers instead of calling the
	functions from wntab32x.lib. The code in wntab32x.lib did the same
	thing anyway: tried to load wintab32.dll, and looked up the
	addresses of the actual functions from it.

	* gdk/Makefile.am
	* gdk/win32/Makefile.am: Drop the libwntab32x hacks.

	* gdk/win32/wintab.h
	* gdk/win32/pktdef.h: New files. Copied from the Wintab
	SDK. Copyright blurb says: "The text and information contained in
	this file may be freely used, copied, or distributed without
	compensation or licensing restrictions."

	* README.win32: Update a bit. Remove the text about the Wintab
	SDK.


svn path=/trunk/; revision=17186
2007-01-19 01:55:52 +00:00

76 lines
3.2 KiB
Plaintext

The Win32 backend in GTK+ is not as stable or correct as the X11
one.
For prebuilt runtime and developer packages see
http://www.gimp.org/win32/downloads.html .
There is also a gtk-1-3-win32-production branch of GTK+ that was
branched off from before the addition of the no-flicker and other
functionality that was new in GTK+ 2.0.0. The vesion number used for
that branch is 1.3.0. It corresponds most closely to GTK 1.2.7 on
Unix. For new code, you shouldn't be using that.
Building GTK+ on Win32
======================
There are two ways to build GTK+ for win32.
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 can be hard to setup correctly.
Note that I first always edit the ltmain.sh file like this:
sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
Personally I run configure with something like:
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
Then you should just be able to run "make", like on Unix.
An issue is with the gdk-pixbuf.loaders file. It's probably best to do
a "make install" in the gdk-pixbuf directory, and let that set up a
mostly correct gdk-pixbuf.loaders in the target directory. Then copy
that back to the source directory. It's needed in gtk/stock-icons
where make runs gdk-pixbuf-csource.
Etc, you get the idea.
2) Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
makefile.msc in gdk and gtk. Be prepared to manually edit various
makefile.msc files, and the makefile snippets in build/win32.
Alternative 1 also generates Microsoft import libraries (.lib), if you
have lib.exe available. It might also work for cross-compilation from
Unix.
Note that I use method 1 myself. Hans Breuer has been taking care of
the MSVC makefiles. At times, we disagree a bit about various issues,
and for instance the makefile.msc files will not produce identically
named DLLs and import libraries as the "autoconfiscated" makefiles and
libtool do. If this bothers you, you will have to fix the makefiles.
Using GTK+ on Win32
===================
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. Look for
prebuilt developer packages (DLLs, import libraries, headers) on the
above website.
Multi-threaded use of GTK+ on Win32
===================================
Multi-threaded GTK+ programs might work on Windows 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
======
The tablet support uses the Wintab API. Unfortunately it seems that
only Wacom tablet software comes with the required wintab32.dll
nowadays.
--Tor Lillqvist <tml@iki.fi>