Subversion Repositories nw_plus

Rev

Rev 16 | Rev 19 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 h266 1
@echo off
2
@color 0C
3
 
4
:restart
18 h266 5
title Duke: Nuclear Winter Plus Launcher
6
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
1 h266 7
 
8
set dir=%cd%
18 h266 9
set exedir=%~dp0
10
set addondir=%~dp0
11
set addonhrpdir=%~dp0
1 h266 12
 
18 h266 13
set exename=eduke32
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
 
23
set addonver=r001
24
 
1 h266 25
:title
18 h266 26
echo                          浜様様様様様様様様様様様様様
27
echo                           Duke: Nuclear Winter Plus 
28
echo                          藩様用様様様様様様様様用様様
29
echo                                By Hendricks266 
30
echo                               青陳陳陳陳陳陳陳陳
1 h266 31
echo.
18 h266 32
echo You are %action% Simply Silly Software's Duke: Nuclear Winter with the various
1 h266 33
echo enhancements of Duke: Nuclear Winter Plus, maintained by Hendricks266.
34
echo.
13 h266 35
 
18 h266 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
 
1 h266 41
:recheck
18 h266 42
if not exist %exename%.exe goto execheck
43
:execheck_done
44
set exedir=%cd%
45
if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%"
13 h266 46
 
1 h266 47
if not exist nw_plus\ goto nodir
7 h266 48
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
13 h266 49
 
18 h266 50
if exist nwinter\ set addonhrpdir=%cd%
51
:addondircheck
52
 
13 h266 53
cd nw_plus
18 h266 54
set addondir=%cd%
55
if exist nwinter\ set addonhrpdir=%cd%
56
if exist nw_plus\ goto addondircheck
57
if "%debug%"=="1" echo DEBUG: NW+ Directory: "%addondir%".
58
if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%addonhrpdir%".
13 h266 59
 
18 h266 60
if not exist "%addondir%\NWINTER.GRP" (
61
if exist "%exedir%\NWINTER.GRP" (
62
move /y "%exedir%\NWINTER.GRP" "%addondir%\"
63
ren "%addondir%\NWINTER.GRP" nwinter.grp
13 h266 64
) else (
65
goto nonwgrp
18 h266 66
) )
13 h266 67
 
1 h266 68
:nonwgrp_done
18 h266 69
if not exist nwflag_%addonver%.h266 goto extract
1 h266 70
if not exist nwl1.map goto extract
71
if not exist nwl2.map goto extract
72
if not exist nwl3.map goto extract
73
if not exist nwl4.map goto extract
74
if not exist nwl5.map goto extract
75
if not exist nwl6.map goto extract
76
if not exist nwl7.map goto extract
77
if not exist nwl8.map goto extract
18 h266 78
 
79
 
80
 
81
 
82
cd "%exedir%"
1 h266 83
echo.
84
echo To switch your character, open the console (~) and type one of the following:
85
echo Duke: "setvar skin 0".
86
echo Santa: "setvar skin 1".
87
echo.
18 h266 88
echo.
1 h266 89
 
90
:init
91
pause
92
echo.
93
goto check
94
 
95
:check
96
 
97
echo.
98
echo Launching Duke Nukem 3D . . .
18 h266 99
echo Thanks for %action%^!
1 h266 100
 
18 h266 101
:arguments
102
set args=
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
109
if exist "%addondir%" set args=%args% -j"%addondir:\=/%"
110
if exist "%addonhrpdir%" set args=%args% -j"%addonhrpdir:\=/%"
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
1 h266 128
 
18 h266 129
set exe=%exename%
130
if "%debug%"=="1" set exe=%exename%.debug
16 h266 131
 
13 h266 132
if exist %exe%.bat (
133
call %exe%.bat %args%
134
) else (
135
start %exe%.exe %args%
136
)
137
 
1 h266 138
goto end
139
 
140
:nonwgrp
141
echo.
142
echo Error: You don't have NWINTER.GRP in your directory.
143
:retry
144
echo.
145
set cddrive=
146
set /p cddrive=What is the drive letter that your Nuclear Winter CD is in?
147
echo.
148
if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
149
if '%cddrive%'=='' goto cdno
150
if not exist %cddrive%:\ goto cdno
151
if not exist %cddrive%:\* goto cdno
152
if not exist %cddrive%:\GAMEDATA\NWINTER.GRP goto cdw
153
copy %cddrive%:GAMEDATA\NWINTER.GRP .\
154
pause
155
echo.
156
type NWINTRO.TXT
157
echo.
158
pause
159
goto nonwgrp_done
160
 
161
:cdno
162
echo '%cddrive%' is not valid.  Please try again.
163
goto retry
164
 
165
:cdw
166
echo '%cddrive%' is not the correct disc.  Please try again.
167
goto retry
168
 
169
:extract
170
echo.
18 h266 171
echo                                浜様様様様様様融
172
echo                                 Installation 
173
echo                                藩様様様様様様夕
1 h266 174
echo.
175
if not exist nwl1.ips goto noips
176
if not exist nwl2.ips goto noips
177
if not exist nwl3.ips goto noips
178
if not exist nwl4.ips goto noips
179
if not exist nwl5.ips goto noips
180
if not exist nwl6.ips goto noips
181
if not exist nwl7.ips goto noips
182
if not exist nwl8.ips goto noips
6 h266 183
md nw_preserve
184
if exist nwl*.map move /y nwl*.map nw_preserve\
18 h266 185
if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\
1 h266 186
utils\windows\win32\kextract.exe NWINTER.GRP E2L*.MAP
187
ren E2L1.MAP nwl1.map
188
ren E2L2.MAP nwl2.map
189
ren E2L3.MAP nwl3.map
190
ren E2L4.MAP nwl4.map
191
ren E2L5.MAP nwl5.map
192
ren E2L6.MAP nwl6.map
193
ren E2L7.MAP nwl7.map
194
ren E2L8.MAP nwl8.map
195
if exist nwpatch*.h266 del /f /q nwpatch*.h266
196
if exist nwflag*.h266 del /f /q nwflag*.h266
197
echo.
198
echo Map patching will now begin.
199
echo.
200
pause
201
echo
202
utils\windows\win32\uips.exe a nwl1.ips nwl1.map
203
utils\windows\win32\uips.exe a nwl2.ips nwl2.map
204
utils\windows\win32\uips.exe a nwl3.ips nwl3.map
205
utils\windows\win32\uips.exe a nwl4.ips nwl4.map
206
utils\windows\win32\uips.exe a nwl5.ips nwl5.map
207
utils\windows\win32\uips.exe a nwl6.ips nwl6.map
208
utils\windows\win32\uips.exe a nwl7.ips nwl7.map
209
utils\windows\win32\uips.exe a nwl8.ips nwl8.map
210
if exist nwpatch*.h266 del /f /q nwpatch*.h266
211
if exist nwflag*.h266 del /f /q nwflag*.h266
18 h266 212
echo Do not delete this file^! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266
213
attrib +r nwflag_%addonver%.h266
1 h266 214
echo.
18 h266 215
echo Patching complete^!
1 h266 216
:scanning
18 h266 217
cd "%exedir%"
1 h266 218
echo.
219
echo Scanning directory for potential problems.
220
if exist nwl1.mhk goto mhkfound
221
if exist nwl1demo.mhk goto mhkfound
222
if exist nwl2.mhk goto mhkfound
223
if exist nwl3.mhk goto mhkfound
224
if exist nwl4.mhk goto mhkfound
225
if exist nwl5.mhk goto mhkfound
226
if exist nwl6.mhk goto mhkfound
227
if exist nwl7.mhk goto mhkfound
228
if exist nwl8.mhk goto mhkfound
229
if exist _nwzoo.mhk goto mhkfound
230
:mhkfound_done
231
if exist TILES005.ART goto artfound
232
if exist TILES006.ART goto artfound
233
if exist TILES007.ART goto artfound
234
if exist TILES008.ART goto artfound
235
if exist TILES009.ART goto artfound
236
if exist TILES012.ART goto artfound
237
if exist TILES013.ART goto artfound
238
if exist TILES014.ART goto artfound
239
if exist TILES015.ART goto artfound
240
:artfound_done
241
if exist NWinter.con goto confound
242
if exist NWActor.con goto confound
243
if exist NWDefs.con goto confound
244
if exist NWDP.con goto confound
245
if exist NWDPCode.con goto confound
246
if exist NWDPXXX.con goto confound
247
if exist NWEDuke.con goto confound
248
if exist NWSnow.con goto confound
249
if exist NWUser.con goto confound
250
:confound_done
251
echo.
252
pause
253
goto restart
254
 
255
:noips
256
echo.
257
echo Error: You don't have all the *.ips files in your directory.
258
echo Aborting installation.
259
echo Map patching is required for NW+ to function correctly.
260
echo.
261
pause
262
goto end
263
 
264
:mhkfound
265
echo.
266
echo Problematic .mhk files have been found in your directory.
267
echo Unless you have knowingly made a modification to NW's map hacks,
18 h266 268
echo the presence of these files in your %exeproper% directory will
1 h266 269
echo cause NW+ to function incorrectly.
270
echo.
271
echo nwl1.mhk
272
echo nwl1demo.mhk
273
echo nwl2.mhk
274
echo nwl3.mhk
275
echo nwl4.mhk
276
echo nwl5.mhk
277
echo nwl6.mhk
278
echo nwl7.mhk
279
echo nwl8.mhk
280
echo _nwzoo.mhk
281
goto mhkfound_done
282
 
283
:artfound
284
echo.
285
echo Problematic .art files have been found in your directory.
286
echo Unless you have knowingly made a modification to NW's art,
18 h266 287
echo the presence of these files in your %exeproper% directory will
1 h266 288
echo cause NW+ to function incorrectly.
289
echo.
290
echo TILES005.ART
291
echo TILES006.ART
292
echo TILES007.ART
293
echo TILES008.ART
294
echo TILES009.ART
295
echo TILES012.ART
296
echo TILES013.ART
297
echo TILES014.ART
298
echo TILES015.ART
299
goto artfound_done
300
 
301
:confound
302
echo.
303
echo Problematic .con files have been found in your directory.
304
echo Unless you have knowingly made a modification to NW's programming,
18 h266 305
echo the presence of these files in your %exeproper% directory will
1 h266 306
echo cause NW+ to function incorrectly.
307
echo.
308
echo NWinter.con
309
echo NWEDuke.con
310
echo NWDefs.con
311
echo NWUser.con
312
echo NWDP.con
313
echo NWDPCode.con
314
echo NWDPXXX.con
315
echo NWActor.con
316
echo NWSnow.con
317
echo.
318
echo IF THESE ARE THE ORIGINAL NUCLEAR WINTER CON FILES, OR THEY COME FROM
18 h266 319
echo AN OUTDATED VERSION OF NW+, REMOVE THEM FROM YOUR %exeproper% DIRECTORY
320
echo IMMEDIATELY^!
1 h266 321
echo NW+ uses modified .con files to fix programming errors created by
322
echo the original programmers. Due to improvements made to the levels,
323
echo NW+ will have major errors if the included .con files are not used.
324
goto confound_done
325
 
18 h266 326
:execheck
327
if exist %exename%.bat goto execheck_done
328
if exist ..\%exename%.exe (
1 h266 329
cd ..
330
goto recheck
331
)
18 h266 332
if exist ..\..\%exename%.exe (
1 h266 333
cd ..\..
334
goto recheck
335
)
18 h266 336
if exist ..\..\..\%exename%.exe (
1 h266 337
cd ..\..\..
338
goto recheck
339
)
18 h266 340
if exist ..\%exename%.bat (
1 h266 341
cd ..
18 h266 342
goto execheck_done
1 h266 343
)
18 h266 344
if exist ..\..\%exename%.bat (
1 h266 345
cd ..\..
18 h266 346
goto execheck_done
1 h266 347
)
18 h266 348
if exist ..\..\..\%exename%.bat (
1 h266 349
cd ..\..\..
18 h266 350
goto execheck_done
1 h266 351
)
18 h266 352
echo Warning: You don't have %exeproper% in your directory.
353
goto execheck_done
1 h266 354
 
355
:nodir
356
echo.
357
echo Error: "nw_plus" data directory not found.
358
echo Aborting launch.
359
echo.
360
pause
361
goto end
362
 
363
:end
364
echo.
18 h266 365
set editor=0
366
set xxx=0
367
set dp=0
368
set debug=0
369
cd %dir%
370
@title %ComSpec%
1 h266 371
@color 07