Subversion Repositories nw_plus

Rev

Rev 29 | Rev 35 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29 Rev 30
Line 3... Line 3...
3
3
4
:restart
4
:restart
5
title Duke: Nuclear Winter Plus Launcher
5
title Duke: Nuclear Winter Plus Launcher
6
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
6
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
7
7
8
set dir=%cd%
8
pushd .
9
set exedir=%~dp0
9
set exedir=%~dp0
10
set addondir=%~dp0
10
set addondir=%~dp0
11
set addonhrpdir=%~dp0
11
set addonhrpdir=%~dp0
12
12
13
set exename=eduke32
13
set exename=eduke32
Line 63... Line 63...
63
ren "%addondir%\NWINTER.GRP" nwinter.grp
63
ren "%addondir%\NWINTER.GRP" nwinter.grp
64
) else (
64
) else (
65
goto nonwgrp
65
goto nonwgrp
66
) )
66
) )
67
67
-
 
68
call :grpchecksum
68
:nonwgrp_return
69
:nonwgrp_return
-
 
70
if not "%version%"=="demo" (
69
if not exist nwl1.map goto mapextract
71
if not exist nwl1.map goto mapextract
70
if not exist nwl2.map goto mapextract
72
if not exist nwl2.map goto mapextract
71
if not exist nwl3.map goto mapextract
73
if not exist nwl3.map goto mapextract
72
if not exist nwl4.map goto mapextract
74
if not exist nwl4.map goto mapextract
73
if not exist nwl5.map goto mapextract
75
if not exist nwl5.map goto mapextract
74
if not exist nwl6.map goto mapextract
76
if not exist nwl6.map goto mapextract
75
if not exist nwl7.map goto mapextract
77
if not exist nwl7.map goto mapextract
76
if not exist nwl8.map goto mapextract
78
if not exist nwl8.map goto mapextract
77
if not exist nwflag_%addonver%.h266 goto updateextract
79
if not exist nwflag_%addonver%.h266 goto updateextract
-
 
80
)
78
81
79
82
80
83
81
84
82
cd "%exedir%"
85
cd "%exedir%"
Line 84... Line 87...
84
echo To switch your character, open the console (~) and type one of the following:
87
echo To switch your character, open the console (~) and type one of the following:
85
echo Duke: "setvar skin 0".
88
echo Duke: "setvar skin 0".
86
echo Santa: "setvar skin 1".
89
echo Santa: "setvar skin 1".
87
echo.
90
echo.
88
echo.
91
echo.
-
 
92
echo.
-
 
93
echo.
-
 
94
echo.
-
 
95
echo.
89
96
90
:init
97
:init
91
pause
98
pause
92
echo.
99
echo.
93
goto check
100
goto check
Line 95... Line 102...
95
:check
102
:check
96
103
97
echo.
104
echo.
98
echo Launching Duke Nukem 3D . . .
105
echo Launching Duke Nukem 3D . . .
99
echo Thanks for %action%^!
106
echo Thanks for %action%^!
-
 
107
echo.
100
108
101
if "%editor%"=="1" (
109
if "%editor%"=="1" (
102
type "%exedir%\names.h" > "%exedir%\NWNames.h"
110
type "%exedir%\names.h" > "%exedir%\NWNames.h"
103
echo. >> "%exedir%\NWNames.h"
111
echo. >> "%exedir%\NWNames.h"
104
type "%addondir%\NWNames.def" >> "%exedir%\NWNames.h"
112
type "%addondir%\NWNames.def" >> "%exedir%\NWNames.h"
Line 155... Line 163...
155
copy %cddrive%:GAMEDATA\NWINTER.GRP .\nwinter.grp
163
copy %cddrive%:GAMEDATA\NWINTER.GRP .\nwinter.grp
156
echo.
164
echo.
157
type NWINTRO.TXT
165
type NWINTRO.TXT
158
echo.
166
echo.
159
pause
167
pause
-
 
168
call :grpchecksum
-
 
169
call :grpchecksum_results
-
 
170
goto nonwgrp_return
160
171
-
 
172
:grpchecksum
161
echo a6728f621f121f9db02ee67c39efdbb5eea95711 *nwinter.grp | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
173
echo a6728f621f121f9db02ee67c39efdbb5eea95711 *nwinter.grp | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
162
if "%ERRORLEVEL%"=="0" echo NWINTER.GRP checksum verified.
174
if "%ERRORLEVEL%"=="0" set version=full
163
if "%ERRORLEVEL%"=="1" echo NWINTER.GRP checksum does not match. You may have a bad copy.
175
if "%ERRORLEVEL%"=="1" echo 1b33b2cbb7101b5b18b15855392f55575413ecc3 *nwinter.grp | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
-
 
176
if "%ERRORLEVEL%"=="0" set version=demo
-
 
177
if "%ERRORLEVEL%"=="1" set version=unknown
164
goto nonwgrp_return
178
goto :eof
165
179
-
 
180
:grpchecksum_results
-
 
181
if "%version%"="full" echo NWINTER.GRP checksum verified.
-
 
182
if "%version%"="demo" echo NWINTER.GRP (demo version) checksum verified.
-
 
183
if "%version%"="unknown" echo NWINTER.GRP checksum does not match. You may have a bad copy.
-
 
184
echo.
-
 
185
goto :eof
166
186
167
:cdno
187
:cdno
168
echo '%cddrive%' is not valid.  Please try again.
188
echo '%cddrive%' is not valid.  Please try again.
169
goto retry
189
goto retry
170
190
171
:cdw
191
:cdw
172
echo '%cddrive%' is not the correct disc.  Please try again.
192
echo '%cddrive%' is not the correct disc.  Please try again.
173
goto retry
193
goto retry
174
194
175
:mapextract
195
:mapextract
176
echo Extracted maps not found. Proceeding to installation.
196
echo Extracted maps not found or patched. Proceeding to installation.
177
goto extract
197
goto extract
178
198
179
:updateextract
199
:updateextract
180
echo Map patch update required. Proceeding to installation.
200
echo Map patch update required. Proceeding to installation.
181
goto extract
201
goto extract
Line 184... Line 204...
184
echo.
204
echo.
185
echo                                ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
205
echo                                ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
186
echo                                º Installation º
206
echo                                º Installation º
187
echo                                ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
207
echo                                ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
188
echo.
208
echo.
-
 
209
call :grpchecksum
-
 
210
call :grpchecksum_results
189
if not exist nwl1.patch goto nopatch
211
if not exist nwl1.patch goto nopatch
190
if not exist nwl2.patch goto nopatch
212
if not exist nwl2.patch goto nopatch
191
if not exist nwl3.patch goto nopatch
213
if not exist nwl3.patch goto nopatch
192
if not exist nwl4.patch goto nopatch
214
if not exist nwl4.patch goto nopatch
193
if not exist nwl5.patch goto nopatch
215
if not exist nwl5.patch goto nopatch
Line 278... Line 300...
278
300
279
:checksum
301
:checksum
280
if not exist "%~2" goto :eof
302
if not exist "%~2" goto :eof
281
echo %~1 *%~2 | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
303
echo %~1 *%~2 | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
282
if "%ERRORLEVEL%"=="0" (
304
if "%ERRORLEVEL%"=="0" (
283
ren "%~2" "NWOld_%~nx2"
305
ren "%~2" "NWOld_%addonver%_%~nx2"
284
echo %~3 %~nx2
306
echo %~3 %~nx2
285
)
307
)
286
goto :eof
308
goto :eof
287
309
288
:nopatch
310
:nopatch
Line 393... Line 415...
393
pause
415
pause
394
goto end
416
goto end
395
417
396
:end
418
:end
397
echo.
419
echo.
-
 
420
set version=
398
set editor=0
421
set editor=
399
set xxx=0
422
set xxx=
400
set dp=0
423
set dp=
401
set debug=0
424
set debug=
402
cd %dir%
425
popd
403
@title %ComSpec%
426
@title %ComSpec%
404
@color 07
427
@color 07