Building Enigma for Windows
===========================

This file outlines the steps required to build Enigma versions for
Windows.  If you find inaccuracies or omissions in this file, please
report them to enigma-devel@nongnu.org.


1) Native compilation
---------------------

It seems no one has managed to build Enigma with Visual Studio yet, so
you must resort to MinGW port of GNU C++ and the other GNU build
tools.  (Setting up a usable build environment is unfortunately more
difficult than the following notes suggest; prepare for a certain
amount of "tinkering".  But you can always ask for help on the Enigma
mailing list.)

  - Get and install MinGW from www.mingw.org

  - Get and install the appropriate development packages of

      * SDL >= 1.2 (www.libsdl.org)
      * SDL_mixer >= 1.2.4 (http://www.libsdl.org/projects/SDL_mixer)
      * SDL_image >= 1.2.0 (http://www.libsdl.org/projects/SDL_image)
      * SDL_ttf  (http://www.libsdl.org/projects/SDL_ttf)
      * zlib
      * libpng

  - Build Enigma by invoking "./configure && make" from the Enigma
    source directory.


2) Cross compilation
--------------------

You can also build Enigma for Windows from Linux.  Because most
development tools are readily available on Linux, this may in fact be
easier than the native compilation outlined above.  You need:

  - A Linux version of the MinGW compiler.  Debian has prebuilt packages 
    for this, for other distributions try 
    
      http://www.libsdl.org/extras/win32/cross/README.txt

  - Get and install the libraries listed above

  - Configure the Enigma source code using etc/mingw32-configure.sh.
    Depending on your setup, you may have to adapt this little script
    a little bit.

  - Run "make"


3) Packaging
------------

There are two ways to package Enigma: Either as a simple .zip file or
as a graphical installer.  The script in etc/mingw32-dist.sh builds a
.zip package that includes all necessary files.  It also includes in
enigma.nsi a simple NSIS script that can be used to build a graphical
installer from the zip file.  Here is how:

  - Install NSIS 2.0 from www.nsis.org (It also runs under Wine if you
    are a Linux user).

  - Build a .zip package.

  - Extract the zip file and run the NSIS compiler on the included
    .nsi file.


4) Additional Notes
-------------------

