OSDN Git Service

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