I spent some time today getting a build environment going on Win32, and since I had some unexpected (for me) success, I thought I'd take a stab at what we were talking about yesterday and write down the process. I used MSYS for the build environment, and it did seem a bit easier to install and less confusing to me than using mingw within cygwin. Though it might be limiting to someone accustomed to cygwin. Caveats: - I actually only built through Pango and didn't do ATK/GTK+. I committed a few fixes to GLib and Pango (use of grep -m which was too new for msys, trailing / on -I lines), so ATK and GTK+ may need similar fixes. Or may have worse problems. - I didn't include FreeType and fontconfig in this because my interest was in working on FreeType-free Pango/Cairo integration on Windows. As written the GTK+ should be functional, but GIMP (e.g.) requires PangoFT2 currently. - I'm not sure if this will give compatible DLL's with Tor's prebuilt tarballs. I didn't check. It definitely doesn't have the relocatable packaging magic for pango.modules and so forth. - Version numbers are exactly what I used. Newer versions might work. Older versions might work. - The instructions were written after the fact from sketchier notes, and haven't been double-checked. - I'm not sure that mixing downloaded tarballs and newly compiled stuff in C:\gtk is a good thing for long-term work. Though it's simple. - I really have no clue what I'm doing when working on Win32 :-) If someone with a win32 clue wanted to pick this up and adapt it into something that could be incorporated into the GTK+ API docs it would be (IMO) very cool. It might even inspire us to update the now seriously out-of-date Unix build instructions. We could also, of coure, have MSVC instructions in the docs, if someone wanted to write those. Regards, Owen
Step 1: Install MingW and MSYS ============================== From http://www.mingw.org/download.shtml Download: MinGW-3.2.0-rc-1.exe MSYS-1.0.10.exe msysDTK-1.0.1.exe And install them in that order, taking the default install locations of c:\mingw and c:\msys\1.0. During SYS installation, you'll be prompted for where you installed mingw. A link for MSYS will be created on your desktop, that launches a terminal. Much work in the following will be done in that terminal. Note that for some of the following steps you need an editor that can be invoked from the command line and handle Unix line endings. vi is included with MSYS, but you may want to use Emacs fom http://ftp.gnu.org/gnu/windows/emacs/, or something more friendly to non-Unix-heads. Step 2: Installing the rest of the dependencies =============================================== From the links on http:///www.gimp.org/~tml/gimp/win32/downloads.html Download: glib-2.4.7.zip pkgconfig-0.15.zip libiconv-1.9.1.tar.gz gettext-runtime-0.13.1.zip gettext-tools-0.13.1.zip Zlib 1.2.1 Create c:/gtk and unpack all of the zip files directly into that directory. zlib1.dll will need to be moved from c:/gtk to c:/gtk/bin. From http://gnuwin32.sourceforge.net/packages.html, download the "Binaries" and "Developer Files" for: LibPng-1.2.8 LibJpeg-6b LibTiff-3.6.1 LibTool-1.5.8 (the msys version is too old) Unpack these all directly in c:\gtk, instead of in the default gnuwin32 location. A manual fixup is needed for libtool .. edit /gtk/bin/libtoolize and the line that sets prefix=<default location> to prefix=/gtk. Step 3: Set up your MSYS environment ==================================== Inside msys, edit /etc/fstab and add a line: c:\gtk \gtk Create a .profile directory in your MSYS homedir (which is *not* the same as your Win32 homedir) with the lines: export CVS_RSH=ssh export ACLOCAL_FLAGS="-I /gtk/share/aclocal/" export LDFLAGS="-L/gtk/lib" export CPPFLAGS="-I/gtk/include" export PATH="/gtk/bin:$PATH" Quit msys and rerun it to pick up these environment variables. Step 4: Making a fake gtk-doc ============================= Check out gtk-doc from gnome cvs $ cvs -d :pserver:anonymous anoncvs gnome org:/cvs/gnome get gtk-doc (Substitute appropriately for non-anonymous CVS.) Inside the gtk-doc directory, copy gtkdocize.in to gtkdocize, and edit the new file. Change: @PACKGAGE@ => gtk-doc @VERSION@ => 1.3 @PREFIX@ => /gtk @datadir@ => /gtk/share Then install a few files into place $ cp gtk-doc.m4 /gtk/share/share/aclocal $ cp gtkdocize /gtk/bin $ mkdir -p /gtk/share/gtk-doc/data/ $ cp gtk gtk-doc.make /gtk/share/gtk-doc/data Step 5: Building glib ===================== Check out glib from gnome cvs $ cvs -d :pserver:anonymous anoncvs gnome org:/cvs/gnome get gtk-doc Inside the glib directory $ run ./autogen.sh --prefix=/gtk $ make $ make install Step 6: And the rest ==================== Repeat the above for pango, atk, and gtk+
Attachment:
signature.asc
Description: This is a digitally signed message part