This document gives some hints on how to compile Workrave on Windows.

The minimal requirement is gtkmm and cmake.


Install Gtkmm (required)
========================

- Download and install gtkmm:

  http://ftp.gnome.org/pub/GNOME/binaries/win32/gtkmm/2.14/gtkmm-win32-devel-2.14.3-2.exe


Install CMake 2.6 (required)
============================

- Download and install cmake:

  Website: http://www.cmake.org
  File: http://www.cmake.org/files/v2.6/cmake-2.6.2-win32-x86.exe

 
Install Intltool (recommended, needed for exercises)
====================================================

- Download and Install Strawberry Perl
  ActiveState may also work (untested)

  Website: http://strawberryperl.com/
  File: http://strawberry-perl.googlecode.com/files/strawberry-perl-5.10.0.3.exe

- Download and extract intltool

  File: http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip

  Extract to <PATH-TO-DEPEDENCIES>.

  
Install Gettext (recommended, needed for localization and exercises)
====================================================================

- Download and extract Gettext

  File: http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/gettext-tools-0.17.zip

  Note for Vista users: You will run into problems (access denied and
  such) if you extract the files with unzip from cygwin; use Windows
  built-in zip support.

  
Install Python/Cheetah (optional/experimental, needed for dbus)
===============================================================

- Download and Install Python 2.5.2 

  Install the x86 version, even on a 64bit systems. setuptool will not install otherwise.

  Website: http://www.python.org/download/
  File: http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi

- Download and install setuptools

  Website: http://pypi.python.org/pypi/setuptools
  File:  http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9.win32-py2.5.exe

- Install Cheetah

  - Open a Command Prompt (Use Run as Administrator on Vista)
  - cd C:\Python25\Scripts [replace python installation directory]
  - Run 'easy_install cheetah'


Install DBus (optional, needed for dbus)
========================================

- Download and extract libiconv

  File: http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libiconv-1.9.1.bin.woe32.zip

  Extract to <PATH-TO-DEPEDENCIES>.
  
- Download, compile and install DBUS:

  - svn co https://windbus.svn.sourceforge.net/svnroot/windbus/trunk windbus
  - mkdir windbus-build
  - cd windbus-build
  - Run cmake

    cmake -G "Visual Studio 9 2008" ../windbus/cmake/ -DCMAKE_PREFIX_PATH="<PATH-TO-DEPEDENCIES>;<PATH-TO-GTKMM>"
          -DCMAKE_INSTALL_PREFIX=<PATH-TO-DEPEDENCIES>

    e.g.
    
    cmake -G "Visual Studio 9 2008" ../windbus/cmake/ -DCMAKE_PREFIX_PATH="c:/cygwin/home/rob/tools;C:/Program Files (x86)/gtkmm"
          -DCMAKE_INSTALL_PREFIX=c:/cygwin/home/rob/tools

  - Open dbus solution in visual studio (location in windbus-build directory)
  - Select Release configuration
  - From Build menu, choose rebuild solution
  - Right click on INSTALL project, choose build
  - Select Debug configuration
  - From Build menu, choose rebuild solution
  - Right click on INSTALL project, choose build
  
Compiling Workrave
==================

 - Download workrave
 
 - mkdir workrave-build
 - cd workrave-build

 - cmake -G "Visual Studio 9 2008" <PATH-TO-WORKRAVE-SOURCES>/build/cmake/
                 -DDEVELOPMENT_MODE=ON 
                 -DCMAKE_PREFIX_PATH="PATH-TO-DEPEDENCIES" -DCMAKE_INSTALL_PREFIX="<INSTALL-DIRECTORY>

    Note: PATH-TO-DEPEDENCIES should contains all dependencies: gettext, dbus, intltool etc.

    eg. cmake -G "Visual Studio 9 2008" ../workrave/build/cmake/ -DDEVELOPMENT_MODE=ON
        -DCMAKE_PREFIX_PATH=c:/cygwin/home/rob/tools -DCMAKE_INSTALL_PREFIX=c:/cygwin/home/rob/opt/workrave

  - Open Workrave solution in visual studio (location in workrave-build directory)
  - Build
  