This source tree was tested with Borland C Builder 5.5, and Microsoft Visual C++ 2005
Express Edition.  The client can also be compiled with MS Visual C++ 6.0, and the instructions
below explain how to do so.  However, this compiler is no longer supported by the Netrek
XP 2009 author as it is not free software (everything else needed for compiling is free).

I'd like however to discourage you from using Borland's compiler unless you know how
to debug its binaries. The output is also slower even though speed optimizations
are used.

Step 1:
--------
Edit build.cmd to set following variables:

RSAKey = path to your RSA-KEY.secret file
Compiler = VCC or BCC (default VCC)
InstCWD = path to folder to copy files to (default \netrek_files)
HelpCompiler = path to hhc.exe from Microsoft's HTML Help Workshop (available from microsoft.com)

Step 1a:
--------
Generate your rsa_box files, see rsa.txt for instructions.

Step 2:
--------

First off, you will need the development package for SDL, as well as SDL-mixer.
Refer to the SDL website for how to install it with your compiler/IDE.

If you're building with MS Visual C++:

- Edit clientr.dsp and change \netrek_files to be same as InstCWD
- Edit src\cursors\curslib.dsp and change \netrek_files to be same as InstCWD
- Edit src\winkey\winkey.dsp and change \netrek_files to be same as InstCWD

If you're building with Borland C Builder:

Make sure you have configuration set correctly for the builder itself.
Follow setup instructions from builder readme file to create proper configuration
files. Otherwise the compiler and linker won't find the correct paths.

If you're building with Microsoft Visual Studio 2005

This is the preferred compiler.  You will need the SDK from the web, as the software
doesn't come with the necessary files.  Additionally, DirectX SDK is probably needed too,
for the SDL support.  You will also need the HTML help workshop (from Microsoft) to 
compile the help file.  If you use the studio files that come with the source,
it should already have most of the proper configuration set up, such as links to the
lib files and using the proper resource files.  The following webpage indicates how
to properly install the Microsoft SDK.  The name of the article on this webpage is
"Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK"
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Especially important are steps 3 and 4.  Step 4 was necessary to get winkey to compile.

Step 3:
--------
Open command prompt in the source tree directory and run build.cmd.  Note that this build
script must use borland make, not GNU make, so don't try and run it under cygwin.  Also
note that since the script is run in DOS, it can't handle directory names with spaces or
quotations.  Highly recommend having netrekxp folder in root, i.e. c:\netrekxp

If everything is correct and working then after a couple of minutes you will have compiled
a working client under InstCWD\netrek.
If you were compiling with Visual C++ you will also have a InstCWD\tmp folder containing
lots of objects.  Just delete it.

That's pretty much all.

Stas Pirogov (keyos@keyos.org)

Instructions modified by Bill Balcerski 