So far this is a log of my experiments. There are still lots of issues from here to a working build of Gtk+ so don't expect too much
Latest efforts by SamThursfield to get a good native mingw build environment running. These will supplant the instructions at http://afuera.me.uk/jhbuild-windows/ but are currently a work-in-progress.
My current goals are
- Use jhbuild from git.gnome.org instead of the old Gitorious branch
- Set up a buildbot slave to keep the Windows port free of regressions
- Investigate 64-bit builds, and whether the mingw.org and mingw-w32 compilers are compatible in either direction (I suspect mingw.org-built code is compatible with mingw-w32 but not the other way around, since mingw-w32 in other areas provides more complete headers etc)
- Set up a mingw-get package repository for the Gnome platform libraries, and generally make getting a Windows build environment super easy for everyone
MSYS is a minimal POSIX environment, which is part of the mingw.org project.
- Create a build root directory, such as c:\build.
Download http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.4-alpha-1/mingw-get-0.4-mingw32-alpha-1-bin.zip/download and extract it to c:\build\mingw\
- Copy the file c:\build\mingw\var\lib\mingw-get\data\defaults.xml to profile.xml
- Copy c:\build\mingw\msys\1.0\etc\fstab.sample to fstab and edit it so
that c:\build\mingw is mounted at /mingw
c:\build\mingw\bin\mingw-get install msys-base msys-patch msys-unzip msys-vim msys-wget
- Edit (in the shell) ~/.profile and add the following lines:
export PATH=/c/build/bin:$PATH # jhbuild needs to know shell location to be able to run it export SHELL=/bin/sh
Restart the shell.
You have the choice between two gcc builds.
mingw.org: the "standard" compiler
c:\build\mingw\bin\mingw-get install mingw32 mingw32-g++
mingw-w64: a separate project, with more complete headers, a 64-bit compiler and various other novelties. It is not packaged in mingw-get format, you just download a big bundle and extract it. Be careful to NOT install any gcc/binutils packages from mingw-get in a mingw-w64 environment.
I'm not touching this until mingw.org builds are working
You also need (in either case):
c:\build\mingw\bin\mingw-get install mingw32-autotools mingw32-gettext
A note on dual-compiler setups
It seems like maybe this should be possible, but I definitely don't want to be involved in lots of "this is slightly the wrong dll" problems so for now I recommend that if you want to use both toolchains, keep them in completely seperate build environments, with different MSYS installations etc.
I suggest you put these in c:\tools or some such, as they are self-contained and have no effect on your build targets etc.
msysGIT: make sure you prevent the installer from adding anything to the PATH ("Use Git Bash Only"), because it contains its own versions of MSYS and you really don't want version conflicts here. Choose "Checkout Windows-style, commit Unix-style line endings" as well.
Python 2.7: make sure the installer adds Python to the PATH.
DieterVerfaillie is working on binary packaging of various components.
Stable ones are available at: http://ftp.gnome.org/pub/gnome/binaries/win32
Experimental ones are currently at: http://optionexplicit.be/projects/gnome-windows/
Building the platform from source
If you'd like fresh builds of your platform libraries, for example to do testing or development of the platform itself, you need to build everything from the latest sources using jhbuild.
Download and unzip into the prefix:
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.26-1_win32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip
# Cheeky! cp c:/build/mingw/bin/libintl8.dll c:/build/bin/intl.dll
Using msysGIT, run
git clone git://git.gnome.org/jhbuild.git git checkout --track origin/windows
In an MSYS shell, run ./autogen.sh --prefix=/c/build make && make install
Create the file c:\build\bin\git and give it the contents:
cmd /c "c:\tools\git\bin\git $*"
This allows jhbuild to call out to git. Git still sits in its own, independent MSYS environment at the moment because it's so sensitive to bugs and version differences. One day it should be packaged as a standard MSYS component.
Copy examples/mingw32.jhbuild to ~/.jhbuildrc and edit the settings to your liking.
Download, build and install the latest freetype from http://www.freetype.org/ (would be nice if we could conditionally add it to a moduleset, or MSYS package it or something All available binaries are quite out of date right now.
Now you can run jhbuild and everything builds of course with no issues
Manual interruptions to build process
* Ironically, Launchpad uses self-signed SSL certificates, so wget of intltool fails and you must wget the file manually with --no-check-certificate
Modules that don't work
rarian (not useful anyway)