Warzone Compilation Guide.


The compilation method depends on your operating system.

This guide will tell you how to compile warzone on its two main supported platforms: Linux and windows.

Linux Compilation:

With the GNU autotools, compilation is straight forward. 'cd' a shell to warzones source root directory; the one containing the 'autogen.sh' file, and run the following commands:

  1. ./autogen.sh
  2. ./configure
  3. make
  4. make install

Note that the forth command must be run as a privileged user in order to succeed.

If the above commands fail, you're probably not having all the required software needed to satisfy the dependencies that warzone has on other libraries or tools. In that case, the scripts will tell you what package you're missing.

Warzone has compile-time dependencies on the following software: autotools, gcc, make, SDL-dev, SDL_net-dev, oggvorbis-dev, mad-dev, zlib-dev, physicsfs-dev, OpenAL-dev, libpng-dev, libjpeg-dev.

Depending on your flavor of Linux, the package names may be different.

If you are certain that you got all the packages required, but still can't compile, then try compiling with this command instead:
make -f Makefile.raw
If the compilation succeeds, then you have a problem with your autotools - please check that your 'autoheader', 'autoconf' and 'automake' symlinks are pointing to the correct versions of these programs.
If the compilation still fails, write to our mailing list at: warzone-dev@gna.org or contact us on IRC at irc.freenode.net#warzone

Windows Compilation:

This guide will assume that you already have the source code. When following this guide; first read carefully what you are about to do, and then do.

Note: the Windows guide is based on Rodzilla's Installing Warzone Under Windows guide.

Before you can compile warzone on Windows, you need to set up your build environment. And to do that, you need to download the following software packages:

  1. Msys: http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe?download
  2. MinGW: http://prdownloads.sourceforge.net/mingw/MinGW-4.1.0.exe?download
  3. MsysDTK: http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?download
  4. Bison: http://prdownloads.sourceforge.net/gnuwin32/bison-2.1.exe?download
  5. Flex: http://prdownloads.sourceforge.net/gnuwin32/flex-2.5.4a-1.exe?download
  6. Development Package: http://rodzilla.free.fr/wz2100/warzone_install/dev_package.exe

Next, we have to install the packages. They have to be installed in the order they're listed above. So start by running the Msys installer and let the wizard guide you through the installation. When finished with the wizard, a command window will open to "normalize" the MSYS install - do not normalize your Msys install yet! Just leave the window as we will deal with it later.

Remember the directory where you installed Msys, as it'll be useful later. A good choice for an installation folder would be c:\msys

Next, run the MinGW setup program and choose c:\msys\mingw as your installation folder, or similar folder depending on where you installed msys.
Install the current versions of 'CORE', 'Compilers' and 'Utilities' (default options).
Then select these items:

And the continue through the rest of the MinGW installation process.

Now it's time to do this normalisation stuff. You will be prompted for the directory where you installed MinGW. It should be located directly inside the Msys directory.
Be careful, the path notation is not exactly what you're used to with Windows.

Next, install the MsysDTK. After that, install Flex and Bison to your msys\mingw folder, and finally install the developer package.

Now, the build environment is setup, so let's put the source code into it!

Locate your msys\home\[user name] folder - this is your msys home directory. Create a new folder in it called 'warzone' and copy/move all your warzone source files to this folder (everything you get when you check out the 'trunk' directory from the warzone revival projects subversion repository).

Alternatively, you can also make a new check of the latest source out into your newly created 'warzone' folder like so:
Get and install TortoiseSVN (you don't really need to reboot after the installation), and right-click on your 'warzone' folder. Then choose the 'SVN Checkout' option. In the 'URL of repository' field, you type:
http://svn.gna.org/warzone/trunk
And press OK.
Now, whenever you want the latest source code, you just right click on the 'warzone' folder and choose 'Update'.

Now we have the build environment and we have the source code - let's get it compiled!

Launch Msys and navigate to the warzone directory (cd warzone), and compile warzone with this command:
make -f Makefile.raw

And you're done! :)