Subversion Repositories nw_plus

Rev

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

Rev 42 Rev 43
Line 1... Line 1...
1
@echo off
1
@echo off
2
@color 0C
2
@color 0C
3
pushd .
3
pushd .
4
cd /d "%~dp0"
4
chdir /d "%~dp0"
5
5
6
:restart
6
:restart
7
title Duke: Nuclear Winter Plus Launcher
7
title Duke: Nuclear Winter Plus Launcher
8
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
8
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
9
9
Line 49... Line 49...
49
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
49
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
50
50
51
if exist nwinter\ set addonhrpdir=%cd%
51
if exist nwinter\ set addonhrpdir=%cd%
52
:addondircheck
52
:addondircheck
53
53
54
cd nw_plus
54
chdir nw_plus
55
set addondir=%cd%
55
set addondir=%cd%
56
if exist nwinter\ set addonhrpdir=%cd%
56
if exist nwinter\ set addonhrpdir=%cd%
57
if exist nw_plus\ goto addondircheck
57
if exist nw_plus\ goto addondircheck
58
if "%debug%"=="1" echo DEBUG: NW+ Directory: "%addondir%".
58
if "%debug%"=="1" echo DEBUG: NW+ Directory: "%addondir%".
59
if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%addonhrpdir%".
59
if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%addonhrpdir%".
Line 64... Line 64...
64
ren "%addondir%\NWINTER.GRP" nwinter.grp
64
ren "%addondir%\NWINTER.GRP" nwinter.grp
65
) else (
65
) else (
66
goto nonwgrp
66
goto nonwgrp
67
) )
67
) )
68
68
-
 
69
if exist nwinter.grp ren nwinter.grp nwinter.grp
69
call :grpchecksum
70
call :grpchecksum
70
:nonwgrp_return
71
:nonwgrp_return
71
if not "%version%"=="demo" (
72
if not "%version%"=="demo" (
72
if not exist nwl1.map goto mapextract
73
if not exist nwl1.map goto mapextract
73
if not exist nwl2.map goto mapextract
74
if not exist nwl2.map goto mapextract
Line 81... Line 82...
81
)
82
)
82
83
83
84
84
85
85
86
86
cd "%exedir%"
87
chdir /d "%exedir%"
87
echo.
88
echo.
88
echo To switch your character, open the console (~) and type one of the following:
89
echo To switch your character, open the console (~) and type one of the following:
89
echo Duke: "setvar skin 0".
90
echo Duke: "setvar skin 0".
90
echo Santa: "setvar skin 1".
91
echo Santa: "setvar skin 1".
91
echo.
92
echo.
Line 154... Line 155...
154
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
155
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
155
if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
156
if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
156
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
157
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
157
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
158
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
158
159
159
cd /d "%addondir%"
160
chdir /d "%addondir%"
160
if not "%svnpath%"=="0" if exist ".svn" svn update
161
if not "%svnpath%"=="0" if exist ".svn" svn update
161
cd /d "%addonhrpdir%"
162
chdir /d "%addonhrpdir%"
162
if not "%svnpath%"=="0" if exist ".svn" svn update
163
if not "%svnpath%"=="0" if exist ".svn" svn update
163
164
164
goto end
165
goto end
165
166
166
:nonwgrp
167
:nonwgrp
Line 178... Line 179...
178
if not exist %cddrive%:\ goto cdno
179
if not exist %cddrive%:\ goto cdno
179
if not exist %cddrive%:\* goto cdno
180
if not exist %cddrive%:\* goto cdno
180
if not exist %cddrive%:\GAMEDATA\NWINTER.GRP goto cdw
181
if not exist %cddrive%:\GAMEDATA\NWINTER.GRP goto cdw
181
copy %cddrive%:GAMEDATA\NWINTER.GRP .\nwinter.grp
182
copy %cddrive%:GAMEDATA\NWINTER.GRP .\nwinter.grp
182
echo.
183
echo.
-
 
184
if exist nwinter.grp (
183
type NWINTRO.TXT
185
type NWINTRO.TXT
184
echo.
186
echo.
185
pause
187
pause
186
call :grpchecksum
188
call :grpchecksum
187
call :grpchecksum_results
189
call :grpchecksum_results
188
goto nonwgrp_return
190
goto nonwgrp_return
-
 
191
)
-
 
192
if not exist nwinter.grp (
-
 
193
echo Installation Error!
-
 
194
echo Contact Hendricks266 for help.
-
 
195
echo.
-
 
196
pause
-
 
197
goto end
-
 
198
)
189
199
190
:grpchecksum
200
:grpchecksum
191
if not exist "%addondir%\utils\windows\win32\sha1sum.exe" (
201
if not exist "%addondir%\utils\windows\win32\sha1sum.exe" (
192
echo "%addondir%\utils\windows\win32\sha1sum.exe" not found.
202
echo "%addondir%\utils\windows\win32\sha1sum.exe" not found.
193
goto :eof
203
goto :eof
Line 236... Line 246...
236
if not exist nwl4.patch goto nopatch
246
if not exist nwl4.patch goto nopatch
237
if not exist nwl5.patch goto nopatch
247
if not exist nwl5.patch goto nopatch
238
if not exist nwl6.patch goto nopatch
248
if not exist nwl6.patch goto nopatch
239
if not exist nwl7.patch goto nopatch
249
if not exist nwl7.patch goto nopatch
240
if not exist nwl8.patch goto nopatch
250
if not exist nwl8.patch goto nopatch
241
md nw_preserve
251
mkdir nw_preserve
242
if exist nwl*.map move /y nwl*.map nw_preserve\
252
if exist nwl*.map move /y nwl*.map nw_preserve\
243
if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\
253
if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\
244
"%addondir%\utils\windows\win32\kextract.exe" NWINTER.GRP E2L*.MAP
254
"%addondir%\utils\windows\win32\kextract.exe" nwinter.grp E2L*.MAP
245
ren E2L1.MAP nwl1.map
255
ren E2L1.MAP nwl1.map
246
ren E2L2.MAP nwl2.map
256
ren E2L2.MAP nwl2.map
247
ren E2L3.MAP nwl3.map
257
ren E2L3.MAP nwl3.map
248
ren E2L4.MAP nwl4.map
258
ren E2L4.MAP nwl4.map
249
ren E2L5.MAP nwl5.map
259
ren E2L5.MAP nwl5.map
Line 270... Line 280...
270
echo Do not delete this file^! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266
280
echo Do not delete this file^! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266
271
attrib +r nwflag_%addonver%.h266
281
attrib +r nwflag_%addonver%.h266
272
echo.
282
echo.
273
echo Patching complete^!
283
echo Patching complete^!
274
:scanning
284
:scanning
275
cd "%exedir%"
285
chdir "%exedir%"
276
echo.
286
echo.
277
echo Scanning directory for potential problems.
287
echo Scanning directory for potential problems.
278
if exist nwl1.mhk goto mhkfound
288
if exist nwl1.mhk goto mhkfound
279
if exist nwl1demo.mhk goto mhkfound
289
if exist nwl1demo.mhk goto mhkfound
280
if exist nwl2.mhk goto mhkfound
290
if exist nwl2.mhk goto mhkfound
Line 309... Line 319...
309
if exist NWDPXXX.con goto confound
319
if exist NWDPXXX.con goto confound
310
if exist NWEDuke.con goto confound
320
if exist NWEDuke.con goto confound
311
if exist NWSnow.con goto confound
321
if exist NWSnow.con goto confound
312
if exist NWUser.con goto confound
322
if exist NWUser.con goto confound
313
:confound_done
323
:confound_done
314
cd /d "%exedir%"
324
chdir /d "%exedir%"
315
if not exist GAME.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP GAME.CON
325
if not exist GAME.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP GAME.CON
316
if not exist DEFS.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP DEFS.CON
326
if not exist DEFS.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP DEFS.CON
317
if not exist USER.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP USER.CON
327
if not exist USER.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP USER.CON
318
cd /d "%addondir%"
328
chdir /d "%addondir%"
319
echo.
329
echo.
320
pause
330
pause
321
goto restart
331
goto restart
322
332
323
:checksum
333
:checksum
Line 404... Line 414...
404
echo NW+ will have major errors if the included .con files are not used.
414
echo NW+ will have major errors if the included .con files are not used.
405
goto confound_done
415
goto confound_done
406
416
407
:execheck
417
:execheck
408
if exist %exename%.bat goto execheck_done
418
if exist %exename%.bat goto execheck_done
409
if exist ..\%exename%.exe (
419
if exist %exename%.exe goto recheck
410
cd ..
-
 
411
goto recheck
-
 
412
)
-
 
413
if exist ..\..\%exename%.exe (
-
 
414
cd ..\..
-
 
415
goto recheck
420
set prevdir=%cd%
416
)
-
 
417
if exist ..\..\..\%exename%.exe (
421
if not "%cd%"=="%cd:~0,3%" cd ..
418
cd ..\..\..
-
 
419
goto recheck
-
 
420
)
-
 
421
if exist ..\%exename%.bat (
-
 
422
cd ..
-
 
423
goto execheck_done
-
 
424
)
-
 
425
if exist ..\..\%exename%.bat (
-
 
426
cd ..\..
-
 
427
goto execheck_done
-
 
428
)
-
 
429
if exist ..\..\..\%exename%.bat (
422
if not "%cd%"=="%prevdir%" goto execheck
430
cd ..\..\..
-
 
431
goto execheck_done
-
 
432
)
-
 
433
echo Warning: You don't have %exeproper% in your directory.
423
echo Warning: You don't have %exeproper% in your directory.
-
 
424
chdir /d "%~dp0"
434
goto execheck_done
425
goto execheck_done
435
426
436
:nodir
427
:nodir
437
echo.
428
echo.
438
echo Error: "nw_plus" data directory not found.
429
echo Error: "nw_plus" data directory not found.