X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=README.win32;h=6aa13c78a0924bb49ed923367d97f2fe82207380;hb=321428fee7b38deeefa2ad491efca8cfe795f8d8;hp=0c527f01a09a36750a40c3381373423dd88931be;hpb=06b4ef65174e56e766e4bde06e08e34c08788272;p=~andy%2Fgtk diff --git a/README.win32 b/README.win32 index 0c527f01a..6aa13c78a 100644 --- a/README.win32 +++ b/README.win32 @@ -1,62 +1,93 @@ -The Win32 port of GTK+ is a work in progress, and not as stable or -correct as the Unix/X11 version. For more information about the Win32 -port, see http://www.gimp.org/win32/ . +The Win32 backend in GTK+ is not as stable or correct as the X11 +one. -This (CVS HEAD) version of the Win32 backend does *not* necessarily -even compile properly. There is a gtk-1-3-win32-production branch that -was branched off from before the addition of the no-flicker and other -recent functionality. That is what should be used by "production" code -until the CVS HEAD version is useable. (But note, the Win32 backend -has never been claimed to be "production quality", although it works -surprisingly well for the GIMP.) +For prebuilt runtime and developer packages see +http://www.gimp.org/win32/downloads.html . -There are two ways to build GTK+ for 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 +====================== + +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 might be hell to setup correctly. +this myself, but it can be hard to setup correctly. + +Personally I run configure with: +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 + +Then, in theory, you can just say "make", like on Unix. In reality, +there are a few hickups that require manual intervention, and it's +best to run make separately in each subdirectory. At least for me, +when libtool creates an .exe file, it puts the real .exe in the .libs +directory, and leaves a wrapper .exe in the work directory. For some +reason that wrapper doesn't work for me, it doesn't do anything. So, I +always do a "cp .libs/*.exe ." after running a make that has produced +some exes. + +Another 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. It can be a bit of a pain. 2) Use the Microsoft compiler, cl and Make, nmake. Say nmake -f -makefile.msc in gdk and gtk. +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 should also work for cross-compilation from +have lib.exe available. It might also work for cross-compilation from Unix. -There are hand-written makefiles for mingw (look for makefile.mingw in -various directories), but those haven't been kept up-to-date, and -probably won't work without editing. Sorry. If you make them work -again, by all means do submit patches. +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. -Note that I use mainly gcc myself, and thus the build setup for -Microsoft's nmake and cl might be a bit rusty. Hans Breuer has been -taking care of those makefiles. At times, we disagree a bit, and the -msc makefiles might not produce compatible or identically named DLLs -and import libraries as the autoconfiscated makefiles and libtool do. +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. The same -instructions on how to set up a correct version of gcc should also be -followed if you want to build applications that use GTk+ with gcc. For -prebuilt developer packages (DLLs, import libraries, headers), see the +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 can be downloaded from http://www.pointing.com. Pass the --with-wintab flag to configure if you use that. If you use nmake and you don't care for Wintab, undefine HAVE_WINTAB in config.h.win32 and remove references to the wntab32x library from the makefile before building. -GTK wants to be built with the GNU "intl" library for -internationalisation (i18n). Get the version ported to Win32 (not a -very big deal) from the web site mentioned above. The "intl" library -as gets built as a DLL called libintl-1.dll. If you don't want any -i18n stuff, undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the -config.h.win32 file, and remove references to the intl library from -the makefiles. - -Note that while the GNU gettext package is under the GPL, the "intl" -part of it is under the LGPL (like GTK or GLib), as of -gettext-0.10.40. +ActiveIMM +========= + +If you want to build a GTK+ that supports ActiveIMM (the Input Method +Manager for non-EastAsia locales that can be used on Win9x/NT4), you +need the dimm.h header file. That is somewhat difficult to find, but +http://msdn.microsoft.com/downloads/samples/internet/wizard/ seems to +be a good place to look nowadays. If you use "autoconfiscated" build, +pass the --with-ie55 flag to configure specifying the location of the +ie55_lib directory created by downloading the IE5.5 headers and libs +from the above URL. --Tor Lillqvist