

  WARNING OUTDATED DOCUMENT 

This hasn't been tried since quite some time, and while it work for all the
required libraries, the ./compile-mingw.sh script and the makefile.g95 haven't
been updated since half a year or more.

I (Pablo) compile the windows binaries under linux with the mingw compiler,
using libraries from http://gnuwin32.sf.net, using the normal 

./configure
make

approach.

  WARNING OUTDATED DOCUMENT


How to compile hugin on windows using mingw.

A step by step guide.

steps: 1. install mingw.
       2. install wxwindows 
           IMPORTANT  a small change needs to be made to
           IMPORTANT  wxwindows/src/makeg95.env, even if you have already
           IMPORTANT  installed wxwindows.
       3. compile hugin

1. Download & install mingw (www.mingw.org)

2. Download the current wxWindows release from www.wxwindows.org
   I used version 2.4.1, including the fix, resulting in these
   downloads:
       - wxMSW-2.4.1.zip
       - wxWindows-2.4.1-patch01.zip

   Compile and install wxWindows by
      - uncompress wxMSW-2.4.1.zip and copy the patch from
        wxWindows-2.4.1-patch01.zip into the wxWindows-2.4.1
        directory
      - open a msys shell, set the WXWIN environment
        variable. I unzipped wxwindows to d:\temp\wxWindows-2.4.1
        Adjust the path below to fit your needs.

         $ export WXWIN=/d/temp/wxWindows-2.4.1

        This sets the variable only for the current shell, it will
        be lost after closing the shell. It can be set permanently
        using autoexec.bat (on Win9x) or in the Environment Dialog
        on Windows NT/2000/XP (access it with right click my computer ->
        Properties)

        Compile the main wxwindows library.
        Edit $WXWIN/src/makeg95.env and remove all occurences of
        "-fno-rtti -fno-exceptions".
        hugin uses exceptions in some places, so they need to be enabled.
        
        Start the compilation with:

         $ cd $WXWIN/src/msw
         $ make -f makefile.g95 clean
         $ make -f makefile.g95

        Compile xrc extension
        
         $ cd ../../contrib/src/xrc
         $ make -f makefile.g95 clean
         $ make -f makefile.g95

3. Compile huginDownload hugin src from http://hugin.sf.net, or by using cvs.

    There are two build modes, debug and release. The debug version contains
    debugging symbols and is very big (~30 MB), while the release version is
    optimized and contains no debug outputs. The release version needs a release
    version of wxWindows (by executing 

    Debug version:
        
      - cd to the source directory
         $ cd /some/path/hugin/src

      - compile hugin with the compile-mingw.sh script
         $ ./compile-mingw.sh

      - cd to the hugin directory and run hugin.exe from there
         $ cd hugin
         $ ./hugin
   
    Release version:

      - compile a release version of wxWindows, if not already done:

         $ cd $WXWIN/src/msw
         $ make -f makefile.g95 clean
         $ make -f makefile.g95 FINAL=1

      - cd to the hugin source direcotry
         $ cd /some/path/hugin/src

      - build release version
         $ ./compile-mingw.sh FINAL=1

      - cd to the hugin directory and run hugin.exe from there
         $ cd hugin
         $ ./hugin
      
