How to make Mac NetHack 3.1 using MPW
Copyright (c) 1992-11-23 Jon W{tte


Please read these instructions through carefully before starting to
build NetHack for the Macintosh.  Most important is the part about
keeping the folder structure intact, and how to move a few files
around.

For me, having done this a few times, steps 1-7 take less than five
minutes.  Add to that an average compilation time of 25 minutes
(without VISION_TABLES, see below) and a full build of NetHack from
scratch doesn't take more than a lunch break.

0)	Requirements:
	- MPW C 3.2
	- Mac with 68020 or better CPU (this is required to run MPW 3.2)
	- 10 MB free disk (at least)
	- 8 MB memory (using System 6, or a slimmed System 7)
	  More is quite preferable.
	- About 7 minutes of time on a Quadra with a RAM disk that fits
	  the entire compilation.  Less than an hour for an SE/30 with
	  standard hard disk.
	- Do NOT use virtual memory, or the compilation will quite possibly
	  take the whole weekend.  We're serious.

1)	Move all source files onto your hard disk.  Make sure to keep the
	folder structure the way it is.  You can skip the "tty" "X11" "amiga"
	"msdos" "os2" and "vms" folders if you are hard pressed for space.
	Also make sure the files are in native mac text format (i.e. ASCII
	13 is used for newlines).

2)	De-binhex the file :sys:mac:NHmake.hqx using Stuffit, Compact Pro,
	tickle, or any other de-binhexer.  Move the resulting file
	(Nethack.make) into the "top" folder (the one containing the
	folders "src" "include" etc).

3)	De-binhex the files :sys:mac:NHrez.hqx, :sys:mac:NHrsrc.hqx and
	:sys:mac:NHsound.hqx. If there is no sound file, or you do not
	want the sounds (they take up 200K in the final binary) you must
	create an empty resource file called "Sounds.rsrc" in the folder
	:sys:mac, using ResEdit.
	The resulting files should be left in :sys:mac:

4)	Edit the make file Nethack.make to set the Top variable.  If your top
	folder is called "nh31" and is in the MPW folder, this is not needed.

5)	Create two new folders in the top folder, named "Dungeon" and "Obj".

6)	You may want to edit some of the options in :include:config.h to suit
	your tastes.  However, using MPW, this file will self-configure for
	the default Mac distribution.

	NOTE: The make file defines VISION_TABLES, so you should not concern
	yourself with that option in config.h. However, compiling with the
	option VISION_TABLES will generate a faster binary, at the expense of
	the size of the application, and compilation time.

	Your MPW shell will need at least 7000K REAL MEMORY (TempMem
	won't do) for this compile to work. If you don't have it, you
	can try removing the VISION_TABLES option in the make file,
	you will however still need around 3000K for the MPW shell.

7)	Use BuildProgram on the make file. This is Cmd-B for most folks.
	Sit back and relax. The linker will spew out a lot of warnings
	about global data size (Error 34) but that's OK. If you don't
	want the warnings, turn on -model far in the make file; this will
	make a slightly less efficient program but gives no warnings.

8)	When the build is done, a short melody is played, and the results are
	in the Dungeon folder.  Enjoy!

9)	If you want to make any changes to the dungeon compiler or the special
	level compiler, you will need to edit the makefile to remove the
	dependencies for dgn_comp.h and lev_comp.h.  You should then add 
	dependencies for dgn_lex.c and lev_lex.c (output by lex) You
	will also need dependencies for dgn_yacc.c and lev_yacc.c (Output
	of yacc).  All four of these files should end up in the Top:sys:share
	folder.  Finally, the y.tab.h output from yacc should end up in
	the include folder as dgn_comp.h/lev_comp.h.
	

10)	If, heaven forbid, you experience any configuration problems or make
	errors, try to fix it yourself (there are several READMEs and the
	like you can check), but be sure to save a copy of the original files
	if you change anything.  There should be no problems if you use the
	correct versions etc. as per step 0 but you never know.  As always,
	turn off all INITs and re-boot if you have any problems, and they
	might go away.

	If you experience any bugs, please mail them to the bug report address
	nethack-bugs@linc.cis.upenn.edu
	Be sure to include what computer you use, how it is configured, what
	version of MPW and C and the headers you use, where you got the
	NetHack code etc. etc.

11)	This code is provided "as is" free of charge, and no warranty of any
	kind can or will cover it.  Use at your own risk.  This code is
	protected under copyright law, and may only be re-distributed under
	the terms of the NetHack license also found in this package, or
	otherwise with the authors' permission.  (If the license is missing,
	mail the bug report address for a copy.)
