Files
nethack/sys/unix
nethack.rankin 2c0a072ef1 main() reorganization (trunk only)
Move some internals-related code out of port-specific main so that
it isn't duplicated a bunch of times.  One minor side-effect of this
change is that if you auto-pickup something at the very start of a game,
it will happen after any full moon/new moon/Friday 13th message rather
than before.  There's a second change for some:  the shared main() used
by several of the micro ports had a small difference in game play--if you
saved a game while on an engraving, it would automatically be read when
you resume--that will now occur for everybody [Elbereth weenies rejoice!].
pcmain() was also calling update_inventory() at start of play.  That's
unnecessary for new games, where inventory initialization triggers a call
to it for each item added to your pack; but I wasn't sure about restored
games, so everybody gets it there now.

     The Mac and BeOS ports evidently haven't been touched it some time;
they still referenced flags.move which got replaced by context.move quite
a while back.  The Windows GUI code has a declaration for mswin_moveloop()
which appears to be non-existant, but I left it alone.  I assume that the
Qt interface uses the existing main() routines; at least I couldn't find
any start of game code specific to it.  vmsmain's revised main() is the
only one which has been tested.
2006-04-02 07:35:30 +00:00
..
2002-01-05 21:05:59 +00:00
2002-01-05 21:05:59 +00:00
2002-01-05 21:05:59 +00:00
2005-12-15 03:42:52 +00:00
2005-01-02 20:55:41 +00:00
2006-01-07 13:38:29 +00:00
2002-01-05 21:05:59 +00:00
2002-01-05 21:05:59 +00:00
2006-04-02 07:35:30 +00:00

NetHack 3.5.0 Linux Elf

This README provides the instructions for using the official Linux binary,
system platform requirements, as well as steps used to create that binary.
The same steps can be used from the source distribution to create a similar
binary.

The official Linux binary has support for tty and X11 windowing systems, but
not Qt.  This means you will need to have X11 libraries installed on your
system to run this binary, even in its tty flavor.


The Linux binary package assumes that you have a user and a group named
"games" on your system.  If you do not, you can simplify installation by
creating them first.

Log in as or su to "root".  Then, cd /, gunzip and untar the package,
preserving permissions to put the NetHack files in /usr/games/nethack and
/usr/games/lib/nethackdir.   For example, if the package in in your
home directory you might perform these steps.
    % su
    # cd /
    # tar xpvzf ~yourlogin/nethack-350-linux-X11.tgz

If you have old record and logfile entries from a previous NetHack version,
you might want to save copies before they get overwritten by the new empty
files; old saved games and bones files from 3.4.x will not work with 3.5.0.
If you are installing from the RPM, there is no need to save the old record
and logfile; they are automatically preserved.

In addition to data files for running the game, you will find other useful
things in /usr/games/lib/nethackdir (such as a copy of this README :-).

The general documentation Guidebook.txt and the processed man pages
nethack.txt and recover.txt should provide an introduction to the game.

The sample config file called dot.nethackrc can be used by copying
it to your home directory as .nethackrc and modifying it to your liking.

If you are running X11 copy the nh10.pcf and ibm.pcf font files from
/usr/games/lib/nethackdir to a X11 fonts directory (such as
/usr/X11/lib/X11/fonts/misc) and run "mkfontdir", then restart X
windows to load them.  If you prefer to use the graphical tiles,
add the following to your .Xdefaults or .Xresources file:
	NetHack.tile_file: x11tiles
You may need to run "xrdb -merge $HOME/.Xdefaults" (or .Xresources) after
doing this.

The official Linux binary is set up to run setgid games, which allows
multiple users on your system to play the game and prevents cheating by
unprivileged users.  The usual default for NetHack is setuid games, but
this causes problems with accessing .nethackrc on distributions with
restrictive default security on home directories and users who don't know
the tradeoffs of various permission settings.


If you have problems, send us some email.

nethack-bugs@nethack.org



Steps used to build this binary release, in addition to the basic
instructions found in sys/unix/Install.unx.  The step numbers below
correspond to the step numbers in sys/unix/Install.unx.

System:  gcc-3.2, XFree86-libs-4.2.1, ncurses-5.2, glibc-2.3.2 (GLIBC_2.3)

3.  Edit include/config.h and include/unixconf.h
    config.h: define X11_GRAPHICS window support.
              define USE_XPM support.
              define COMPRESS as /bin/gzip as that is where it
              seems to reside on newer Linux's.
              define COMPRESS_EXTENSION as ".gz"
              define DLB
	      define AUTOPICKUP_EXCEPTIONS

    unixconf.h: define LINUX
                define TIMED_DELAY

6.  Makefile.src: define modern, non-BSD Linux and linux options throughout
		  CC = gcc
		  LFLAGS = -L/usr/X11R6/lib
		  WINSRC = $(WINTTYSRC) $(WINX11SRC)
		  WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
		  WINTTYLIB = /usr/lib/libncurses.a
		  WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11
		  WINLIB = $(WINTTYLIB) $(WINX11LIB)

    Makefile.utl: define modern, non-BSD Linux and linux options throughout
                  Use bison/flex instead of yacc/lex
		  CC = gcc
		  LFLAGS = -L/usr/X11R6/lib
		  YACC = bison -y
		  LEX = flex

7.  Makefile.top: GAMEGRP = games
		  GAMEPERM = 02755
		  FILEPERM = 0664
		  EXEPERM = 0755
		  DIRPERM = 0775
		  VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm

    make all; su; make install

9.  Additional step: As discussed in win/X11/Install.X11, convert nh10.bdf
    and ibm.bdf to proper font files and place in font path.