NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / sys / atari / Install.tos
blob874c822c281cad26fb14527d410df9e94fc3356a
1         Instructions for compiling and installing aNetHack 0.0.1
2                           on a TOS system
3         =====================================================
4                   (or, How to make ST aNetHack 0.0.1)
5                      Last revision: 2 February 2000
7 1.  Make sure all the aNetHack files are in the appropriate directory structure.
8     You should have a main directory with subdirectories dat, doc, include,
9     src, util, sys\atari, sys\share, sys\unix, and at least one of win\tty
10     and win\gem.  You may have other subdirectories under sys and win, but
11     they needn't concern you.  If you do not follow this structure, the
12     Makefiles will not function properly.  The .c files for the main program
13     belong in src, those for utility programs in util, and Atari-specific
14     ones in sys\atari.  All the .h files belong in include, the documentation
15     in doc, and assorted data files in dat.  You may also use random.c from
16     sys\share.  The Makefiles belong in sys\unix.  (A more detailed
17     explanation of the directory structure may be found in Files, which
18     should be in the top directory.)
21 2.  If you don't already have a good command line interpreter, get one.
22     Doing all of the following from the desktop or a GEM shell will
23     probably be a *big* pain.  If you can get a Bourne shell compatible
24     one, and put it in \bin\sh, then you'll save yourself some trouble
25     with the Makefiles.  There are several good shells on various
26     FTP sites (including atari.archive.umich.edu).
28     Run the "setup.g" shell script in sys\atari.  This will setup all the
29     makefiles and other files in the appropriate directories.  It assumes
30     that your compiler prefers \ to / as a directory separator.  If not,
31     simply copy the makefiles instead of running sed on them.
33 3.  Now go to the include subdirectory to edit a couple of the header files
34     there.
36     First edit config.h according to the comments to match your system and
37     desired set of features.  In particular:
38        make sure that UNIX is *not* defined, and TOS is (if you're using
39           the MiNT library, and/or the -mint option to gcc, this will
40           be done automatically)
41        make sure that HACKDIR is defined properly (or not at all)
42        make sure that COMPRESS is not defined
44     Also edit tosconf.h; this shouldn't need much changing. If you are not
45     going to include random.c you will need to comment out RANDOM. Gcc users
46     don't need RANDOM, since the gcc and MiNT libraries have a Berkeley
47     derived srandom() function already. If you have no termcap support and
48     don't want to use the supplied termcap.uu, comment out TERMLIB. Gcc has
49     a termcap library, so TERMLIB should always be "on" with gcc (and you
50     don't need to worry about termcap.uu at all).
52 4.  If you want to change the high score list behavior, examine the top of
53     topten.c, in the src directory.  You may want to change the definitions of
54     PERSMAX, POINTSMIN, and ENTRYMAX.  I set POINTSMIN to 51 and ENTRYMAX to
55     50 to keep the size of the score list down.
57 5.  Go to the src directory and edit your Makefile.  You'll want the Systos
58     target configuration; the comments explain most of what needs to be done,
59     at least for the gcc.
61     Next, go to the top, util, dat, and doc directories, and edit the Makefiles
62     there, as necessary.  You'll need nroff and/or TeX to do the files in doc;
63     if you don't have one/both of these, you can skip it (docs?? we don't need
64     no steenking docs :-)).
66     If you elected to use Fred Fish's termcap library (bundled in as
67     termcap.arc), you will have to generate termcap.a from those sources.
69     If you are recompiling after patching your sources, or if you got your
70     files from somewhere other than the official distribution, "touch
71     makedefs.c" to ensure that certain files (onames.h and pm.h) are remade,
72     lest potentially troublesome timestamps fool "make."
74 8.  Now, enter "make all", and take a long siesta; your computer will be
75     occupied for a long time.  If all goes well, you will get an executable.
76     If you tried to compile in too many features, you will probably get a
77     dysfunctional executable, and will have to start over.
79         Hint 1:  If you're short on memory, you might enter "make -n all
80         >make.bat," and then run script.bat with some sort of batch
81         program or with the gulam command "script make.bat."
83         Hint 2: You'll save yourself a lot of grief if you use the GNU
84         version of the "make" program. Some of the smaller makes aren't
85         completely compatible. GNU software for the Atari is widely
86         available; for example, by anonymous FTP from atari.archive.umich.edu.
88 9.  Make sure the support files -- data, rumors, cmdhelp, opthelp, help, hh,
89     history, license, and oracles, or simply anhdat if DLB was defined --
90     were copied to the game directory.  If not, move them there from the
91     dat directory yourself.  rumors can be created manually by entering
92     "makedefs -r;" data by entering "makedefs -d."
94     Also, make sure that the various level files (*.lev, from the dat
95     subdirectory) were copied over correctly. If you're not sure what files
96     should have been made, double check with Makefile.dat.
98 10. Go to the src\atari directory.  Copy atari.cnf to your game directory
99     as aNetHack.cnf. Edit it to reflect your particular setup and personal
100     preferences, following the comments.
102     If you compiled in the TERMLIB feature, also move the "termcap" file to
103     your game directory.  (Note:  gcc's termcap routines have built-in
104     defaults, so the termcap file is not necessary with that compiler.)
106     If you're running aNetHack from the MultiTOS desktop, and you want a
107     more useful set of drop down menus than the plain system "File/Edit"
108     ones, copy anethack.mnu to your games directory. This file contains a
109     menu definition that puts a lot of the common commands into the menu.
111 11. Play aNetHack.  If it works, you're done!
114 Notes
115 -----
117 1)  Save files and bones files from previous versions will not work with
118     aNetHack 3.4.  Don't bother trying to keep them.  
120 2)  To install an update of aNetHack after changing something, enter "make"
121     from the src directory.  If you add, delete, or reorder monsters or
122     objects, or you change the format of saved level files, delete any save
123     and bones files.  (Trying to use such files sometimes produces amusing
124     confusions on the game's part, but more often produces crashes.)