OSDN Git Service

Initial Import
[nethackexpress/trunk.git] / sys / unix / README.linux
1 NetHack 3.4.3 Linux Elf
2
3 This README provides the instructions for using the official Linux binary,
4 system platform requirements, as well as steps used to create that binary.
5 The same steps can be used from the source distribution to create a similar
6 binary.
7
8 The official Linux binary has support for tty and X11 windowing systems, but
9 not Qt.  This means you will need to have X11 libraries installed on your
10 system to run this binary, even in its tty flavor.
11
12
13 The Linux binary package assumes that you have a user and a group named
14 "games" on your system.  If you do not, you can simplify installation by
15 creating them first.
16
17 Log in as or su to "root".  Then, cd /, gunzip and untar the package,
18 preserving permissions to put the NetHack files in /usr/games/nethack and
19 /usr/games/lib/nethackdir.   For example, if the package in in your
20 home directory you might perform these steps.
21     % su
22     # cd /
23     # tar xpvzf ~yourlogin/nethack-343-linux-X11.tgz
24
25 If you have old record and logfile entries from a previous NetHack version,
26 you might want to save copies before they get overwritten by the new empty
27 files; old saved games and bones files from 3.4.x will work with 3.4.3.
28 If you are installing from the RPM, there is no need to save the old record
29 and logfile; they are automatically preserved.
30
31 In addition to data files for running the game, you will find other useful
32 things in /usr/games/lib/nethackdir (such as a copy of this README :-).
33
34 The general documentation Guidebook.txt and the processed man pages
35 nethack.txt and recover.txt should provide an introduction to the game.
36
37 The sample config file called dot.nethackrc can be used by copying
38 it to your home directory as .nethackrc and modifying it to your liking.
39
40 If you are running X11 copy the nh10.pcf and ibm.pcf font files from
41 /usr/games/lib/nethackdir to a X11 fonts directory (such as
42 /usr/X11/lib/X11/fonts/misc) and run "mkfontdir", then restart X
43 windows to load them.  If you prefer to use the graphical tiles,
44 add the following to your .Xdefaults or .Xresources file:
45         NetHack.tile_file: x11tiles
46 You may need to run "xrdb -merge $HOME/.Xdefaults" (or .Xresources) after
47 doing this.
48
49 The official Linux binary is set up to run setgid games, which allows
50 multiple users on your system to play the game and prevents cheating by
51 unprivileged users.  The usual default for NetHack is setuid games, but
52 this causes problems with accessing .nethackrc on distributions with
53 restrictive default security on home directories and users who don't know
54 the tradeoffs of various permission settings.
55
56
57 If you have problems, send us some email.
58
59 nethack-bugs@nethack.org
60
61
62
63 Steps used to build this binary release, in addition to the basic
64 instructions found in sys/unix/Install.unx.  The step numbers below
65 correspond to the step numbers in sys/unix/Install.unx.
66
67 System:  gcc-3.2, XFree86-libs-4.2.1, ncurses-5.2, glibc-2.3.2 (GLIBC_2.3)
68
69 3.  Edit include/config.h and include/unixconf.h
70     config.h: define X11_GRAPHICS window support.
71               define USE_XPM support.
72               define COMPRESS as /bin/gzip as that is where it
73               seems to reside on newer Linux's.
74               define COMPRESS_EXTENSION as ".gz"
75               define DLB
76               define AUTOPICKUP_EXCEPTIONS
77
78     unixconf.h: define LINUX
79                 define TIMED_DELAY
80
81 6.  Makefile.src: define modern, non-BSD Linux and linux options throughout
82                   CC = gcc
83                   LFLAGS = -L/usr/X11R6/lib
84                   WINSRC = $(WINTTYSRC) $(WINX11SRC)
85                   WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
86                   WINTTYLIB = /usr/lib/libncurses.a
87                   WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11
88                   WINLIB = $(WINTTYLIB) $(WINX11LIB)
89
90     Makefile.utl: define modern, non-BSD Linux and linux options throughout
91                   Use bison/flex instead of yacc/lex
92                   CC = gcc
93                   LFLAGS = -L/usr/X11R6/lib
94                   YACC = bison -y
95                   LEX = flex
96
97 7.  Makefile.top: GAMEGRP = games
98                   GAMEPERM = 02755
99                   FILEPERM = 0664
100                   EXEPERM = 0755
101                   DIRPERM = 0775
102                   VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
103
104     make all; su; make install
105
106 9.  Additional step: As discussed in win/X11/Install.X11, convert nh10.bdf
107     and ibm.bdf to proper font files and place in font path.