Update.
2007-03-09 Tor Lillqvist <tml@novell.com> * README.win32: Update. svn path=/trunk/; revision=17441
This commit is contained in:
committed by
Tor Lillqvist
parent
3eb22a1ff8
commit
ccc9e3ba27
@ -1,3 +1,7 @@
|
|||||||
|
2007-03-09 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* README.win32: Update.
|
||||||
|
|
||||||
2007-03-08 Matthias Clasen <mclasen@redhat.com>
|
2007-03-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gdk/x11/gdkasync.c (send_event_handler): Defer the callbacks
|
* gdk/x11/gdkasync.c (send_event_handler): Defer the callbacks
|
||||||
|
|||||||
108
README.win32
108
README.win32
@ -1,41 +1,82 @@
|
|||||||
The Win32 backend in GTK+ is not as stable or correct as the X11
|
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||||
one.
|
|
||||||
|
|
||||||
For prebuilt runtime and developer packages see
|
For prebuilt runtime and developer packages see
|
||||||
http://www.gimp.org/win32/downloads.html .
|
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||||
|
|
||||||
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
|
Building GTK+ on Win32
|
||||||
======================
|
======================
|
||||||
|
|
||||||
There are two ways to build GTK+ for win32.
|
First you obviously need developer packages for the compile-time
|
||||||
|
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||||
|
zlib, libtiff at least. See
|
||||||
|
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||||
|
|
||||||
1) Use the autoconf-generated configure script, and the resulting
|
After installing the dependencies, there are two ways to build GTK+
|
||||||
Makefiles (which use libtool and gcc to do the compilation). I use
|
for win32.
|
||||||
this myself, but it can be hard to setup correctly.
|
|
||||||
|
|
||||||
Note that I first always edit the ltmain.sh file like this:
|
1) GNU tools, ./configure && make install
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
This requires you have mingw and MSYS.
|
||||||
|
|
||||||
|
Use the 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.
|
||||||
|
|
||||||
|
The full script I run to build GTK+ 2.10 unpacked from a source
|
||||||
|
distribution is as below. This is from bulding GTK+ 2.10.9, slightly
|
||||||
|
edited to make it match this 2.11 development branch. Actually I don't
|
||||||
|
use any script like this to build the development branch, as I don't
|
||||||
|
distribute any binaries from development branches.
|
||||||
|
|
||||||
|
MOD=gtk+
|
||||||
|
VER=2.10.9
|
||||||
|
THIS=$MOD-$VER
|
||||||
|
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||||
|
TARGET=c:/devel/target/$HEX
|
||||||
|
DEPS="`/devel/src/tml/latest.sh glib atk cairo pango`"
|
||||||
sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
|
sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
|
||||||
|
usedev
|
||||||
|
usemsvs6
|
||||||
|
MY_PKG_CONFIG_PATH=""
|
||||||
|
for D in $DEPS; do
|
||||||
|
PATH=/devel/dist/$D/bin:$PATH
|
||||||
|
MY_PKG_CONFIG_PATH=/devel/dist/$D/lib/pkgconfig:$MY_PKG_CONFIG_PATH
|
||||||
|
done
|
||||||
|
PKG_CONFIG_PATH=$MY_PKG_CONFIG_PATH:$PKG_CONFIG_PATH CC='gcc -mtune=pentium3 -mthreads' CPPFLAGS='-I/opt/gnu/include -I/opt/gnuwin32/include -I/opt/misc/include' LDFLAGS='-L/opt/gnu/lib -L/opt/gnuwin32/lib -L/opt/misc/lib -Wl,--enable-auto-image-base' LIBS=-lintl CFLAGS=-O2 ./configure --with-gdktarget=win32 --enable-debug=yes --disable-gtk-doc --disable-static --prefix=$TARGET &&
|
||||||
|
libtoolcacheize &&
|
||||||
|
unset MY_PKG_CONFIG_PATH &&
|
||||||
|
PATH=/devel/target/$HEX/bin:.libs:$PATH make install &&
|
||||||
|
(cd $TARGET/bin; strip --strip-unneeded *.dll *.exe) &&
|
||||||
|
(cd $TARGET/lib/gtk-2.0/2.10.0/loaders; strip --strip-unneeded *.dll) &&
|
||||||
|
(cd $TARGET/lib/gtk-2.0/2.10.0/immodules; strip --strip-unneeded *.dll) &&
|
||||||
|
(cd $TARGET/lib/gtk-2.0/2.10.0/engines; strip --strip-unneeded *.dll) &&
|
||||||
|
PATH=$TARGET/bin:$PATH gdk-pixbuf-query-loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||||
|
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||||
|
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||||
|
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||||
|
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||||
|
./gtk-zip.sh &&
|
||||||
|
(cd /devel/src/tml && zip /tmp/$MOD-dev-$VER.zip make/$THIS.make) &&
|
||||||
|
manifestify /tmp/$MOD*-$VER.zip
|
||||||
|
|
||||||
Personally I run configure with something like:
|
You should not just copy the above blindly. There are some things in
|
||||||
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
|
the script that are very specific to *my* build setup on *my* current
|
||||||
|
machine. For instance the "latest.sh" script, the "usedev" and
|
||||||
|
"usemsvs6" shell functions, the /devel/dist folder. The above script
|
||||||
|
is really just meant for reference, to give an idea. You really need
|
||||||
|
to understand what things like PKG_CONFIG_PATH are and set them up
|
||||||
|
properly after installing the dependencies before building GTK+.
|
||||||
|
|
||||||
Then you should just be able to run "make", like on Unix.
|
As you see above, after running configure, one can just say "make
|
||||||
|
install", like on Unix. A post-build fix is needed, running
|
||||||
|
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
|
||||||
|
file.
|
||||||
|
|
||||||
An issue is with the gdk-pixbuf.loaders file. It's probably best to do
|
2) Microsoft's tools
|
||||||
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.
|
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||||
|
|
||||||
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 in gdk and gtk. Be prepared to manually edit various
|
||||||
makefile.msc files, and the makefile snippets in build/win32.
|
makefile.msc files, and the makefile snippets in build/win32.
|
||||||
|
|
||||||
@ -43,10 +84,10 @@ Alternative 1 also generates Microsoft import libraries (.lib), if you
|
|||||||
have lib.exe available. It might also work for cross-compilation from
|
have lib.exe available. It might also work for cross-compilation from
|
||||||
Unix.
|
Unix.
|
||||||
|
|
||||||
Note that I use method 1 myself. Hans Breuer has been taking care of
|
I use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||||
the MSVC makefiles. At times, we disagree a bit about various issues,
|
makefiles. At times, we disagree a bit about various issues, and for
|
||||||
and for instance the makefile.msc files will not produce identically
|
instance the makefile.msc files might not produce identically named
|
||||||
named DLLs and import libraries as the "autoconfiscated" makefiles and
|
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||||
|
|
||||||
Using GTK+ on Win32
|
Using GTK+ on Win32
|
||||||
@ -68,8 +109,9 @@ all. Possible ways to fix this are being investigated.
|
|||||||
Wintab
|
Wintab
|
||||||
======
|
======
|
||||||
|
|
||||||
The tablet support uses the Wintab API. Unfortunately it seems that
|
The tablet support uses the Wintab API. The Wintab development kit is
|
||||||
only Wacom tablet software comes with the required wintab32.dll
|
no longer required. The wintab.h header file is bundled with GTK+
|
||||||
nowadays.
|
sources. Unfortunately it seems that only Wacom tablets come with
|
||||||
|
support for the Wintab API nowadays.
|
||||||
|
|
||||||
--Tor Lillqvist <tml@iki.fi>
|
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||||
|
|||||||
Reference in New Issue
Block a user