Configuring and Building Commons Daemon on Windows
==================================================

Using Visual Studio, you can build the Commons Daemon.
The Makefile make file has a bunch of documentation about its
options, but a trivial build is simply;

  nmake CPU=X86
  nmake CPU=X86 PREFIX=c:\desired\path\of\daemon install


Needed Tools
============

Commons Daemon needs the Microsoft Visual C 6/SP5 to
build the x86 binaries. This is because this compiler
doesn't create MSVCRTnn.DLL dependencies which will
be loaded inside running JVM if used.
For building AMD64/EMT64 binaries use the Platform SDK
for Windows Server 2003R2.


Step by Step
============

0. These were written for 64-bit XP. YMMV.

1. Install the pre-requisites:
   - Microsoft Visual C 6
   - Microsoft Visual C 6 Service Pack 5
   - Platform SDK for Windows Server 2003 R2

2. Open a new command prompt (to ensure the environment is clean)
   You'll need to do this for each different platform you want to build

3. Configure the Visual C environment variables
   Not necessary if the option to add them to the user's environment was
   selected on install
   %VC6_DIR%\Bin\VCVARS32.BAT
   (e.g. "c:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT")

4. Configure the Platform SDK environment (optional for X86?)
   - win32
     <PlatformSdkDir>\SetEnv /SRV32 /RETAIL 
   - x64
     <PlatformSdkDir>\SetEnv /X64 /RETAIL 
   - i64
     <PlatformSdkDir>\SetEnv /SRV64 /RETAIL 

5. On 64-bit platforms set the following environment variable
   set EXTRA_CFLAGS=/GS-

6. Build the binary
   - win32
     nmake CPU=X86
   - x64
     nmake CPU=X64
   - ia64
     nmake CPU=I64
