2 REM NetHack 3.6 setup.bat $NHDT-Date: 1432512792 2015/05/25 00:13:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $
3 REM Copyright (c) NetHack PC Development Team 1990 - 2018
4 REM NetHack may be freely redistributed. See license for details.
7 echo Copyright (c) NetHack PC Development Team 1990 - 2018
8 echo NetHack may be freely redistributed. See license for details.
10 REM setup batch file for msdos, see Install.dos for details.
12 if not %1.==. goto ok_parm
16 echo Checking to see if directories are set up properly ...
17 if not exist ..\..\include\hack.h goto err_dir
18 if not exist ..\..\src\hack.c goto err_dir
19 if not exist ..\..\dat\wizard.des goto err_dir
20 if not exist ..\..\util\makedefs.c goto err_dir
21 if not exist ..\..\win\tty\wintty.c goto err_dir
22 if not exist ..\share\lev_yacc.c goto err_dir
25 if not exist ..\..\binary\* mkdir ..\..\binary
26 if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul
28 if exist ..\..\dat\data.bas goto long1ok
29 if exist ..\..\dat\data.base goto long1a
30 if exist ..\..\dat\data~1.bas goto long1b
33 echo Changing some long-named distribution file names:
34 echo "Renaming ..\..\dat\data.base -> ..\..\dat\data.bas"
35 ren ..\..\dat\data.base data.bas
38 echo Changing some long-named distribution file names:
39 echo "Renaming ..\..\dat\data~1.bas -> ..\..\dat\data.bas"
40 ren ..\..\dat\data~1.bas data.bas
43 if exist ..\..\include\patchlev.h goto long2ok
44 if exist ..\..\include\patchlevel.h goto long2a
45 if exist ..\..\include\patchl~1.h goto long2b
48 echo "Renaming ..\..\include\patchlevel.h -> ..\..\include\patchlev.h"
49 ren ..\..\include\patchlevel.h patchlev.h
52 echo "Renaming ..\..\include\patchl~1.h -> ..\..\include\patchlev.h"
53 ren ..\..\include\patchl~1.h patchlev.h
56 REM Missing guidebook is not fatal to the build process
57 if exist ..\..\doc\guideboo.txt goto long3ok
58 if exist ..\..\doc\guidebook.txt goto long3a
59 if exist ..\..\doc\guideb~1.txt goto long3b
62 echo "Copying ..\..\doc\guidebook.txt -> ..\..\doc\guidebk.txt"
63 ren ..\..\doc\guidebook.txt guidebk.txt
66 echo "Copying ..\..\doc\guideb~1.txt -> ..\..\doc\guidebk.txt"
67 ren ..\..\doc\guideb~1.txt guidebk.txt
70 echo "Warning - There is no NetHack Guidebook (..\..\doc\guidebk.txt)"
71 echo " included in your distribution. Build will proceed anyway."
74 if exist ..\..\sys\share\posixreg.c goto long4ok
75 if exist ..\..\sys\share\posixregex.c goto long4a
76 if exist ..\..\sys\share\posixr~1.c goto long4b
79 echo "Renaming ..\..\sys\share\posixregex.c -> ..\..\sys\share\posixreg.c"
80 ren ..\..\sys\share\posixregex.c posixreg.c
83 echo "Renaming ..\..\sys\share\posixr~1.c -> ..\..\sys\share\posixreg.c"
84 ren ..\..\sys\share\posixr~1.h posixreg.c
87 if "%1"=="GCC" goto ok_gcc
88 if "%1"=="gcc" goto ok_gcc
89 if "%1"=="nmake" goto ok_msc
90 if "%1"=="NMAKE" goto ok_msc
91 if "%1"=="BC" goto ok_bc
92 if "%1"=="bc" goto ok_bc
93 if "%1"=="MSC" goto ok_msc
94 if "%1"=="msc" goto ok_msc
98 echo Symbolic links, msdos style
99 echo "Makefile.GCC -> ..\..\src\makefile"
100 copy makefile.GCC ..\..\src\makefile
104 echo Copying Makefile for Microsoft C and Microsoft NMAKE.
105 echo "Makefile.MSC -> ..\..\src\makefile"
106 copy Makefile.MSC ..\..\src\makefile
107 echo Copying overlay schemas to ..\..\src
108 copy schema*.MSC ..\..\src\schema*.DEF
113 echo Copying Makefile for Borland C and Borland's MAKE.
114 echo "Makefile.BC -> ..\..\src\makefile"
115 copy Makefile.BC ..\..\src\makefile
116 echo Copying overlay schemas to ..\..\src
117 copy schema*.BC ..\..\src
122 echo ** ERROR - New file system with "long file name support" problem. **
123 echo A couple of NetHack distribution files that are packaged with
124 echo a long filename ( exceeds 8.3) appear to be missing from your
126 echo The following files need to exist under the names on the
127 echo right in order to build NetHack:
129 echo ..\..\dat\data.base needs to be copied to ..\..\dat\data.bas
130 echo ..\..\include\patchlevel.h needs to be copied to ..\..\include\patchlev.h
132 echo setup.bat was unable to perform the necessary changes because at least
133 echo one of the files doesn't exist under its short name, and the
134 echo original (long) file name to copy it from was not found either.
141 echo "%0 <GCC | MSC | BC >"
143 echo Run this batch file specifying on of the following:
146 echo (depending on which compiler and/or make utility you are using).
148 echo The GCC argument is for use with djgpp and the NDMAKE utility.
150 echo The MSC argument is for use with Microsoft C and the NMAKE utility
151 echo that ships with it (MSC 7.0 or greater only, including Visual C).
153 echo The BC argument is for use with Borland C and Borland's MAKE utility
154 echo that ships with it (Borland C++ 3.1 only).
160 echo Your directories are not set up properly, please re-read the
161 echo Install.dos and README documentation.
166 echo Please continue with next step from Install.dos.