                Instructions for installing NetHack 3.4
                          on a RISC OS system
                =======================================

0.  Read this entire file before starting, and come back to the Notes
    below if you have any problems.  For help in controlling and
    running the game after it is installed, see the '?' command
    within the game and doc.txt.Guidebook (non-installers want to know
    about those things too).

1.  Make sure all the NetHack files are in the appropriate directory
    structure.  You should have a main directory with subdirectories
    dat, doc, include, src, util, sys.share, sys.riscos, and win.tty.
    You may have other subdirectories under sys and win, but they will not
    affect compilation for a RISC OS system.  If you do not follow this
    structure, the Makefiles will not function properly. The .c files for
    the main program belong in src, those for utility programs in util, and
    RISC OS-specific ones in sys/unix.  All the .h files belong in include,
    the documentation in doc, and assorted data files in dat.  Some RISC OS
    versions may also be interested in sys/share's lex/yacc output, as
    explained in note 4.
    (A more detailed explanation of the directory structure may be found
    in Files, which should be in the top directory.)

2.  Your Makefiles may still be in sys/riscos/makefiles
    If so, run "SetupMakes" in that directory to distribute the Makefiles
    to places they can do their work.  (If later official patches change
    these Makefiles, SetupMakes should be rerun to make sure you use the
    current copies.)

3.  Go to the include subdirectory and edit config.h according to the
    comments to match your system and desired set of features.  Similarly
    edit riscosconf.h.  Please see the "Notes:" section, below, for some
    configuration hints for particular systems.

4.  If you want to, look through system.h.  This file attempts to match the
    types for system calls and library routines with various flavors of
    operating systems.  Leaving this file alone is unlikely to cause worse
    problems than lint errors, but it's worth checking if you get compile
    errors, especially if you have an unusual system.

5.  Go to the src subdirectory and look at the top of topten.c.  You may want
    to change the definitions of PERSMAX and PERS_IS_UID here to get different
    behavior from the high score list.

6.  Edit the top sections of the src and util Makefiles.  (If you are doing
    a full recompile, or if you got your files from someplace besides the
    official distribution, type 'touch makedefs.c' to make sure certain files
    (onames.h, pm.h) get remade instead of relying on the potentially
    troublesome timestamps.)  Then type 'make' in src and go get a cup of
    coffee or take a nap, depending on the speed of your system.  You should
    now have created the game executable.

7.  Go back to the top directory and fiddle around with the makefile to work
    out what else needs making; typically you'll need to:

    make data
    make rumors
    make oracles
    make quest.dat
    make spec_levs
    make dungeon

    and if you're using the data librarian:

    make dlb

    Other parts of the top level makefile are unlikely to work as they haven't
    been RISC OSified yet. You then need to copy the required files to a new
    directory somewhere (such as the !NetHack directory provided in sys.riscos)
    For the dlb version, you'll need:

    src.nethack			in !NetHack
    sys.riscos./nethackrc	in !NetHack.Playground
    dat.license			in !NetHack.Playground
    dat.nhdat			in !NetHack.Playground
    dat.options			in !NetHack.Playground

    As well as a blank textfile 'record' and empty directory 'save' in
    !NetHack.Playground.

    This should be all that's needed to play the game.

Notes:

1.  Save files and bones files from previous versions will not work with
    NetHack 3.4.  Don't bother trying to keep them.

2.  There are many parts of the makefiles (And even source files) which haven't
    been RISC OSified yet, so don't expect them to work all the time. The
    source itself is based around the UNIX version, so you'll need UnixLib to
    get it to compile (And probably GCC). The file names were translated from
    UNIX to RISC OS by a fairly dumb program I wrote, so don't be surprised if
    they are a bit silly or UnixLib's translation doesn't agree with some of
    them.

3.  If you get unexplained deaths by trickery, then there is probably something
    going wrong with the file access somewhere

4.  If your system does not have a lex/yacc or flex/bison combination
    capable of producing the dungeon and level compilers, lex and yacc
    output from one of our development systems can be found in sys/share.
    Unfortunately, this output is less portable than the rest of the code,
    as it contains skeleton parsing code provided by the specific vendor
    who has no particular incentive to make such skeletons portable, but
    the output works on most systems.  To try it on yours, copy dgn_comp.h
    and lev_comp.h to include and dgn_lex.c, dgn_yacc.c, lev_lex.c, and
    lev_yacc.c to util.
