Subversion Repositories nw_plus

Rev

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

Rev 16 Rev 18
Line 1... Line 1...
1
@echo off
1
@echo off
2
@color 0C
2
@color 0C
3
3
4
:restart
4
:restart
5
title Duke: Nuclear Winter Plus Batch Launcher
5
title Duke: Nuclear Winter Plus Launcher
-
 
6
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
6
7
7
set dir=%cd%
8
set dir=%cd%
8
set eduke32dir=%~dp0
9
set exedir=%~dp0
9
set nwdir=%~dp0
10
set addondir=%~dp0
10
set nwhrpdir=%~dp0
11
set addonhrpdir=%~dp0
-
 
12
11
set nwver=30
13
set exename=eduke32
12
set hrp=
14
set exeproper=EDuke32
-
 
15
set action=playing
-
 
16
-
 
17
if "%editor%"=="1" (
-
 
18
set exename=mapster32
-
 
19
set exeproper=Mapster32
-
 
20
set action=editing
-
 
21
)
-
 
22
13
set hrpu=
23
set addonver=r001
14
24
15
:title
25
:title
16
echo                   ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
26
echo                          ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
17
echo                   º Duke: Nuclear Winter Plus Batch Launcher º
27
echo                          º Duke: Nuclear Winter Plus º
18
echo                   ÈÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍͼ
28
echo                          ÈÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍͼ
19
echo                                ³ By Hendricks266 ³
29
echo                               ³ By Hendricks266 ³
20
echo                                ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
30
echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
21
echo.
31
echo.
22
echo You are playing Simply Silly Software's Duke: Nuclear Winter with the various
32
echo You are %action% Simply Silly Software's Duke: Nuclear Winter with the various
23
echo enhancements of Duke: Nuclear Winter Plus, maintained by Hendricks266.
33
echo enhancements of Duke: Nuclear Winter Plus, maintained by Hendricks266.
24
echo.
34
echo.
25
35
-
 
36
-
 
37
if "%xxx%"=="1" echo Using XXX mode.
-
 
38
if "%dp%"=="1" echo Using Duke Plus by DeeperThought.
-
 
39
if "%debug%"=="1" echo Using debug mode.
-
 
40
26
:recheck
41
:recheck
27
if not exist eduke32.exe goto eduke32check
42
if not exist %exename%.exe goto execheck
28
:eduke32check_done
43
:execheck_done
29
set eduke32dir=%cd%
44
set exedir=%cd%
30
if "%debug%"=="1" echo DEBUG: EDuke32 Directory: "%eduke32dir%"
45
if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%"
31
46
32
if not exist nw_plus\ goto nodir
47
if not exist nw_plus\ goto nodir
33
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
48
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
34
49
35
if exist nwinter\ set nwhrpdir=%cd%
50
if exist nwinter\ set addonhrpdir=%cd%
36
:nwdircheck
51
:addondircheck
-
 
52
37
cd nw_plus
53
cd nw_plus
38
set nwdir=%cd%
54
set addondir=%cd%
39
if exist nwinter\ set nwhrpdir=%cd%
55
if exist nwinter\ set addonhrpdir=%cd%
40
if exist nw_plus\ goto nwdircheck
56
if exist nw_plus\ goto addondircheck
41
if "%debug%"=="1" echo DEBUG: NW+ Directory: "%nwdir%".
57
if "%debug%"=="1" echo DEBUG: NW+ Directory: "%addondir%".
42
if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%nwhrpdir%".
58
if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%addonhrpdir%".
43
59
44
if not exist "%nwdir%\NWINTER.GRP" (
60
if not exist "%addondir%\NWINTER.GRP" (
45
if exist "%eduke32dir%\NWINTER.GRP" (
61
if exist "%exedir%\NWINTER.GRP" (
46
move /y "%eduke32dir%\NWINTER.GRP" "%nwdir%\"
62
move /y "%exedir%\NWINTER.GRP" "%addondir%\"
47
ren "%nwdir%\NWINTER.GRP" nwinter.grp
63
ren "%addondir%\NWINTER.GRP" nwinter.grp
48
) else (
64
) else (
49
goto nonwgrp
65
goto nonwgrp
50
)
-
 
51
)
66
) )
52
67
53
:nonwgrp_done
68
:nonwgrp_done
54
if not exist nwflag%nwver%.h266 goto extract
69
if not exist nwflag_%addonver%.h266 goto extract
55
if not exist nwl1.map goto extract
70
if not exist nwl1.map goto extract
56
if not exist nwl2.map goto extract
71
if not exist nwl2.map goto extract
57
if not exist nwl3.map goto extract
72
if not exist nwl3.map goto extract
58
if not exist nwl4.map goto extract
73
if not exist nwl4.map goto extract
59
if not exist nwl5.map goto extract
74
if not exist nwl5.map goto extract
60
if not exist nwl6.map goto extract
75
if not exist nwl6.map goto extract
61
if not exist nwl7.map goto extract
76
if not exist nwl7.map goto extract
62
if not exist nwl8.map goto extract
77
if not exist nwl8.map goto extract
-
 
78
-
 
79
-
 
80
-
 
81
63
cd "%eduke32dir%"
82
cd "%exedir%"
64
echo.
83
echo.
65
echo To switch your character, open the console (~) and type one of the following:
84
echo To switch your character, open the console (~) and type one of the following:
66
echo Duke: "setvar skin 0".
85
echo Duke: "setvar skin 0".
67
echo Santa: "setvar skin 1".
86
echo Santa: "setvar skin 1".
68
echo.
87
echo.
-
 
88
echo.
69
89
70
:init
90
:init
71
pause
91
pause
72
echo.
92
echo.
73
goto check
93
goto check
74
94
75
:check
95
:check
76
96
77
if exist duke3d_hrp.zip set hrp=-gduke3d_hrp.zip
-
 
78
if exist hrp_update.zip set hrpu=-ghrp_update.zip
-
 
79
-
 
80
echo.
97
echo.
81
echo Launching Duke Nukem 3D . . .
98
echo Launching Duke Nukem 3D . . .
82
echo Thanks for playing!
99
echo Thanks for %action%^!
83
echo.
-
 
84
echo Please do not close this window.
-
 
85
echo It will close automatically.
-
 
86

-
 
87
::if exist *.art ren *.art *.abk
-
 
88
100
-
 
101
:arguments
-
 
102
set args=
89
set args=-xNWEDuke.con -hnwinter.def
103
if exist polymer_hrp\ set args=%args% -jpolymer_hrp
-
 
104
if exist duke3d_voxel.zip set args=%args% -gduke3d_voxel.zip
-
 
105
if exist duke3d_hrp.zip set args=%args% -gduke3d_hrp.zip
-
 
106
if exist hrp_update.zip set args=%args% -ghrp_update.zip
-
 
107
if exist maphacks.zip set args=%args% -gmaphacks.zip
-
 
108
if exist eduke32_mus.zip set args=%args% -geduke32_mus.zip
90
if exist "%nwdir%" set args=%args% -j"%nwdir:\=/%"
109
if exist "%addondir%" set args=%args% -j"%addondir:\=/%"
91
if exist "%nwhrpdir%" set args=%args% -j"%nwhrpdir:\=/%"
110
if exist "%addonhrpdir%" set args=%args% -j"%addonhrpdir:\=/%"
92
set args=%args% -gnwinter.grp %hrp% %hrpu% %*
111
set args=%args% -gnwinter.grp -hnwinter.def
-
 
112
if "%editor%"=="1" set args=%args% -namesfile NWNames.h
-
 
113
if not "%editor%"=="1" set args=%args% -xNWEDuke.con
-
 
114
if "%dp%"=="1" (
-
 
115
set args=%args% -hnw_dp.def
-
 
116
if not "%editor%"=="1" set args=%args% -xNWDP.con
-
 
117
)
-
 
118
if "%xxx%"=="1" (
-
 
119
if exist xxx_lite.zip set args=%args% -gxxx_lite.zip
-
 
120
if exist xxx_pack.zip set args=%args% -gxxx_pack.zip
-
 
121
set args=%args% -hnw_xxx.def
-
 
122
if "%dp%"=="1" (
-
 
123
set args=%args% -hnw_dp_xxx.def
-
 
124
if not "%editor%"=="1" set args=%args% -xNWDPXXX.con
-
 
125
) )
-
 
126
set args=%args% %*
-
 
127
if "%dp%"=="1" set args=%args% -jDukePlus
93
128
94
set exe=eduke32
129
set exe=%exename%
95
if "%debug%"=="1" set exe=eduke32.debug
130
if "%debug%"=="1" set exe=%exename%.debug
96
131
97
if exist %exe%.bat (
132
if exist %exe%.bat (
98
call %exe%.bat %args%
133
call %exe%.bat %args%
99
) else (
134
) else (
100
start %exe%.exe %args%
135
start %exe%.exe %args%
101
)
136
)
102

137
103
::if exist *.abk ren *.abk *.art
-
 
104
-
 
105
goto end
138
goto end
106
139
107
:nonwgrp
140
:nonwgrp
108
echo.
141
echo.
109
echo Error: You don't have NWINTER.GRP in your directory.
142
echo Error: You don't have NWINTER.GRP in your directory.
Line 133... Line 166...
133
echo '%cddrive%' is not the correct disc.  Please try again.
166
echo '%cddrive%' is not the correct disc.  Please try again.
134
goto retry
167
goto retry
135
168
136
:extract
169
:extract
137
echo.
170
echo.
138
echo                   ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
171
echo                                ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
139
echo                   º Duke: Nuclear Winter Plus Installation º
-
 
140
echo                   ÈÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍͼ
-
 
141
echo                               ³ By Hendricks266 ³
172
echo                                º Installation º
142
echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
173
echo                                ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
143
echo.
174
echo.
144
if not exist nwl1.ips goto noips
175
if not exist nwl1.ips goto noips
145
if not exist nwl2.ips goto noips
176
if not exist nwl2.ips goto noips
146
if not exist nwl3.ips goto noips
177
if not exist nwl3.ips goto noips
147
if not exist nwl4.ips goto noips
178
if not exist nwl4.ips goto noips
Line 149... Line 180...
149
if not exist nwl6.ips goto noips
180
if not exist nwl6.ips goto noips
150
if not exist nwl7.ips goto noips
181
if not exist nwl7.ips goto noips
151
if not exist nwl8.ips goto noips
182
if not exist nwl8.ips goto noips
152
md nw_preserve
183
md nw_preserve
153
if exist nwl*.map move /y nwl*.map nw_preserve\
184
if exist nwl*.map move /y nwl*.map nw_preserve\
154
if exist "%eduke32dir%\nwl*.map" move /y "%eduke32dir%\nwl*.map" nw_preserve\
185
if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\
155
utils\windows\win32\kextract.exe NWINTER.GRP E2L*.MAP
186
utils\windows\win32\kextract.exe NWINTER.GRP E2L*.MAP
156
ren E2L1.MAP nwl1.map
187
ren E2L1.MAP nwl1.map
157
ren E2L2.MAP nwl2.map
188
ren E2L2.MAP nwl2.map
158
ren E2L3.MAP nwl3.map
189
ren E2L3.MAP nwl3.map
159
ren E2L4.MAP nwl4.map
190
ren E2L4.MAP nwl4.map
Line 176... Line 207...
176
utils\windows\win32\uips.exe a nwl6.ips nwl6.map
207
utils\windows\win32\uips.exe a nwl6.ips nwl6.map
177
utils\windows\win32\uips.exe a nwl7.ips nwl7.map
208
utils\windows\win32\uips.exe a nwl7.ips nwl7.map
178
utils\windows\win32\uips.exe a nwl8.ips nwl8.map
209
utils\windows\win32\uips.exe a nwl8.ips nwl8.map
179
if exist nwpatch*.h266 del /f /q nwpatch*.h266
210
if exist nwpatch*.h266 del /f /q nwpatch*.h266
180
if exist nwflag*.h266 del /f /q nwflag*.h266
211
if exist nwflag*.h266 del /f /q nwflag*.h266
181
echo Do not delete this file! You will be forced to reinstall NW+ and repatch the maps. >nwflag%nwver%.h266
212
echo Do not delete this file^! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266
182
attrib +r nwflag%nwver%.h266
213
attrib +r nwflag_%addonver%.h266
183
echo.
214
echo.
184
echo Patching complete!
215
echo Patching complete^!
185
:scanning
216
:scanning
186
cd "%eduke32dir%"
217
cd "%exedir%"
187
echo.
218
echo.
188
echo Scanning directory for potential problems.
219
echo Scanning directory for potential problems.
189
if exist nwl1.mhk goto mhkfound
220
if exist nwl1.mhk goto mhkfound
190
if exist nwl1demo.mhk goto mhkfound
221
if exist nwl1demo.mhk goto mhkfound
191
if exist nwl2.mhk goto mhkfound
222
if exist nwl2.mhk goto mhkfound
Line 232... Line 263...
232
263
233
:mhkfound
264
:mhkfound
234
echo.
265
echo.
235
echo Problematic .mhk files have been found in your directory.
266
echo Problematic .mhk files have been found in your directory.
236
echo Unless you have knowingly made a modification to NW's map hacks,
267
echo Unless you have knowingly made a modification to NW's map hacks,
237
echo the presence of these files in your EDuke32 directory will
268
echo the presence of these files in your %exeproper% directory will
238
echo cause NW+ to function incorrectly.
269
echo cause NW+ to function incorrectly.
239
echo.
270
echo.
240
echo nwl1.mhk
271
echo nwl1.mhk
241
echo nwl1demo.mhk
272
echo nwl1demo.mhk
242
echo nwl2.mhk
273
echo nwl2.mhk
Line 251... Line 282...
251
282
252
:artfound
283
:artfound
253
echo.
284
echo.
254
echo Problematic .art files have been found in your directory.
285
echo Problematic .art files have been found in your directory.
255
echo Unless you have knowingly made a modification to NW's art,
286
echo Unless you have knowingly made a modification to NW's art,
256
echo the presence of these files in your EDuke32 directory will
287
echo the presence of these files in your %exeproper% directory will
257
echo cause NW+ to function incorrectly.
288
echo cause NW+ to function incorrectly.
258
echo.
289
echo.
259
echo TILES005.ART
290
echo TILES005.ART
260
echo TILES006.ART
291
echo TILES006.ART
261
echo TILES007.ART
292
echo TILES007.ART
Line 269... Line 300...
269
300
270
:confound
301
:confound
271
echo.
302
echo.
272
echo Problematic .con files have been found in your directory.
303
echo Problematic .con files have been found in your directory.
273
echo Unless you have knowingly made a modification to NW's programming,
304
echo Unless you have knowingly made a modification to NW's programming,
274
echo the presence of these files in your EDuke32 directory will
305
echo the presence of these files in your %exeproper% directory will
275
echo cause NW+ to function incorrectly.
306
echo cause NW+ to function incorrectly.
276
echo.
307
echo.
277
echo NWinter.con
308
echo NWinter.con
278
echo NWEDuke.con
309
echo NWEDuke.con
279
echo NWDefs.con
310
echo NWDefs.con
Line 283... Line 314...
283
echo NWDPXXX.con
314
echo NWDPXXX.con
284
echo NWActor.con
315
echo NWActor.con
285
echo NWSnow.con
316
echo NWSnow.con
286
echo.
317
echo.
287
echo IF THESE ARE THE ORIGINAL NUCLEAR WINTER CON FILES, OR THEY COME FROM
318
echo IF THESE ARE THE ORIGINAL NUCLEAR WINTER CON FILES, OR THEY COME FROM
288
echo AN OUTDATED VERSION OF NW+, REMOVE THEM FROM YOUR EDUKE32 DIRECTORY
319
echo AN OUTDATED VERSION OF NW+, REMOVE THEM FROM YOUR %exeproper% DIRECTORY
289
echo IMMEDIATELY!
320
echo IMMEDIATELY^!
290
echo NW+ uses modified .con files to fix programming errors created by
321
echo NW+ uses modified .con files to fix programming errors created by
291
echo the original programmers. Due to improvements made to the levels,
322
echo the original programmers. Due to improvements made to the levels,
292
echo NW+ will have major errors if the included .con files are not used.
323
echo NW+ will have major errors if the included .con files are not used.
293
goto confound_done
324
goto confound_done
294
325
295
:eduke32check
326
:execheck
296
if exist eduke32.bat goto eduke32check_done
327
if exist %exename%.bat goto execheck_done
297
if exist ..\eduke32.exe (
328
if exist ..\%exename%.exe (
298
cd ..
329
cd ..
299
goto recheck
330
goto recheck
300
)
331
)
301
if exist ..\..\eduke32.exe (
332
if exist ..\..\%exename%.exe (
302
cd ..\..
333
cd ..\..
303
goto recheck
334
goto recheck
304
)
335
)
305
if exist ..\..\..\eduke32.exe (
336
if exist ..\..\..\%exename%.exe (
306
cd ..\..\..
337
cd ..\..\..
307
goto recheck
338
goto recheck
308
)
339
)
309
if exist ..\eduke32.bat (
340
if exist ..\%exename%.bat (
310
cd ..
341
cd ..
311
goto eduke32check_done
342
goto execheck_done
312
)
343
)
313
if exist ..\..\eduke32.bat (
344
if exist ..\..\%exename%.bat (
314
cd ..\..
345
cd ..\..
315
goto eduke32check_done
346
goto execheck_done
316
)
347
)
317
if exist ..\..\..\eduke32.bat (
348
if exist ..\..\..\%exename%.bat (
318
cd ..\..\..
349
cd ..\..\..
319
goto eduke32check_done
350
goto execheck_done
320
)
351
)
321
echo Warning: You don't have EDuke32 in your directory.
352
echo Warning: You don't have %exeproper% in your directory.
322
goto eduke32check_done
353
goto execheck_done
323
354
324
:nodir
355
:nodir
325
echo.
356
echo.
326
echo Error: "nw_plus" data directory not found.
357
echo Error: "nw_plus" data directory not found.
327
echo Aborting launch.
358
echo Aborting launch.
Line 329... Line 360...
329
pause
360
pause
330
goto end
361
goto end
331
362
332
:end
363
:end
333
echo.
364
echo.
-
 
365
set editor=0
-
 
366
set xxx=0
334
@color 07
367
set dp=0
335
@title %ComSpec%
368
set debug=0
336
cd %dir%
369
cd %dir%
-
 
370
@title %ComSpec%
-
 
371
@color 07