These instructions to build native Windows Installer Packet of Freeciv are based on ones found from the top of windows/installer_legacy/Makefile (formerly win32/installer/Makefile) in the freeciv source distribution. Version in the latest freeciv development version can be seen at windows/installer_legacy/Makefile.
- FIXME: needs updating for the move from svn to git
- Download and extract latest version of MinGW build environment from http://files.freeciv.org/packages/windows/gnuwin32/
- Optional: Change the README file to README_OLD (reading this file can help give you an idea why you are doing what you are doing - however this file would be overwritten in one of the later steps, thus the need to change its name)
- Launch (double click) msys.bat from the extracted directory.
- In the commandline opened, give command "hg qpush -a". Completing this command takes time, and there's not always indication about the progress - it can be even 10 minutes as if it has halted while it silently works.
- Once the command prompt returns, close the window, and launch it (msys.bat) again. This is to make sure it actually uses the changes just made to it.
- Assuming you want to build latest freeciv-2.5 version, give following commands:
> mkdir freeciv > cd freeciv > svn co svn://svn.gna.org/svn/freeciv/branches/S2_5 freeciv-2.5 > cd freeciv-2.5 > ./autogen.sh --no-configure-run
- It will give you the instruction to run configure, ignore this rather run
> cd win32/installer > make gtk3-installer
- gtk3-client installer should now be in home/$YOURNAME/freeciv/freeciv-2.5/win32/installer/Output/
Once you already have MinGW system set up and freeciv source checked out, you only need to do the following to create updated installers.
Launch msys.bat > cd freeciv/freeciv-2.5 > svn up > cd win32/installer > make gtk3-installer
To build latest development version instead of 2.5, you need to checkout svn://svn.gna.org/svn/freeciv/trunk instead of branches/S2_5:
> svn co svn://svn.gna.org/freeciv/trunk freeciv-TRUNK > cd freeciv-TRUNK > ./autogen.sh --no-configure-run > cd win32/installer > make gtk3-installer
To build gtk2-client or sdl-client installer instead of gtk3 one, use equivalent make command:
> make gtk2-installer > make sdl-installer
Explanations of commands Edit
If something goes wrong, then it is useful to know what the various commands mean so that with a little bit of googling one can figure out how to proceed further.
- Commands mentioned in First Build:
> hg qpush -a (This is to install various Mecury patches to the gnuwin32 folders) > mkdir freeciv (create a directory called freeciv (i.e. folders)) > cd freeciv (change the Current Directory to the freeciv folder) > svn co svn://svn.gna.org/svn/freeciv/branches/S2_5 freeciv-2.5 (use svn to download the source code for freeciv version 2.5 - this is called branch S2_5, this is saved to the new folder called freeciv-2.5 this is also possible with TortoiseSVN) > cd freeciv-2.5 > ./autogen.sh --no-configure-run (run the autogen file, with the option not to do any configuring, the autogen creates all of the makefiles. The makefiles which gives the computer instructions on how to compile the source program into an executable) > cd win32/installer > make gtk3-installer (run the make file with the option to create the gtk3 installer - otherwise it creates all of the installers)
- Commands mentioned in Consecutive Builds:
> svn up (this updates your local copy of the source code, this is also possible with TortoiseSVN)
Note about using TortoiseSVN Edit
The svn checkout cannot usually be handled by older version of svn than one that last touched it. Thus checkouting or updating the checkout with TortoiseSVN may make it impossible to make further updates with commandline svn -command or the other way around. A relatively painless alternative—compared with Git and TortoiseSVN—is SlikSVN using the original Subversion command line syntax.