home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / nethack-3.1 / sys / atari / Install.tos < prev    next >
Encoding:
Text File  |  1993-01-25  |  8.4 KB  |  160 lines

  1.     Instructions for compiling and installing NetHack 3.1
  2.                   on a TOS system
  3.     =====================================================
  4.               (or, How to make ST NetHack 3.1)
  5.              Last revision: 23 Jan 1993
  6.  
  7. 1.  Make sure all the NetHack 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, and sys\unix.  You may have other sub-
  10.     directories under sys, but they needn't concern you. If you do not follow
  11.     this structure, the Makefiles will not function properly.  The .c files
  12.     for the main program belong in src, those for utility programs in util,
  13.     and Atari-specific ones in sys\atari.  All the .h files belong in include,
  14.     the documentation in doc, and assorted data files in dat.  You may also
  15.     use random.c from sys\share.  The Makefiles belong in sys\unix (except
  16.     for the Atari-specific Makefile.utl found in this directory).
  17.     (A more detailed explanation of the directory structure may be found in
  18.     Files, which should be in the top directory.)
  19.  
  20.  
  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).
  27.  
  28.     Run the "setup.g" shell script in sys\atari.  This will move all the
  29.     makefiles and other files to the appropriate directories.
  30.  
  31.     The file termcap.uu is the fixed version of the Fred Fish termcap library.
  32.     You will need to run a uudecode utility on it to generate the file
  33.     termcap.arc.  termcap.arc contains several files of termcap routines.
  34.     Using them with NetHack involves very little knowledge of the UNIX concept
  35.     of a termcap database; mostly you need to know enough to set a TERM
  36.     environment variable.  You can unarc termcap.arc here in the sys\share
  37.     directory, but if you are going to use it, it is probably best to unarc a
  38.     copy in the src directory.  That way you will not miss copying any
  39.     files over.  Some compilers (notably the gcc) already have a termcap
  40.     library; if so, you won't need this one.
  41.  
  42. 3.  Now go to the include subdirectory to edit a couple of the header files
  43.     there.
  44.  
  45.     First edit config.h according to the comments to match your system and
  46.     desired set of features.  In particular:
  47.        make sure that UNIX is *not* defined, and TOS is (if you're using
  48.           the MiNT library, and/or the -mint option to gcc, this will
  49.       be done automatically)
  50.        make sure the HACKDIR is defined properly (or not at all)
  51.        make sure that COMPRESS is not defined
  52.  
  53.     If you want to build a NetHack that will run on a 1 megabyte machine,
  54.     I'm afraid you're going to have to disable some options.  Just what
  55.     to disable is a tough choice; NetHack *almost* fits in 1 meg, but
  56.     almost isn't quite good enough :-(.  On the other hand, if you can
  57.     compile NetHack, you almost certainly have at least 2 megabytes;
  58.     certainly gcc won't compile NetHack with less than 4.
  59.  
  60.     Also edit tosconf.h; this shouldn't need much changing. If you are not
  61.     going to include random.c you will need to comment out RANDOM. Gcc users
  62.     don't need RANDOM, since the gcc and MiNT libraries have a Berkeley
  63.     derived srandom() function already. If you have no termcap support and
  64.     don't want to use the supplied termcap.uu, comment out TERMLIB. Gcc has
  65.     a termcap library, so TERMLIB should always be "on" with gcc (and you
  66.     don't need to worry about termcap.uu at all).
  67.  
  68. 4.  If you're using a compiler other than the gcc, you may want to look
  69.     through system.h, in the include directory.  This file matches the return
  70.     and parameter types for system calls and library routines with various
  71.     flavors of compilers and operating systems.  Leaving this file alone is
  72.     unlikely to cause problems, but if you get compile errors with any
  73.     functions in the standard library, it's worth checking the declarations
  74.     there.
  75.  
  76. 5.  If you want to change the high score list behavior, examine the top of
  77.     topten.c, in the src directory.  You may want to change the definitions of
  78.     PERSMAX, POINTSMIN, and ENTRYMAX.  I set POINTSMIN to 51 and ENTRYMAX to
  79.     50 to keep the size of the score list down.
  80.  
  81. 6.  Go to the src directory and edit your Makefile.  You'll want the Systos
  82.     target configuration; the comments explain most of what needs to be done,
  83.     at least for the gcc.  If your compiler doesn't like directories separated
  84.     by /'s, then change these to \'s.
  85.  
  86.     Next, go to the top, util, dat, and doc directories, and edit the Makefiles
  87.     there, as necessary.  You'll need nroff and/or TeX to do the files in doc;
  88.     if you don't have one/both of these, you can skip it (docs?? we don't need
  89.     no steenking docs :-)).
  90.  
  91.     If you elected to use Fred Fish's termcap library (bundled in as
  92.     termcap.arc), you will have to generate termcap.a from those sources.
  93.  
  94.     If you are recompiling after patching your sources, or if you got your
  95.     files from somewhere other than the official distribution, "touch
  96.     makedefs.c" to ensure that certain files (onames.h and pm.h) are remade,
  97.     lest potentially troublesome timestamps fool "make."
  98.  
  99. 8.  Now, enter "make all", and take a long siesta; your computer will be
  100.     occupied for a long time.  If all goes well, you will get an executable.
  101.     If you tried to compile in too many features, you will probably get a
  102.     dysfunctional executable, and will have to start over.
  103.  
  104.     Hint 1:  If you're short on memory, you might enter "make -n all
  105.     >make.bat," and then run script.bat with some sort of batch
  106.         program or with the gulam command "script make.bat."
  107.  
  108.     Hint 2: You'll save yourself a lot of grief if you use the GNU
  109.     version of the "make" program. Some of the smaller makes aren't
  110.     completely compatible. GNU software for the Atari is widely
  111.     available; for example, by anonymous FTP from atari.archive.umich.edu.
  112.  
  113. 9.  Make sure the support files-- data, rumors, cmdhelp, opthelp, help, hh,
  114.     history, license, and oracles (if ORACLES was #define'd)-- were copied
  115.     to the game directory.  If not, move them there from the auxil directory
  116.     yourself.  rumors can be created manually by entering "makedefs -r;"
  117.     data by entering "makedefs -d."
  118.  
  119.     Also, make sure that the various level files (*.lev, from the dat
  120.     subdirectory) were copied over correctly. If you're not sure what files
  121.     should have been made, double check with Makefile.dat.
  122.  
  123. 10. Go to the src\atari directory.  Copy atari.cnf to your game directory
  124.     as NetHack.cnf. Edit it to reflect your particular setup and personal
  125.     preferences, following the comments.
  126.  
  127.     If you compiled in the TERMLIB feature, also move the "termcap" file to
  128.     your game directory.  (Note:  gcc's termcap routines have built-in
  129.     defaults, so the termcap file is not necessary with that compiler.)
  130.  
  131.     To use funky graphics characters in TOS, uudecode "atarifnt.uue" and unarc
  132.     the resulting "atarifnt.arc".  This contains a program to run that makes
  133.     some line graphics characters available to NetHack.  To use them, uncomment
  134.     the appropriate line in your NetHack.cnf file, and run the program before
  135.     running NetHack (you can put the program in an AUTO folder if you want).
  136.     This font won't work if you're running Speedo GDOS (and possibly other
  137.     GDOS variants). I hope to have a bitmapped GDOS font suitable for
  138.     NetHack 3.1 "Real Soon Now."
  139.  
  140.     If you're running NetHack from the MultiTOS desktop, and you want a
  141.     more useful set of drop down menus than the plain system "File/Edit"
  142.     ones, copy nethack.mnu to your games directory. This file contains a
  143.     menu definition that puts a lot of the common commands into the menu.
  144.  
  145. 11. Play NetHack.  If it works, you're done!
  146.  
  147.  
  148. Notes
  149. -----
  150.  
  151. 1)  Save files and bones files from previous versions will not work with
  152.     NetHack 3.1.  Don't bother trying to keep them.  
  153.  
  154. 2)  To install an update of NetHack after changing something, enter "make"
  155.     from the src directory.  If you add, delete, or reorder monsters or
  156.     objects, or you change the format of saved level files, delete any save
  157.     and bones files.  (Trying to use such files sometimes produces amusing
  158.     confusions on the game's part, but more often produces crashes.)
  159.  
  160.