Subversion Repositories dc_hrp

Rev

Rev 34 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34 Rev 51
1
@echo off
1
@echo off
2
color 0C
2
color 0C
3
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
3
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
4
pushd "%~dp0"
4
pushd "%~dp0"
5
set startdir=%cd%
5
set startdir=%cd%
6
 
6
 
7
:restart
7
:restart
8
title Duke It Out In D.C. Launcher
8
title Duke It Out In D.C. Launcher
9
if "%editor%"=="1" title Duke It Out In D.C. Editor Launcher
9
if "%editor%"=="1" title Duke It Out In D.C. Editor Launcher
10
 
10
 
11
set exedir=%startdir%
11
set exedir=%startdir%
12
 
12
 
13
set exename=eduke32
13
set exename=eduke32
14
set exeproper=EDuke32
14
set exeproper=EDuke32
15
set action=playing
15
set action=playing
16
 
16
 
17
if "%editor%"=="1" (
17
if "%editor%"=="1" (
18
set exename=mapster32
18
set exename=mapster32
19
set exeproper=Mapster32
19
set exeproper=Mapster32
20
set action=editing
20
set action=editing
21
)
21
)
22
 
22
 
23
:title
23
:title
24
echo                             ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
24
echo                             ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
25
echo                             º Duke It Out In D.C. º
25
echo                             º Duke It Out In D.C. º
26
echo                             ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
26
echo                             ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
27
echo.
27
echo.
28
echo.
28
echo.
29
echo.
29
echo.
30
echo You are %action% Sunstorm Interactive's Duke It Out In D.C.
30
echo You are %action% Sunstorm Interactive's Duke It Out In D.C.
31
echo.
31
echo.
32
 
32
 
33
if "%xxx%"=="1" echo Using XXX mode.
33
if "%xxx%"=="1" echo Using XXX mode.
34
if "%dp%"=="1" echo Using Duke Plus by DeeperThought.
34
if "%dp%"=="1" echo Using Duke Plus by DeeperThought.
35
if "%debug%"=="1" echo Using debug mode.
35
if "%debug%"=="1" echo Using debug mode.
36
 
36
 
37
if "%debug%"=="1" echo DEBUG: Command Line Input: %*
37
if "%debug%"=="1" echo DEBUG: Command Line Input: %*
38
 
38
 
39
:recheck
39
:recheck
40
if not exist %exename%.exe goto execheck
40
if not exist %exename%.exe goto execheck
41
:execheck_done
41
:execheck_done
42
set exedir=%cd%
42
set exedir=%cd%
43
if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%"
43
if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%"
44
 
44
 
45
:: if not exist dc_hrp\ goto nodir
45
:: if not exist dc_hrp\ goto nodir
46
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
46
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
47
 
47
 
48
set sha1sum=%startdir%\utils\windows\win32\sha1sum.exe
48
set sha1sum=%startdir%\utils\windows\win32\sha1sum.exe
49
set kextract=%startdir%\utils\windows\win32\kextract.exe
49
set kextract=%startdir%\utils\windows\win32\kextract.exe
50
if "%debug%"=="1" set kextract=%startdir%\utils\windows\win32\kextract.debug.exe
50
if "%debug%"=="1" set kextract=%startdir%\utils\windows\win32\kextract.debug.exe
51
 
51
 
52
if exist dukedc.grp ren dukedc.grp dukedc.grp
52
if exist dukedc.grp ren dukedc.grp dukedc.grp
53
if "%dcgrpname%"=="" set dcgrpname=dukedc.grp
53
if "%dcgrpname%"=="" set dcgrpname=dukedc.grp
54
if exist "%dcgrpname%" goto dcgrp_found
54
if exist "%dcgrpname%" goto dcgrp_found
55
if not exist dukedc.grp if exist DUKEDCPP.GRP ren DUKEDCPP.GRP dukedc.grp
55
if not exist dukedc.grp if exist DUKEDCPP.GRP ren DUKEDCPP.GRP dukedc.grp
56
if not exist dukedc.grp if exist DUKEDC13.GRP ren DUKEDC13.GRP dukedc.grp
56
if not exist dukedc.grp if exist DUKEDC13.GRP ren DUKEDC13.GRP dukedc.grp
57
if not exist dukedc.grp if exist DC.GRP ren DC.GRP dukedc.grp
57
if not exist dukedc.grp if exist DC.GRP ren DC.GRP dukedc.grp
58
if not exist dukedc.grp goto nodcgrp
58
if not exist dukedc.grp goto nodcgrp
59
 
59
 
60
:dcgrp_found
60
:dcgrp_found
61
call :grpchecksum
61
call :grpchecksum
62
 
62
 
63
:nodcgrp_return
63
:nodcgrp_return
64
chdir /d "%exedir%"
64
chdir /d "%exedir%"
65
echo.
65
echo.
66
echo.
66
echo.
67
echo.
67
echo.
68
echo.
68
echo.
69
echo.
69
echo.
70
echo.
70
echo.
71
echo.
71
echo.
72
echo.
72
echo.
73
echo.
73
echo.
74
echo.
74
echo.
75
echo.
75
echo.
76
 
76
 
77
 
77
 
78
:init
78
:init
79
pause
79
pause
80
echo.
80
echo.
81
goto check
81
goto check
82
 
82
 
83
:check
83
:check
84
 
84
 
85
echo.
85
echo.
86
echo Launching Duke Nukem 3D . . .
86
echo Launching Duke Nukem 3D . . .
87
echo Thanks for %action%!
87
echo Thanks for %action%!
88
echo.
88
echo.
89
 
89
 
90
if exist duke3d.def ren duke3d.def duke3d_dcbak.def
90
if exist duke3d.def ren duke3d.def duke3d_dcbak.def
91
 
91
 
92
if exist duke3d_dcbak.def echo duke3d.def has been renamed to duke3d_dcbak.def to allow the add-on to operate.
92
if exist duke3d_dcbak.def echo duke3d.def has been renamed to duke3d_dcbak.def to allow the add-on to operate.
93
 
93
 
94
:arguments
94
:arguments
95
set args=
95
set args=
96
if exist "%exedir%\HRP\" set args=%args% -jHRP
96
if exist "%exedir%\HRP\" set args=%args% -j HRP
97
if exist "%exedir%\polymer_hrp\" set args=%args% -jpolymer_hrp
97
if exist "%exedir%\polymer_hrp\" set args=%args% -j polymer_hrp
98
if exist "%exedir%\duke3d_voxel.zip" set args=%args% -gduke3d_voxel.zip
98
if exist "%exedir%\duke3d_voxel.zip" set args=%args% -g duke3d_voxel.zip
99
if exist "%exedir%\duke3d_hrp.zip" set args=%args% -gduke3d_hrp.zip
99
if exist "%exedir%\duke3d_hrp.zip" set args=%args% -g duke3d_hrp.zip
100
if exist "%exedir%\hrp_update.zip" set args=%args% -ghrp_update.zip
100
if exist "%exedir%\hrp_update.zip" set args=%args% -g hrp_update.zip
101
if exist "%exedir%\maphacks.zip" set args=%args% -gmaphacks.zip
101
if exist "%exedir%\maphacks.zip" set args=%args% -g maphacks.zip
102
if exist "%exedir%\eduke32_mus.zip" set args=%args% -geduke32_mus.zip
102
if exist "%exedir%\eduke32_mus.zip" set args=%args% -g eduke32_mus.zip
103
set args=%args% -gdukedc.grp -mx dc_user.con
103
set args=%args% -g dukedc.grp -mx dc_user.con
104
if exist "%exedir%\dc.def" set args=%args% -hdc.def
104
if exist "%exedir%\dc.def" set args=%args% -h dc.def
105
if exist "%exedir%\dukedc.def" set args=%args% -hdukedc.def
105
if exist "%exedir%\dukedc.def" set args=%args% -h dukedc.def
106
if exist "%exedir%\dukedc_hrp.zip" set args=%args% -gdukedc_hrp.zip
106
if exist "%exedir%\dukedc_hrp.zip" set args=%args% -g dukedc_hrp.zip
107
if exist "%exedir%\dc_hrp\" set args=%args% -jdc_hrp
107
if exist "%exedir%\dc_hrp\" set args=%args% -j dc_hrp
108
if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -gxxx_lite.zip
108
if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -g xxx_lite.zip
109
if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -jxxx_lite
109
if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -j xxx_lite
110
if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -gxxx_pack.zip
110
if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -g xxx_pack.zip
111
if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -jxxx_pack
111
if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -j xxx_pack
112
set args=%args% %*
112
set args=%args% %*
113
if "%dp%"=="1" set args=%args% -jDukePlus
113
if "%dp%"=="1" set args=%args% -j DukePlus
114
 
114
 
115
set exe=%exename%
115
set exe=%exename%
116
if "%debug%"=="1" set exe=%exename%.debug
116
if "%debug%"=="1" set exe=%exename%.debug
117
 
117
 
118
if exist %exe%.bat (
118
if exist %exe%.bat (
119
if "%debug%"=="1" echo DEBUG: Final Command Line: call %exe%.bat %args%
119
if "%debug%"=="1" echo DEBUG: Final Command Line: call %exe%.bat %args%
120
call %exe%.bat %args%
120
call %exe%.bat %args%
121
) else (
121
) else (
122
if "%debug%"=="1" echo DEBUG: Final Command Line: start %exe%.exe %args%
122
if "%debug%"=="1" echo DEBUG: Final Command Line: start %exe%.exe %args%
123
start %exe%.exe %args%
123
start %exe%.exe %args%
124
)
124
)
125
 
125
 
126
set svnpath=0
126
set svnpath=0
127
if "%svnpath%"=="0" if exist "%startdir%\svn\bin\svn.exe" set svnpath=%startdir%\svn\bin
127
if "%svnpath%"=="0" if exist "%startdir%\svn\bin\svn.exe" set svnpath=%startdir%\svn\bin
128
if "%svnpath%"=="0" if exist "%exedir%\svn\bin\svn.exe" set svnpath=%exedir%\svn\bin
128
if "%svnpath%"=="0" if exist "%exedir%\svn\bin\svn.exe" set svnpath=%exedir%\svn\bin
129
if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin
129
if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin
130
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin
130
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin
131
if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin
131
if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin
132
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
132
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
133
if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
133
if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
134
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
134
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
135
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
135
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
136
 
136
 
137
if exist "%exedir%\dc_hrp\" (
137
if exist "%exedir%\dc_hrp\" (
138
chdir /d "%exedir%\dc_hrp\"
138
chdir /d "%exedir%\dc_hrp\"
139
if not "%svnpath%"=="0" call :svn_action
139
if not "%svnpath%"=="0" call :svn_action
140
)
140
)
141
 
141
 
142
goto end
142
goto end
143
 
143
 
144
:svn_action
144
:svn_action
145
set PATH=%PATH%;%svnpath%
145
set PATH=%PATH%;%svnpath%
146
for /f "delims=" %%a in ('svnversion.exe .') do @set oldrev=%%a
146
for /f "delims=" %%a in ('svnversion.exe .') do @set oldrev=%%a
147
if "%oldrev%"=="exported" goto :eof
147
if "%oldrev%"=="exported" goto :eof
148
if "%oldrev%"=="Unversioned directory" goto :eof
148
if "%oldrev%"=="Unversioned directory" goto :eof
149
"svn.exe" update
149
"svn.exe" update
150
for /f "delims=" %%a in ('svnversion.exe .') do @set rev=%%a
150
for /f "delims=" %%a in ('svnversion.exe .') do @set rev=%%a
151
set oldrev=%oldrev:M=%
151
set oldrev=%oldrev:M=%
152
set oldrev=%oldrev:S=%
152
set oldrev=%oldrev:S=%
153
set oldrev=%oldrev:P=%
153
set oldrev=%oldrev:P=%
154
set rev=%rev:M=%
154
set rev=%rev:M=%
155
set rev=%rev:S=%
155
set rev=%rev:S=%
156
set rev=%rev:P=%
156
set rev=%rev:P=%
157
if %rev% EQU %oldrev% goto :eof
157
if %rev% EQU %oldrev% goto :eof
158
set /a oldrev=%oldrev% + 1
158
set /a oldrev=%oldrev% + 1
159
echo.
159
echo.
160
"svn.exe" log -r %oldrev%:%rev%
160
"svn.exe" log -r %oldrev%:%rev%
161
echo.
161
echo.
162
pause
162
pause
163
goto :eof
163
goto :eof
164
 
164
 
165
:nodcgrp
165
:nodcgrp
166
set megaton=Steam\SteamApps\common\Duke Nukem 3D\gameroot\addons\dukedc.grp
166
set megaton=Steam\SteamApps\common\Duke Nukem 3D\gameroot\addons\dukedc.grp
167
if exist "%ProgramFiles%\%megaton%" copy "%ProgramFiles%\%megaton%" .\ && call :conprotect && goto nodcgrp_done
167
if exist "%ProgramFiles%\%megaton%" copy "%ProgramFiles%\%megaton%" .\ && call :conprotect && goto nodcgrp_done
168
if exist "%ProgramFiles(x86)%\%megaton%" copy "%ProgramFiles(x86)%\%megaton%" .\ && call :conprotect && goto nodcgrp_done
168
if exist "%ProgramFiles(x86)%\%megaton%" copy "%ProgramFiles(x86)%\%megaton%" .\ && call :conprotect && goto nodcgrp_done
169
title Duke It Out In D.C. for EDuke32 Installer
169
title Duke It Out In D.C. for EDuke32 Installer
170
color 0C
170
color 0C
171
 
171
 
172
echo.
172
echo.
173
echo                   ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
173
echo                   ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
174
echo                   º Duke It Out In D.C. for EDuke32 Installer º
174
echo                   º Duke It Out In D.C. for EDuke32 Installer º
175
echo                   ÈÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍͼ
175
echo                   ÈÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍͼ
176
echo                                ³ By Hendricks266 ³
176
echo                                ³ By Hendricks266 ³
177
echo                                ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
177
echo                                ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
178
echo.
178
echo.
179
echo This batch file extracts the contents of DUKEDCPP.SSI or DUKEDC13.SSI and makes
179
echo This batch file extracts the contents of DUKEDCPP.SSI or DUKEDC13.SSI and makes
180
echo it into a group file, DUKEDC.GRP.
180
echo it into a group file, DUKEDC.GRP.
181
echo.
181
echo.
182
 
182
 
183
set kgroup=%startdir%\utils\windows\win32\kgroup.exe
183
set kgroup=%startdir%\utils\windows\win32\kgroup.exe
184
if "%debug%"=="1" set kgroup=%startdir%\utils\windows\win32\kgroup.debug.exe
184
if "%debug%"=="1" set kgroup=%startdir%\utils\windows\win32\kgroup.debug.exe
185
set unpackssi=%startdir%\utils\windows\win32\unpackssi.exe
185
set unpackssi=%startdir%\utils\windows\win32\unpackssi.exe
186
if "%debug%"=="1" set unpackssi=%startdir%\utils\windows\win32\unpackssi.debug.exe
186
if "%debug%"=="1" set unpackssi=%startdir%\utils\windows\win32\unpackssi.debug.exe
187
 
187
 
188
pause
188
pause
189
:nodcgrp_top
189
:nodcgrp_top
190
echo.
190
echo.
191
if not exist DUKEDCPP.SSI goto check13
191
if not exist DUKEDCPP.SSI goto check13
192
echo Proceeding with DUKEDCPP.SSI extraction.
192
echo Proceeding with DUKEDCPP.SSI extraction.
193
mkdir dukedcpp
193
mkdir dukedcpp
194
chdir dukedcpp
194
chdir dukedcpp
195
"%unpackssi%" ..\DUKEDCPP.SSI
195
"%unpackssi%" ..\DUKEDCPP.SSI
196
if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM
196
if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM
197
if exist USER.CON ren USER.CON USER.BAK
197
if exist USER.CON ren USER.CON USER.BAK
198
"%kgroup%" dukedc.grp *.*
198
"%kgroup%" dukedc.grp *.*
199
if exist dukedc.grp move dukedc.grp ..\dukedc.grp
199
if exist dukedc.grp move dukedc.grp ..\dukedc.grp
200
echo DUKEDC.GRP has been added to your directory.
200
echo DUKEDC.GRP has been added to your directory.
201
if not exist ..\DUKEDC*.MAP move *.MAP ..\
201
if not exist ..\DUKEDC*.MAP move *.MAP ..\
202
chdir ..
202
chdir ..
203
rmdir /s /q dukedcpp
203
rmdir /s /q dukedcpp
204
echo.
204
echo.
205
echo.
205
echo.
206
if not exist DUKEDC13.SSI goto nodcgrp_done
206
if not exist DUKEDC13.SSI goto nodcgrp_done
207
 
207
 
208
:check13
208
:check13
209
if not exist DUKEDC13.SSI goto error
209
if not exist DUKEDC13.SSI goto error
210
echo Proceeding with DUKEDC13.SSI extraction.
210
echo Proceeding with DUKEDC13.SSI extraction.
211
mkdir dukedc13
211
mkdir dukedc13
212
chdir dukedc13
212
chdir dukedc13
213
"%unpackssi%" ..\DUKEDC13.SSI
213
"%unpackssi%" ..\DUKEDC13.SSI
214
if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM
214
if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM
215
if exist USER.CON ren USER.CON USER.BAK
215
if exist USER.CON ren USER.CON USER.BAK
216
"%kgroup%" dukedc.grp *.*
216
"%kgroup%" dukedc.grp *.*
217
if exist ..\dukedc.grp (
217
if exist ..\dukedc.grp (
218
if exist dukedc.grp (
218
if exist dukedc.grp (
219
move dukedc.grp ..\dukedc13.grp
219
move dukedc.grp ..\dukedc13.grp
220
echo DUKEDC13.GRP has been added to your directory.
220
echo DUKEDC13.GRP has been added to your directory.
221
) ) else (
221
) ) else (
222
if exist dukedc.grp (
222
if exist dukedc.grp (
223
move dukedc.grp ..\dukedc.grp
223
move dukedc.grp ..\dukedc.grp
224
echo DUKEDC.GRP has been added to your directory.
224
echo DUKEDC.GRP has been added to your directory.
225
) )
225
) )
226
if not exist ..\DUKEDC*.MAP move *.MAP ..\
226
if not exist ..\DUKEDC*.MAP move *.MAP ..\
227
chdir ..
227
chdir ..
228
rmdir /s /q dukedc13
228
rmdir /s /q dukedc13
229
echo.
229
echo.
230
echo.
230
echo.
231
goto nodcgrp_done
231
goto nodcgrp_done
232
 
232
 
233
:nodcgrp_done
233
:nodcgrp_done
234
if exist dukedc.grp (
234
if exist dukedc.grp (
235
type DCINTRO.TXT
235
type DCINTRO.TXT
236
echo.
236
echo.
237
echo.
237
echo.
238
echo.
238
echo.
239
echo Duke It Out In D.C. installed!
239
echo Duke It Out In D.C. installed!
240
echo.
240
echo.
241
pause
241
pause
242
call :grpchecksum
242
call :grpchecksum
243
call :grpchecksum_results
243
call :grpchecksum_results
244
goto nodcgrp_return
244
goto nodcgrp_return
245
)
245
)
246
if not exist dukedc.grp (
246
if not exist dukedc.grp (
247
echo Installation Error!
247
echo Installation Error!
248
echo Contact Hendricks266 for help.
248
echo Contact Hendricks266 for help.
249
echo.
249
echo.
250
pause
250
pause
251
goto end
251
goto end
252
)
252
)
253
 
253
 
254
:conprotect
254
:conprotect
255
pushd "%exedir%"
255
pushd "%exedir%"
256
if not exist GAME.CON "%kextract%" DUKE3D.GRP GAME.CON
256
if not exist GAME.CON "%kextract%" DUKE3D.GRP GAME.CON
257
if not exist DEFS.CON "%kextract%" DUKE3D.GRP DEFS.CON
257
if not exist DEFS.CON "%kextract%" DUKE3D.GRP DEFS.CON
258
if not exist USER.CON "%kextract%" DUKE3D.GRP USER.CON
258
if not exist USER.CON "%kextract%" DUKE3D.GRP USER.CON
259
popd
259
popd
260
goto :eof
260
goto :eof
261
 
261
 
262
:grpchecksum
262
:grpchecksum
263
if not exist "%sha1sum%" (
263
if not exist "%sha1sum%" (
264
echo "%sha1sum%" not found.
264
echo "%sha1sum%" not found.
265
goto :eof
265
goto :eof
266
)
266
)
267
pushd .
267
pushd .
268
if exist "%startdir%\%dcgrpname%" chdir /d %startdir%
268
if exist "%startdir%\%dcgrpname%" chdir /d %startdir%
269
if exist "%exedir%\%dcgrpname%" chdir /d %exedir%
269
if exist "%exedir%\%dcgrpname%" chdir /d %exedir%
270
echo 1b66c3ad9a65556044946dd1ca97a839fcfedc3b *%dcgrpname% | "%sha1sum%" --status --check -
270
echo 1b66c3ad9a65556044946dd1ca97a839fcfedc3b *%dcgrpname% | "%sha1sum%" --status --check -
271
if "%ERRORLEVEL%"=="0" set version=megaton && call :conprotect && popd && goto :eof
271
if "%ERRORLEVEL%"=="0" set version=megaton && call :conprotect && popd && goto :eof
272
if "%ERRORLEVEL%"=="1" set version=unknown
272
if "%ERRORLEVEL%"=="1" set version=unknown
273
popd
273
popd
274
goto :eof
274
goto :eof
275
 
275
 
276
:grpchecksum_results
276
:grpchecksum_results
277
if "%version%"=="megaton" echo DUKEDC.GRP (Megaton Edition) checksum verified.
277
if "%version%"=="megaton" echo DUKEDC.GRP (Megaton Edition) checksum verified.
278
:: if "%version%"=="unknown" echo DUKEDC.GRP checksum does not match any known copies because one was never distributed until the Megaton Edition.
278
:: if "%version%"=="unknown" echo DUKEDC.GRP checksum does not match any known copies because one was never distributed until the Megaton Edition.
279
echo.
279
echo.
280
goto :eof
280
goto :eof
281
 
281
 
282
:error
282
:error
283
echo.
283
echo.
284
echo You do not have DUKEDCPP.SSI or DUKEDC13.SSI in this directory.
284
echo You do not have DUKEDCPP.SSI or DUKEDC13.SSI in this directory.
285
:retry
285
:retry
286
echo.
286
echo.
287
set cddrive=
287
set cddrive=
288
set /p cddrive=What is the drive letter that your Duke D.C. CD is in?
288
set /p cddrive=What is the drive letter that your Duke D.C. CD is in?
289
echo.
289
echo.
290
if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
290
if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
291
if '%cddrive%'=='' goto cdno
291
if '%cddrive%'=='' goto cdno
292
if not exist %cddrive%:\ goto cdno
292
if not exist %cddrive%:\ goto cdno
293
if not exist %cddrive%:\* goto cdno
293
if not exist %cddrive%:\* goto cdno
294
if exist %cddrive%:\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\*.SSI .\ && goto nodcgrp_top
294
if exist %cddrive%:\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\*.SSI .\ && goto nodcgrp_top
295
if exist %cddrive%:\DUKEDC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\DUKEDC\*.SSI .\ && goto nodcgrp_top
295
if exist %cddrive%:\DUKEDC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\DUKEDC\*.SSI .\ && goto nodcgrp_top
296
if exist %cddrive%:\DC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DC\DUKEDC\*.SSI .\ && goto nodcgrp_top
296
if exist %cddrive%:\DC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DC\DUKEDC\*.SSI .\ && goto nodcgrp_top
297
goto cdwrong
297
goto cdwrong
298
 
298
 
299
:cdno
299
:cdno
300
echo '%cddrive%' is not valid.  Please try again.
300
echo '%cddrive%' is not valid.  Please try again.
301
goto retry
301
goto retry
302
 
302
 
303
:cdwrong
303
:cdwrong
304
echo '%cddrive%' is not the correct disc.  Please try again.
304
echo '%cddrive%' is not the correct disc.  Please try again.
305
goto retry
305
goto retry
306
 
306
 
307
:execheck
307
:execheck
308
if exist %exename%.bat goto execheck_done
308
if exist %exename%.bat goto execheck_done
309
if exist %exename%.exe goto recheck
309
if exist %exename%.exe goto recheck
310
set prevdir=%cd%
310
set prevdir=%cd%
311
if not "%cd%"=="%cd:~0,3%" chdir ..
311
if not "%cd%"=="%cd:~0,3%" chdir ..
312
if not "%cd%"=="%prevdir%" goto execheck
312
if not "%cd%"=="%prevdir%" goto execheck
313
echo Warning: You don't have %exeproper% in your directory.
313
echo Warning: You don't have %exeproper% in your directory.
314
chdir /d "%startdir%"
314
chdir /d "%startdir%"
315
goto execheck_done
315
goto execheck_done
316
 
316
 
317
:end
317
:end
318
if "%debug%"=="1" echo.
318
if "%debug%"=="1" echo.
319
if "%debug%"=="1" pause
319
if "%debug%"=="1" pause
320
echo.
320
echo.
321
popd
321
popd
322
endlocal
322
endlocal
323
title %ComSpec%
323
title %ComSpec%
324
color 07
324
color 07
325
 
325