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