File: Install.dos

package info (click to toggle)
nethack 3.4.3-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,512 kB
  • ctags: 16,957
  • sloc: ansic: 196,792; cpp: 7,083; sh: 6,785; yacc: 2,005; lex: 377; makefile: 120; awk: 89; sed: 11
file content (268 lines) | stat: -rw-r--r-- 11,725 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
	SCCS Id: @(#)Install.dos	 3.4

	   Copyright (c) NetHack PC Development Team 1990-2002.
       NetHack may be freely redistributed.  See license for details.
       ==============================================================
              Instructions for compiling and installing
		     NetHack 3.4 on a DOS system
         ======================================================
                   (or, How to make PC NetHack 3.4)
                 Last revision: $Date: 2003/06/13 19:57:52 $

Credit for a runnable full PC NetHack 3.4 goes to the PC Development team
of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill Dyer, 
Timo Hakulinen, Yamamoto Keizo, Mike Threepoint, Mike Stephenson, 
Stephen White, Ken Washikita and Janet Walz.  The present port is based
on the previous effort of Pierre Martineau, Stephen Spackman, Steve Creps, Mike
Threepoint, Mike Stephenson, Norm Meluch and Don Kneller.

There has been very little port-specific maintenance for NetHack on DOS since 
NetHack 3.3.0.

CONTENTS:

        I.  Dispelling the Myths
        II. Compiling on a DOS machine
        Appendix A - Building the "official binary"
        Appendix B - DJGPP Compiler (gcc ported to msdos) notes
        Appendix C - Additional Notes
        Appendix D - Contacting Us

I.  Dispelling the Myths:

    Compiling NetHack is not as easy as it sounds, nor as hard as it looks,
    however it will behoove you to read this entire file through before
    beginning the task.

    We have provided a proper Makefile for building NetHack using the
    following compilers:
    	djgpp V2.03 or later

    For specific details concerning the djgpp compiler, please see the
    appendix B.

    The makefile named Makefile.GCC is for use with GNU Make that
    accompanies djgpp.

    If you want to build a copy of NetHack that is identical to the
    "official binary", please see appendix A.

    The unsupported sys/msdos/Makefile.MSC was for the old 16 bit
    Microsoft Visual C 1.52c compiler and has not been made compliant
    with 3.4.x.

    You may find it useful to obtain copies of lex (flex) and yacc (bison
    or byacc).  While not strictly necessary to compile nethack, they are 
    required should you desire to make any changes to the level and dungeon 
    compilers.  Flex and Bison are included with the DJGPP distribution and 
    are also available on many archive sites. 

    Also be sure to pick up djgpp v2gnu/fil41b.zip to get ls.exe and 
    touch.exe, since the Makefile uses them by default.

II. To compile your copy of NetHack on a DOS machine:
    (or "just follow these few 'simple' steps outlined below.")

1.  It almost goes without saying that you should make sure that your tools
    are set up and running correctly.

2.  Make sure all the NetHack files are in the appropriate directory
    structure.  You should have a main directory with subdirectories
    dat, doc, include, src, sys\share, sys\msdos, util, win\tty and
    win\share.  Other subdirectories may also be included in your
    distribution, but they are not necessary for use with DOS.  You can
    delete them to save space.

    Required Source Directories for DOS NetHack:

                           (top)
                             |
        ------------------------------------------------- 
        |       |     |        |       |     |          | 
       util    dat   doc    include   src   sys        win
                                             |          |
                                          ------      ----- 
                                          |    |      |   |  
                                       share msdos   tty share

    Check the file "Files" in your top level directory for an exact
    listing of what files are in which directory.  In order for the
    Makefiles to work, all the source files must be in the proper
    locations.

    If you downloaded or ftp'd the sources from a UNIX system, the lines
    will probably end in UNIX-style newlines, instead of the carriage
    return and line feed pairs used by DOS.  Some programs have trouble
    with them, so you may need to convert them (with a utility like
    Rahul Dhesi's "flip").

3.  Go to the sys/msdos directory and ensure that the file setup.bat
    has MSDOS style end-of-line characters rather than UNIX style
    end-of-line characters.  You can do that using a utility like
    Rahul Dhesi's "flip", or by invoking the MSDOS edit utility on
    setup.bat and saving the file without making any changes. Failure to
    do this will prevent the bat file from executing completely, yet no
    warning message will be given.

    Run the setup.bat batch file with the following as the argument:

       GCC        For djgpp and GNU MAKE.

    The appropriate and necessary Makefile movement will be accomplished
    for you, as well as verifying a few files and fixing a few file names
    on FAT systems with long file name support.

4.  Now go to the include subdirectory to check a couple of the header
    files there.  Things *should* work as they are, but since you have
    probably set up your system in some sort of custom configuration
    it doesn't hurt to check out the following:

    First check config.h according to the comments to match your system and
    desired set of features.  Mostly you need to check the WIZARD option,
    and check TERMLIB and COMPRESS.  Also be sure to leave DLB support 
    commented out in config.h.  MSDOS has support for DLB, but it must be 
    done through the Makefile, rather than config.h, to ensure that the 
    necessary packaging steps are done.

    We've managed to enable all the special features.  You may include all
    or as few of them as you wish.  To conserve disk space, you may wish
    to disable LOGFILE and NEWS.

    Also check pcconf.h, which should not need much editing (if you are
    including random.c, and if you do not require termcap for screen
    management).  If you are not including random.c you will need to
    comment out RANDOM.

    If using DJGPP, you can choose between SCREEN_BIOS
    and SCREEN_DJGPPFAST.  Never, never, ever choose both.  Bad things
    will happen.  We are not kidding.

5.  If you want to change the high score list behavior, examine the top of
    topten.c, in the src directory.  You may want to change the definitions of
    PERSMAX, POINTSMIN, and ENTRYMAX.  We set POINTSMIN to 51 and ENTRYMAX to
    50 to keep the size of the score list down.

6.  Go to the src directory and edit the top of your Makefile.  Be sure the
    directory you want the game installed in (GAMEDIR) actually exists.

7.  Now that everything is set up,

       Go to the src directory, and using the GNU Make utility,
       "make install".

    Depending on your particular machine and compiler, you can either
    grab a cup of coffee or go home for the day.  Your computer will be
    occupied for quite some time.  If all goes well, you will get an
    NetHack executable.

9.  If you chose DLB support (recommended), make sure that the file nhdat 
    got copied into the game directory.

    If you didn't choose DLB support, make sure the support files --
    data, rumors, cmdhelp, opthelp, help, hh,history, guidebook.txt
    license, and all the *.lev files -- were copied to the game directory.  
    If not, move them there from the dat directory yourself.  rumors can 
    be created manually be entering "makedefs -r", data by entering 
    "makedefs -d".

    Make sure the files NetHack1.tib and NetHacko.tib made it to your game
    directory.  Copy them from src to the game directory yourself if
    necessary.

    Make sure the files defaults.nh and termcap made it to your game
    directory.  If not, go to sys\share and copy NetHack.cnf to
    your game directory as defaults.nh.  The name in previous versions was
    nethack.cnf, but the CNF extension conflicted with the MS Windows
    speed-dialer, making the file hidden on many machines.

    If you changed your build settings to include TERMCAP support, copy
    termcap to your game directory.  

    Also, make sure the file msdoshlp.txt made it to your game directory.
    If it didn't, move it from sys\msdos to your game directory
    yourself.

10. In your game directory, review the settings in defaults.nh and adjust
    them according to your style of play.

11. Play NetHack.  If it works, you're done!

Appendix A - Building the "official binary"

    If you wish to build a copy of NetHack identical to the one that
    the pc team distributes, simply do the following:

    The 32-bit Protected Mode DPMI version built with 32-bit djgpp 
    compiler V2.03 or greater, make no changes to any of the defines and use 
    the Makefile.GCC as distributed, and as moved in step 3.

    Paths below are relative to the top of your unpacked
    NetHack source distribution:

       md \nethack\binary   (must match Makefile)
       cd sys\msdos
       setup GCC
       cd ..\..\src
       make install


    Make sure the following files have been converted from the
    unix style "^J" end of line, to the msdos style "^M^J":
      license, defaults.nh.

    Place all the files in a clean directory and test.

Appendix B - DJGPP Compiler (gcc ported to msdos)

    If you have a 386 or better machine, you are in luck.  You can compile
    NetHack without spending money on a compiler.  DJGPP is available free
    from many archive sites.
    At the time of this release in April 2002, the URL
	http://www.delorie.com/djgpp/zip-picker.html/
    had information on how to obtain djgpp and what pieces to get.
    Be sure to pick up djgpp v2gnu/fil41b.zip to get ls.exe and 
    touch.exe, since the Makefile uses them by default (or change
    the Makefile to use alternatives).

    Special note for Windows 2000 / Windows XP users: You must have a 
    recent djgpp distribution for the build process, and the generated
    executables to work properly on those platforms.

    Setting up DJGPP is more than adequately explained in the documentation
    that comes with it.  Be sure to pick up the yacc and flex built with
    DJGPP if you intend to do any modification of the special levels or
    dungeon compilers.  They should be available at the same place you got
    djgpp.

    The latest version of djgpp, V2.03 with the most recent refresh
    will produce a binary that will run under Microsoft Windows, or any 
    other DPMI provider.  djgpp also comes with a DPMI provider called CWSDPMI.  
    Place CWSDPMI.EXE in your path and it will be used in the absence of any 
    other DPMI provider.

    If you want to use the built-in DJGPP screen routines, uncomment
    SCREEN_DJGPPFAST in pcconf.h (the default for djgpp).

Appendix C - Additional Notes

1)  Save files and bones files from versions of NetHack prior to 3.4.0 will not
    work with this NetHack.  Don't bother trying to keep them.

2)  To install an update of NetHack after changing something, type 'make' 
    for DJGPP from the src directory.  If you add, delete, or reorder monsters or
    objects, or you change the format of saved level files, delete any save
    and bones files.  (Trying to use such files sometimes produces amusing
    confusions on the game's part, but usually crashes.)


Appendix D - Contacting the Development Team

    If you discover a bug and wish to report it, or if you have comments
    or suggestions we recommend using
    our "Contact Us" web page at:
        http://www.nethack.org/common/contact.html

    If you don't have access to the web, or you want to send us a patch
    to the NetHack source code feel free to drop us a line c/o:
        DevTeam (at) nethack.org