Steps for using Mingw-cross-env
- Install the mingw-cross-env requirements: http://mingw-cross-env.nongnu.org/#requirements
- Download mingw-cross-env:
hg clone http://hg.savannah.nongnu.org/hgweb/mingw-cross-env
Note: The commands below use mingw-cross-env/ as the base directory where mingw-cross-env resides. Replace this with the path you actually use, e.g. /opt/mingw/.
Second note: The install step includes setting your PATH variable to include mingw-cross-env/usr/bin.
- Build gcc and Warzone requirements (in mingw-cross-env/):
make gcc JOBS=4 zlib bfd gettext jpeg libpng ogg vorbis openal theora qt sdl physfs glew freetype fontconfig fribidi libiberty
JOBS=X specifies how many processes to run concurrently, corresponding to -jX in normal make runs. -jX will build X packages in parallel, this is much less useful.
Add mingw-cross-env/usr/bin to the PATH, e.g.
export PATH=/opt/mingw/usr/bin:$PATH
- Add some additionally needed files:
From http://download.gna.org/warzone/development/devpkg/2.3-cross/20100127-devpkg_tarbomb-2.3.tar.bz2
bin/dbghelp.dll.license.txt bin/dbghelp.dll bin/oalinst.exe lib/libdbghelp.a include/dbghelp.hto mingw-cross-env/usr/i686-pc-mingw32/<dir>/<file>
From your Warzone clone:
pkg/nsis/fonts.conf.wd_*and from your system:
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttfto mingw-cross-env/usr/i686-pc-mingw32/etc/fonts/
- Execute autogen.sh then configure like so (in the build directory / warzone directory for in-tree builds):
./configure --host=i686-pc-mingw32 --enable-static PKG_CONFIG=i686-pc-mingw32-pkg-config \ CC_FOR_BUILD="gcc" CXX_FOR_BUILD="g++" \ CFLAGS="-pipe -m32 -march=i686 -O2 -g -gstabs -g3" \ CXXFLAGS="-pipe -m32 -march=i686 -O2 -g -gstabs -g3 -fno-exceptions" \ --enable-installer --with-installer-extdir="/mingw-cross-env-dir/usr/i686-pc-mingw32" \ --with-installer-version="2.46.0.0" --disable-debug
And run
makeafter.
