GTK is a multi-platform toolkit for creating graphical user interfaces.
Go to file
Matthias Clasen 54863bbba6 Correct a doc comment
Add 'papi' to the list of possible print backends, and mention 'file'
instead of 'pdf'.
2009-08-08 22:43:16 -04:00
contrib Add git.mk to generate .gitignore files 2009-05-04 14:29:21 -04:00
debian Revert name change 2008-07-01 22:57:50 +00:00
demos Add SVG support to GtkPrintBackendFile 2009-08-03 11:25:19 +02:00
docs Add a GtkIconView::item-padding property 2009-08-06 23:56:30 -04:00
examples fix build for gtkdial example 2009-04-28 14:34:44 -04:00
gdk Avoid some gratitious behaviour changes 2009-08-08 22:00:07 -04:00
gdk-pixbuf Make gdk-pixbuf-csource work on Windows also in the build tree. 2009-08-02 10:40:13 +03:00
gtk Correct a doc comment 2009-08-08 22:43:16 -04:00
m4macros Add git.mk to generate .gitignore files 2009-05-04 14:29:21 -04:00
modules Get default cover sheets from each printer separately 2009-08-05 10:34:27 +02:00
perf Add git.mk to generate .gitignore files 2009-05-04 14:29:21 -04:00
po Updated Arabic translation 2009-08-08 21:32:20 +03:00
po-properties Updated Irish translation 2009-08-08 02:23:01 -06:00
tests Enable big_window bench on win32, dialog for everyone 2009-07-26 19:14:05 +02:00
acinclude.m4 Copy newer versions of JH_CHECK_XML_CATALOG and JH_PATH_XML_CATALOG from 2003-08-10 22:30:02 +00:00
AUTHORS small update 2006-03-24 03:09:08 +00:00
autogen.sh Bug 551355 – [PATCH] Make glib build with libtool 2.2 2008-10-11 00:05:31 +00:00
ChangeLog.gtk-async-file-chooser added ChangeLog entries from the kris-async-branch. 2006-05-02 09:58:08 +00:00
ChangeLog.gtk-printing Add ChangeLog.gtk-printing 2006-05-02 09:15:34 +00:00
ChangeLog.pre-1-0 ChangeLog split up into ChangeLog.pre-1-0 and ChangeLog. 1998-04-17 01:07:36 +00:00
ChangeLog.pre-1-2 Apply a cleanup patch by Kjartan Maraas (#341812) 2006-10-08 05:07:55 +00:00
ChangeLog.pre-2-0 Apply a cleanup patch by Kjartan Maraas (#341812) 2006-10-08 05:07:55 +00:00
ChangeLog.pre-2-2 Split ChangeLog 2002-12-28 21:24:40 +00:00
ChangeLog.pre-2-4 Move aside ChangeLog for 2.4 2004-05-04 20:12:19 +00:00
ChangeLog.pre-2-6 Split ChangeLog for 2.6 2005-01-10 15:56:14 +00:00
ChangeLog.pre-2-8 Truncate ChangeLog after moving aside 2005-08-24 18:51:56 +00:00
ChangeLog.pre-2-10 Branch for 2.10 2006-08-23 03:51:48 +00:00
ChangeLog.pre-2-12 === Branch for 2.12 === 2007-11-19 09:26:25 +00:00
ChangeLog.pre-2-14 updated version number to 2.15.0 for development. 2008-09-18 14:55:35 +00:00
ChangeLog.pre-2-16 Rename ChangeLog to ChangeLog.pre-2-20 2009-04-03 01:48:22 -04:00
config.h.win32.in Undef USE_MMX for msvc build 2009-07-04 12:19:07 +02:00
configure.in Fix configure.in to work without --with-gdktarget on non-X11. 2009-08-02 10:32:47 +03:00
COPYING Changed LGPL address for FSF in all .h and .c files 1998-04-13 02:02:47 +00:00
gail-uninstalled.pc.in Bug #536430. Add libgailutil.la into gail-uninstalled.pc.in. 2008-07-03 08:48:24 +00:00
gail.pc.in Integrate gail into gtk+. Bug #169488. 2007-12-18 13:51:12 +00:00
gdk-2.0-uninstalled.pc.in Bug 540529 – Remove all GIMP references 2008-07-03 05:47:22 +00:00
gdk-2.0.pc.in Bug 540529 – Remove all GIMP references 2008-07-03 05:47:22 +00:00
gdk-pixbuf-2.0-uninstalled.pc.in Update version to 2.0.0 2002-03-05 21:04:09 +00:00
gdk-pixbuf-2.0.pc.in 2.6.1 2005-01-08 07:50:46 +00:00
git.mk Add git.mk to generate .gitignore files 2009-05-04 14:29:21 -04:00
gtk-config-2.0.in Updated. 2001-04-03 18:48:46 +00:00
gtk-engine-check-abi.sh Add a little script 2006-03-11 02:24:52 +00:00
gtk-zip.sh.in Include all of share/man, lib/pkgconfig, share/aclocal and share/gtk-doc 2008-09-24 09:22:58 +00:00
gtk+-2.0-uninstalled.pc.in Bug 540529 – Remove all GIMP references 2008-07-03 05:47:22 +00:00
gtk+-2.0.pc.in Bug 540529 – Remove all GIMP references 2008-07-03 05:47:22 +00:00
gtk+-unix-print-2.0.pc.in Bug 540529 – Remove all GIMP references 2008-07-03 05:47:22 +00:00
gtk+.spec.in Revert name change 2008-07-01 22:57:50 +00:00
HACKING Point to better place for git documentation 2009-05-03 23:44:01 -04:00
INSTALL.in Update 2008-09-04 05:48:17 +00:00
MAINTAINERS update file format 2007-08-08 03:11:35 +00:00
makecopyright Revert name change 2008-07-01 22:57:50 +00:00
Makefile.am Fix "srdcir" typo 2009-06-09 18:15:24 +02:00
Makefile.decl Fix make check 2009-01-01 21:14:07 +00:00
makefile.msc new file to build it all ... added to EXTRA_DIST 2003-07-20 15:50:14 +00:00
NEWS Updates 2009-07-24 22:52:21 -04:00
NEWS.pre-1-0 ooops, fogot this on my last commit... 1998-05-07 07:45:04 +00:00
README.commits Update README files to refer to git 2009-03-31 19:34:23 -04:00
README.in Make jasper support optional 2009-07-16 20:54:42 -04:00
README.win32 Update. 2007-03-09 10:00:22 +00:00
sanitize-la.sh Shell script used to strip dependencies out of .la files. 2002-03-03 02:50:26 +00:00
sanity_check [ Merges from gtk-1-2 ] 1999-09-28 20:19:13 +00:00

The Win32 backend in GTK+ is not as stable or correct as the X11 one.

For prebuilt runtime and developer packages see
http://ftp.gnome.org/pub/gnome/binaries/win32/

Building GTK+ on 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 .

After installing the dependencies, there are two ways to build GTK+
for win32.

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
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

You should not just copy the above blindly. There are some things in
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+.

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.

2) Microsoft's tools
--------------------

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.

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 might 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. The Wintab development kit is
no longer required. The wintab.h header file is bundled with GTK+
sources. Unfortunately it seems that only Wacom tablets come with
support for the Wintab API nowadays.

--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>