         Copyright (c) NetHack Development Team 1990-2002
         Copyright (c) Slash'EM Development Team 2002-2004
         NetHack may be freely redistributed.  See license for details.
         ==============================================================
                    Instructions for compiling and installing
         Slash'EM 0.0.7 on a Windows NT, 95, 98, Me, 2000, or XP system
         ==============================================================
                        Last revision: January 17, 2004

This file deals with compiling Slash'EM with gcc (the GNU Compiler Collection)
and other free utility programs and libraries.

You can build either the TTY version of Slash'EM or one of the GUI versions:
GTK or native MS-Windows.  Note that Makefile.gcc contains rules suitable for
use with the procedure documented here rather than in Install.nt -- follow the
procedure laid out in this file to build a TTY version of Slash'EM with gcc.

You will need
-------------

  o A copy of MinGW 1.0 or later (2.0 or later recommended).
    You can download MinGW at http://www.mingw.org/
  o You may find it useful to obtain copies of lex (flex) and yacc (bison,
    or byacc).  While not strictly necessary to compile Slash'EM, they are 
    required should you desire to make any changes to the level and dungeon 
    compilers.
  o If you are running an early version of Windows 95 then you may need to
    get a copy of msvcrt.dll (which normally lives in c:\windows\system).
    To do this go to Microsoft's Windows 95 downloads page at:
	http://www.microsoft.com/windows95/downloads/
    scroll down to the "Windows Library Update" and follow the instructions
    to install it.

To build the GTK interface, you will also need:

  o GTK Development Environment version 2.2.1 or later
  o GTK Runtime Environment version 2.2.1 or later

Both these packages can be downloaded from http://www.dropline.net/gtk/

Setting up the MinGW build environment
--------------------------------------

1.  Run the mingw installation program and install in c:\MinGW
2.  Add c:\MinGW\bin to your path.

The last step may be accomplished by adding the following line
to the end of your autoexec.bat file and re-booting:

	PATH=c:\MinGW\bin;%PATH%

Setting up the GTK build environment
------------------------------------

1.  Run the GTK Development Environment installer and install in c:\win-gtk
2.  Run the GTK Runtime Environment installer and install in
	c:\Program Files\Common Files\GTK\2.0
3.  Add c:\Program Files\Common Files\GTK\2.0\lib and c:\win-gtk\bin
	to your path.

Setting up the Slash'EM build environment
-----------------------------------------

1.  Extract the Slash'EM source tarball to a suitable directory.
    We recommend winzip for this which appears to handle text files
    appropriately. If you use a different unpacker you may need to
    convert at least sys/winnt/setup.bat and win/share/*.txt to text
    format.

2.  Start an Command Prompt window (MS-DOS Prompt window under Win 95).

3.  Change into the sys/winnt subdirectory and run setup.bat

4.  Change into the src subdirectory and edit Makefile to review and,
    if necessary, modify any variables. The following, in particular,
    may need consideration:
	GAMEDIR		The directory where the game will be installed.
			Default: \games\slam32d
	MW32GTK		The directory where the MinGW version of the Gtk+ 2.0
			tree is installed.  Default: /win-gtk
	MS_BITFIELDS	Switch between gcc 2.x and 3.x command line flags.
			Default: gcc 3.x (MinGW 2.x)
	RDEL		Switch between Win 95 and Win 2000 derived systems.
			Default: rd (Win 2K)
			You may want to change some of the other commands in
			this section, but you shouldn't need to when building
			from a clean install.
	YACC_LEX	Set to Y if yacc and lex are installed.
			Default: N
	USE_DLB		Set to N to keep data files seperate.
			Default: Y
	USE_MSWIN	Set to Y to include the native windowing interface.
			Default: N
	USE_GTK		Set to Y to include the GTK windowing interface.
			Default: N
	USE_PROXY	Set to Y to support proxified and plug-in interfaces.
			Default: N
    Note: While there's no theoretical reason why an executable could not
    contain both the native and GTK windowing interfaces, Makefile.gcc does
    not support this configuration. Building a proxified GTK interface under
    MS-Windows is possible, if somewhat pointless. Building a proxified
    native interface is not possible.

5.  If the comments in the Makefile told you to make any changes to config.h,
    then change into the include subdirectory and do so now.

Compiling and installing Slash'EM
---------------------------------

Now, from your command prompt, change to the src directory, and type:

mingw32-make install

After some time, the game should be compiled and installed in the
\games\slam32d directory or whatever directory you specified.  Happy Hacking!
