Compilation for Windows
=======================

This quick guide only covers compilation with Dev-C++ for now, which is a
free (GPL) C++ integrated development environment for Windows.

You can download Dev-C++ here:

    http://www.bloodshed.net/devcpp.html

Make sure you install a version with Mingw integrated.

First you need to install gtk and gtkmm. You can download them from the
following URL:

    http://gladewin32.sourceforge.net
    http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/

I recommend you to install them to the default destination (which is
"C:\GTK"), that way you can probably avoid having to reconfigure the
Dev-C++ project files later on.

Download libsndfile DLL and header files:

    http://www.mega-nerd.com/libsndfile/

Extract the .zip file i.e. to "C:\". The libsndfile .dll file should then
be i.e. under "C:\libsndfile-1_0_17". Beside the .dll file, make sure
libsndfile's .lib file exists in that directory as well. If the .lib file
does not exist yet, you have to create it with:

    dlltool --input-def libsndfile-1.def --output-lib libsndfile-1.lib

Download and do the same steps for the libgig DLL and header files:

    http://download.linuxsampler.org/packages/win32/

a) Compile libgigedit.dll

Open the project file "win32/libgigedit.dev" either directly in Dev-C++ or
by double clicking on the project file in the Windows explorer. Then you
have to ensure the settings of libgigedit's Dev-C++ project file are
pointing to the correct location of your local copy of libsndfile, libgig,
gtk and gtkmm (remember the recommendation from the beginng?). For that
click in the Dev-C++ menu on "Project" -> "Project Options". Then click on
the tab "Parameter" and make sure the paths of the .lib files of libsndfile
and gigedit in the "Linker" list view are correct. Then click on the tab
"Directories" and then on the tab "Library Directories" and check that the
path to GTK's lib directory is corre. Then click on the tab
"Include Directories" and make sure the paths to the header files of libgig,
libsndfile, gtk and gtkmm point to the correct locations there as well.

After that click on the "OK button and you should finally be able to compile
"libgigedit" by clicking on "Compile" in the Dev-C++ menu. After compilation
succeeded, you can find the "libgigedit.dll" file in the "win32" directory.

b) Compile gigedit.exe

To be able to succesfully compile this executable, you really have to
compile the libgigedit.dll (that is the steps described in a) previously).
Now open the project file "win32/gigedit.dev". Open the project options and
check the library paths here as well, similar as described in a). After that
you should be able to compile the executable by clicking on "Compile" in the
Dev-C++ menu. After compilation succeeded, you can find the "gigedit.exe"
file in the "win32" directory.

Note: for being able to launch gigedit, you need to adjust your PATH
environment variable, so it includes the library directories (the ones with
the .dll files) of libgig, libsndfile, gtk and gtkmm. The previously
compiled "libgigedit.dll" (don't confuse with "libgig.dll") should be in the
same directory as "gigedit.exe", which of course is the default when you
just run them from the "win32" directory. ;)
