Cross-compiling the tests with MinGW

Setup of the MinGW cross-compiling environment

The most daunting problem while trying to cross-compile the Wine tests is the setup of the MinGW cross-compiling environment. Here are some instructions for different Linux distributions and *BSD systems to help with this problem.

Debian GNU/Linux

On Debian all you need to do is type apt-get install mingw32.

Red Hat Linux like rpm systems

This includes Fedora Core, Red Hat Enterprise Linux, Mandrake, most probably SuSE Linux too, etc. But this list isn't exhaustive; the following steps should probably work on any rpm based system.

*BSD

The *BSD systems have in their ports collection a port for the MinGW cross-compiling environment. Please see the documentation of your system about how to build and install a port.

Compiling the tests

Having the cross-compiling environment set up the generation of the Windows executables is easy by using the Wine build system.

If you had already run configure, then delete config.cache and re-run configure. You can then run make crosstest. To sum up:
$ rm config.cache
$ ./configure
$ make crosstest