OSDN Git Service

upgrade to 3.6.2
[jnethack/source.git] / sys / unix / README.linux
1 NetHack 3.6.0 Linux Elf
2
3 $NHDT-Date: 1524684188 2018/04/25 19:23:08 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $
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-361-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.6.0 and 3.6.1 should work 
30 with 3.6.2 but even older saved games and bones files from 3.4.3 will not.
31 If you are installing from the RPM, there is no need to save the old record
32 and logfile; they are automatically preserved.
33
34 In addition to data files for running the game, you will find other useful
35 things in /usr/games/lib/nethackdir (such as a copy of this README :-).
36
37 The general documentation Guidebook.txt and the processed man pages
38 nethack.txt and recover.txt should provide an introduction to the game.
39
40 The sample config file called dot.nethackrc can be used by copying
41 it to your home directory as .nethackrc and modifying it to your liking.
42
43 If you are running X11 copy the nh10.pcf and ibm.pcf font files from
44 /usr/games/lib/nethackdir to a X11 fonts directory (such as
45 /usr/X11/lib/X11/fonts/misc) and run "mkfontdir", then restart X
46 windows to load them.  If you prefer to use the graphical tiles,
47 add the following to your .Xdefaults or .Xresources file:
48         NetHack.tile_file: x11tiles
49 You may need to run "xrdb -merge $HOME/.Xdefaults" (or .Xresources) after
50 doing this.
51
52 The official Linux binary is set up to run setgid games, which allows
53 multiple users on your system to play the game and prevents cheating by
54 unprivileged users.  The usual default for NetHack is setuid games, but
55 this causes problems with accessing .nethackrc on distributions with
56 restrictive default security on home directories and users who don't know
57 the tradeoffs of various permission settings.
58
59
60 If you have problems, send us some email.
61
62 nethack-bugs@nethack.org
63
64
65
66 Steps used to build this binary release, in addition to the basic
67 instructions found in sys/unix/Install.unx.  The step numbers below
68 correspond to the step numbers in sys/unix/Install.unx.
69
70 System:  gcc-3.2, XFree86-libs-4.2.1, ncurses-5.2, glibc-2.3.2 (GLIBC_2.3)
71
72 3.  Edit include/config.h and include/unixconf.h
73     config.h: define X11_GRAPHICS window support.
74               define USE_XPM support.
75               define COMPRESS as /bin/gzip as that is where it
76               seems to reside on newer Linux's.
77               define COMPRESS_EXTENSION as ".gz"
78               define DLB
79
80     unixconf.h: define LINUX
81                 define TIMED_DELAY
82
83 6.  Makefile.src: define modern, non-BSD Linux and linux options throughout
84                   CC = gcc
85                   LFLAGS = -L/usr/X11R6/lib
86                   WINSRC = $(WINTTYSRC) $(WINX11SRC)
87                   WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
88                   WINTTYLIB = /usr/lib/libncurses.a
89                   WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11
90                   WINLIB = $(WINTTYLIB) $(WINX11LIB)
91
92     Makefile.utl: define modern, non-BSD Linux and linux options throughout
93                   Use bison/flex instead of yacc/lex
94                   CC = gcc
95                   LFLAGS = -L/usr/X11R6/lib
96                   YACC = bison -y
97                   LEX = flex
98
99 7.  Makefile.top: GAMEGRP = games
100                   GAMEPERM = 02755
101                   FILEPERM = 0664
102                   EXEPERM = 0755
103                   DIRPERM = 0775
104                   VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
105
106     make all; su; make install
107
108 9.  Additional step: As discussed in win/X11/Install.X11, convert nh10.bdf
109     and ibm.bdf to proper font files and place in font path.