Instructions for building for win32 using cross-compilation

Tested on Debian Sarge

1) Install jhbuild, unzip, libglib2.0-dev (for glib-genmarshal),
mingw32-binutils, mingw32-runtime and nsis packages via APT
jhbuild needs to be at least version 2.30.2 for .tar.xz file support.

2) Mingw32 compiler

You need the right version of mingw32, which supports shared libgcc, or else
exceptions don't work and everything breaks. There are 2 packages in Debian distributions:
mingw32, and gcc-mingw32. In the past gcc-mingw32 in Ubuntu Natty and Debian (at least)
was built with --disable-shared, which breaks C++ exception handling. See
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625778). As of the middle of 2012,
this is no longer the case.

Basically, check that the version of mingw32 you have installs a libgcc_s.a
and provides libgcc_sjlj_1.dll.

Also possible is to rebuild mingw32 to use DWARF style exception handling, as
well as shared libgcc (in which case, you'll have libgcc_dw2_1.dll instead of
libgcc_sjlj_1.dll. This provides a slightly larger but faster library, and can be done
because we build all our dependencies and can be sure we'll never throw an exception
across a foreign library (which doesn't work with DWARF style exceptions).

-- OpenMP support --
As of Feb 2013, neither the mingw32 nor gcc-mingw32 packages provide OpenMP support. mingw32
because it's too old, gcc-mingw32 apparently because the pthreads library isn't stable enough
for them (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625779)

3) make distclean in the toplevel directory to unconfigure it, if you've been
building there already. It needs to be unconfigured for the cross compile done by
the script in the next step.
4) cd into win32 and run either cross-build-repsnapper-rls (Release version) or
cross-build-repsnapper-dbg (Debug)

Hopefully, it all runs succesfully - at which point there should be a usable tree in
win32/checkout.rls (or checkout.dbg)

The result executable should be in win32/target.dbg/bin/repsnapper.exe

In case of the release build, an installer exe (repsnapper-$VERSION.exe) will be built
in the win32 directory.

