TABLE OF CONTENT

I. Introduction
II. Required programs
 II.1 Wine
 II.2 MinGW
 II.3 MSys
 II.4 CMake
 II.5 Optional programs
III. Required libraries
 III.1 GnuWin32
 III.2 Boost
 III.3 Claw
 III.4 wxWidgets
 III.5 SDL
 III.6 SDL_mixer
IV. Compiling Plee the Bear

I. Introduction
===============

Before compiling Plee the Bear for windows with Wine, you have to
install all dependancies.

Everything but script-like commands (grep, sed, and so) is done via
wine. For example, if you have to run CMake, do NOT type

  cmake .

but, instead,

  wine "c:/Program Files/CMake/bin/cmake.exe" .


II. Required programs
=====================

II.1 Wine
---------

II.2 MinGW
----------

HCU/Environment/PATH
MinGW must be in your path. Edit the registry key by typing

  wine regedit

II.3 MSys
---------

II.4 CMake
----------
require CMake

Most CMake modules search files in unix-like paths. Since these paths
are visible in wine, the unix libraries an include files will be
found. You can modify the following CMake modules to search first in
the paths where you have installed your libraries :

 - FindJPEG.cmake
 - FindPNG.cmake
 - FindZLIB.cmake
 - FindSDL.cmake
 - FindSDL_mixer.cmake

Or you can add the paths in yout PATH environment variable.

II.5 Optional programs
----------------------

optional doxygen, NSIS, svn


III. Required libraries
=======================

III.1 GnuWin32
--------------

libz libjpeg libpng

III.2 Boost
-----------
bjam

III.3 Claw
----------

III.3.1 Install from binaries
- - - - - - - - - - - - - - -

Download the binaries (for windows) from
http://libclaw.sourceforge.net and excecute the file with wine to
install.

Select the following modules:
 - shared libraries
 - header files
 - CMake modules

III.3.2 Install from source
- - - - - - - - - - - - - -

Download the source code from http://libclaw.sourceforge.net or from
the svn repository. Enter in the directory where the source code is
and run CMake. You will probably have to edit the CMakeCache.txt file,
by hand or via the CMake interface to set the path of the png, jpeg
and zlib libraries (see section "III.1 GnuWin32").

Once the CMake process ends without errors, run make:

  wine mingw32-make

You can probably use the library as is (never tried) or create an
installer to do a clean installation and easy removing.

Creating an installer requires to generate the documentation. Just run
doxygen in the ./doc/ subdirectory.

*Remark*: I did not find how to use Doxygen for windows here,
espacially due to the requirement of GraphViz's "dot" program. So I
use Doxygen for Linux. This should not be an issue since the
documentation is made of html, png and other portable file formats.

You will need to execute NSIS to create the installer. Just execute it
on the script libclaw.nsi. Run the resulting program as described in
the subsection III.3.1 "Install from binaries".


III.4 wxWidgets
---------------

For this part, MSYS directory must be in your path. Edit the registry
key as described above to add the path c:/msys/1.0/bin (or similar) in
your PATH environment variable.

In MSYS:
  ./configure --enable-optimise --enable-stl --enable-unicode \
    --disable-threads --disable-shared --enable-static \
    --enable-monolithic --enable-release --with-opengl --with-msw

Then remove MSYS directory from your PATH.

In a console
  cd c:/wxWidgets/
  sed -i 's,/c/,c:/,' $(find . -name "Makefile")
  wine mingw32-make

III.5 SDL
---------

III.6 SDL_mixer
---------------

Download and copy the files in SDL's directory.

IV. Compiling Plee the Bear
===========================

Program built during the make process are used later in the make
process. Copy the libraries (claw, boost) in c:/windows (or anywhere
in your PATH), for convenience:

  boost_filesystem-mgw34-1_34_1.dll
  jpeg62.dll
  libclaw_application.dll
  libclaw_configuration_file.dll
  libclaw_dynamic_library.dll
  libclaw_graphic.dll
  libclaw_logger.dll
  libclaw_net.dll
  libpng13.dll
  SDL.dll
  SDL_mixer.dll
  zlib1.dll
