Compiling Workrave for Windows
******************************

The Windows version of Workrave can be compiled (and debugged!) using Visual 
Studio (including Express Edition) on windows, or cross compiled on Linux. 

To build on windows, see README in build/cmake. This document
describes how to setup a cross compile environment and how to compile
Workrave in a few "easy" steps:

1. Installing MinGW cross compiler
2. Installing 3rd party packages
3. Installing MS compiler
4. Build Harpoon and Applet
5. Install Tinderbox
6. Compile Workrave

Step 1. Installing MinGW cross compiler
=======================================

Workrave for Windows is compiled using MinGW. MinGW can be obtained
from http://mingw.org/.

On Ubuntu/Debian, the following three package need to be installed.

mingw32 (4.2.1)
mingw32-binutils (2.20)
mingw32-runtime (3.15.2)

Alternatively, you can run the 'build-cross.sh" script from the
'build/win32/crossbuild' directory to download, extract, configure,
compile and install the MinGW packages. The cross compiler tool chain
is installed in /usr/local/cross-tools. Note that this script is no
longer maintained in favour of the standard Ubuntu/Debian packages


Step 2. Installing required packages
====================================

Workrave requires a number of 3rd party packages. All of these
packages can be downloaded, extracted, configured, compiled and
installed by running the 'build-packages.sh" script from the
'build/win32/crossbuild'. The cross compiled packages are installed in
/usr/local/cross-packages.


Step 3. Installing InnoSetup
============================

Workrave uses InnoSetup to create the installer. InnoSetup 5 must be
installed with wine.


Step 4. Build Harpoon and Applet
================================

This step must be executed on Window...

- Install the Window 7 SDK
- Open a Command Prompt, go to the common/win32 directory and run buildall.cmd
- In the Command Prompt window, go to frontend/applets/win32/src/ directory and run buildall.cmd

The generated DLLs and EXEs must be copied to Linux for step 5.


Step 5. Setup Workrave's Tinderbox
==================================

- Copy the 'build/win32/tinderbox' directory to ~/src/tinderbox (You
  need to edit build/win32/tinderbox/Makefile if you choose a
  different location)

- Create the following empty directories
  - ~/src/tinderbox/snapshots
  - ~/src/tinderbox/prebuilt/Debug
  - ~/src/tinderbox/prebuilt/Debug64
  - ~/src/tinderbox/prebuilt/Release
  - ~/src/tinderbox/prebuilt/Release64

- Copy the harpoon en applet DLLs and EXEs build in step 4 to the
  prebuilt directories

  
Step 6. Compile Workrave
========================

In the ~/src/tinderbox directory, run 'make all'.

Tinderbox will checkout the latest version from git, compile it and
generate an installer.
