1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Cross-compiling LordsAWar! for Windows on Fedora 24
$ sudo dnf install intltool automake autoconf m4 git libtool glib2-devel mingw32-filesystem mingw32-gcc-c++ mingw32-libarchive mingw32-cairomm mingw32-libsigc++20 mingw32-gettext mingw32-libxslt mingw32-libxml++ mingw32-gtkmm30 mingw32-nsis
$ git clone git://git.savannah.nongnu.org/lordsawar.git
$ cd lordsawar
$ ./autogen.sh
$ mingw32-configure --disable-gls --disable-ghs --disable-sound --program-prefix=""
$ LDFLAGS="-mwindows" LORDSAWAR_DATADIR="." make -e -j4
$ sudo make install
The approach here is to set the datadir to ".", so that we can put all of the data files in the same directory as the exe. Compiling "." as the datadir into the program means that the default configuration file will be written with this path -- and the data files will be found on the first run without the user having to manually munge the .lordsawarrc file.
The LDFLAGS="-mwindows" ensures that we run our .exe without a terminal.
Sound is disabled because Fedora lacks a mingw-compiled gstreamermm package.
mingw-bundledlls is used to collect up the required DLLs for the lordsawar.exe executable. It can be downloaded here: https://github.com/mpreisler/mingw-bundledlls
Put it in your path, and make it executable.
They update the DLL blacklist so make sure you check back for new versions of this script.
Finally, we're ready to make a windows zip file that contains the game, the editor, the DLLS, the gnome icons, and all of our game data.
$ ./make-windows-zip.sh
It makes use the of mingw-bundledlls and the copy-gnome-icons.sh script.
When it completes, you will have a lordsawar-windows.zip file.
Yes it's annoying that we copy all of the gnome icons, but we really don't know which ones we're going to use. Perhaps we could be smarter about it.
The last step is to make the windows installer setup.exe. The lordsawar-windows.zip file must be created so that the creation script can use it.
$ ./make-windows-installer.sh
The setup.exe file should now be present in the current working directory.
Try it in a virtual machine from: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
Also try the game executable (not the setup) in wine:
[first install all of the required 32-bit libraries,
even though we're on a 64 bit system
you'll also need libcanberra-gtk3, and PackageKit-gtk3-module ]
$ cd /usr/i686-w64-mingw32/sys-root/mingw/share/lordsawar
$ wine /path/to/lordsawar.exe
|