2 REM SCCS Id: @(#)setup.bat 2002/03/17
\r
3 REM Copyright (c) NetHack PC Development Team 1990 - 2002
\r
4 REM NetHack may be freely redistributed. See license for details.
\r
7 echo Copyright (c) NetHack PC Development Team 1990 - 2002
\r
8 echo NetHack may be freely redistributed. See license for details.
\r
10 REM setup batch file for msdos, see Install.dos for details.
\r
12 if not %1.==. goto ok_parm
\r
16 echo Checking to see if directories are set up properly ...
\r
17 if not exist ..\..\include\hack.h goto err_dir
\r
18 if not exist ..\..\src\hack.c goto err_dir
\r
19 if not exist ..\..\dat\wizard.des goto err_dir
\r
20 if not exist ..\..\util\makedefs.c goto err_dir
\r
21 if not exist ..\..\win\tty\wintty.c goto err_dir
\r
22 if not exist ..\share\lev_yacc.c goto err_dir
\r
23 echo Directories OK.
\r
25 if not exist ..\..\binary\* mkdir ..\..\binary
\r
26 if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul
\r
28 if exist ..\..\dat\data.bas goto long1ok
\r
29 if exist ..\..\dat\data.base goto long1a
\r
30 if exist ..\..\dat\data~1.bas goto long1b
\r
33 echo Changing some long-named distribution file names:
\r
34 echo "Copying ..\..\dat\data.base -> ..\..\dat\data.bas"
\r
35 copy ..\..\dat\data.base ..\..\dat\data.bas
\r
36 if exist ..\..\dat\data.old del /Q ..\..\dat\data.old
\r
37 ren ..\..\dat\data.base data.old
\r
40 echo Changing some long-named distribution file names:
\r
41 echo "Copying ..\..\dat\data~1.bas -> ..\..\dat\data.bas"
\r
42 copy ..\..\dat\data~1.bas ..\..\dat\data.bas
\r
43 if exist ..\..\dat\data.old del /Q ..\..\dat\data.old
\r
44 ren ..\..\dat\data~1.bas data.old
\r
47 if exist ..\..\include\patchlev.h goto long2ok
\r
48 if exist ..\..\include\patchlevel.h goto long2a
\r
49 if exist ..\..\include\patchl~1.h goto long2b
\r
52 echo "Copying ..\..\include\patchlevel.h -> ..\..\include\patchlev.h"
\r
53 copy ..\..\include\patchlevel.h ..\..\include\patchlev.h
\r
54 if exist ..\..\include\patchlev.old del /Q ..\..\include\patchlev.old
\r
55 ren ..\..\include\patchlevel.h patchlev.old
\r
58 echo "Copying ..\..\include\patchl~1.h -> ..\..\include\patchlev.h"
\r
59 copy ..\..\include\patchl~1.h ..\..\include\patchlev.h
\r
60 if exist ..\..\include\patchlev.old del /Q ..\..\include\patchlev.old
\r
61 ren ..\..\include\patchl~1.h patchlev.old
\r
64 REM Missing guidebook is not fatal to the build process
\r
65 if exist ..\..\doc\guideboo.txt goto long3ok
\r
66 if exist ..\..\doc\guidebook.txt goto long3a
\r
67 if exist ..\..\doc\guideb~1.txt goto long3b
\r
70 echo "Copying ..\..\doc\guidebook.txt -> ..\..\doc\guideboo.txt"
\r
71 copy ..\..\doc\guidebook.txt ..\..\doc\guideboo.txt
\r
72 if exist ..\..\doc\guideboo.old del /Q ..\..\doc\guideboo.old
\r
73 ren ..\..\doc\guidebook.txt guideboo.old
\r
76 echo "Copying ..\..\doc\guideb~1.txt -> ..\..\doc\guideboo.txt"
\r
77 copy ..\..\doc\guideb~1.txt ..\..\doc\guideboo.txt
\r
78 if exist ..\..\doc\guideboo.old del /Q ..\..\doc\guideboo.old
\r
79 ren ..\..\doc\guideb~1.txt guideboo.old
\r
82 echo "Warning - There is no NetHack Guidebook (..\..\doc\guideboo.txt)"
\r
83 echo " included in your distribution. Build will proceed anyway."
\r
86 if "%1"=="GCC" goto ok_gcc
\r
87 if "%1"=="gcc" goto ok_gcc
\r
88 if "%1"=="nmake" goto ok_msc
\r
89 if "%1"=="NMAKE" goto ok_msc
\r
90 if "%1"=="BC" goto ok_bc
\r
91 if "%1"=="bc" goto ok_bc
\r
92 if "%1"=="MSC" goto ok_msc
\r
93 if "%1"=="msc" goto ok_msc
\r
97 echo Symbolic links, msdos style
\r
98 echo "Makefile.GCC -> ..\..\src\makefile"
\r
99 copy makefile.GCC ..\..\src\makefile
\r
103 echo Copying Makefile for Microsoft C and Microsoft NMAKE.
\r
104 echo "Makefile.MSC -> ..\..\src\makefile"
\r
105 copy Makefile.MSC ..\..\src\makefile
\r
106 echo Copying overlay schemas to ..\..\src
\r
107 copy schema*.MSC ..\..\src\schema*.DEF
\r
112 echo Copying Makefile for Borland C and Borland's MAKE.
\r
113 echo "Makefile.BC -> ..\..\src\makefile"
\r
114 copy Makefile.BC ..\..\src\makefile
\r
115 echo Copying overlay schemas to ..\..\src
\r
116 copy schema*.BC ..\..\src
\r
121 echo ** ERROR - New file system with "long file name support" problem. **
\r
122 echo A couple of NetHack distribution files that are packaged with
\r
123 echo a long filename ( exceeds 8.3) appear to be missing from your
\r
125 echo The following files need to exist under the names on the
\r
126 echo right in order to build NetHack:
\r
128 echo ..\..\dat\data.base needs to be copied to ..\..\dat\data.bas
\r
129 echo ..\..\include\patchlevel.h needs to be copied to ..\..\include\patchlev.h
\r
131 echo setup.bat was unable to perform the necessary changes because at least
\r
132 echo one of the files doesn't exist under its short name, and the
\r
133 echo original (long) file name to copy it from was not found either.
\r
140 echo "%0 <GCC | MSC | BC >"
\r
142 echo Run this batch file specifying on of the following:
\r
145 echo (depending on which compiler and/or make utility you are using).
\r
147 echo The GCC argument is for use with djgpp and the NDMAKE utility.
\r
149 echo The MSC argument is for use with Microsoft C and the NMAKE utility
\r
150 echo that ships with it (MSC 7.0 or greater only, including Visual C).
\r
152 echo The BC argument is for use with Borland C and Borland's MAKE utility
\r
153 echo that ships with it (Borland C++ 3.1 only).
\r
159 echo Your directories are not set up properly, please re-read the
\r
160 echo Install.dos and README documentation.
\r
165 echo Please continue with next step from Install.dos.
\r