Rev 24 | Rev 27 | 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 | |||
24 | h266 | 23 | set addonver=r003 |
18 | h266 | 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 |
22 | h266 | 69 | if not exist nwl1.map goto mapextract |
70 | if not exist nwl2.map goto mapextract |
||
71 | if not exist nwl3.map goto mapextract |
||
72 | if not exist nwl4.map goto mapextract |
||
73 | if not exist nwl5.map goto mapextract |
||
74 | if not exist nwl6.map goto mapextract |
||
75 | if not exist nwl7.map goto mapextract |
||
76 | if not exist nwl8.map goto mapextract |
||
77 | if not exist nwflag_%addonver%.h266 goto updateextract |
||
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 | |
19 | h266 | 101 | if "%editor%"=="1" ( |
102 | type "%exedir%\names.h" > "%exedir%\NWNames.h" |
||
103 | echo. >> "%exedir%\NWNames.h" |
||
104 | type "%addondir%\NWNames.def" >> "%exedir%\NWNames.h" |
||
105 | ) |
||
106 | |||
18 | h266 | 107 | :arguments |
108 | set args= |
||
25 | h266 | 109 | if exist "%exedir%\polymer_hrp\" set args=%args% -jpolymer_hrp |
110 | if exist "%exedir%\duke3d_voxel.zip" set args=%args% -gduke3d_voxel.zip |
||
111 | if exist "%exedir%\duke3d_hrp.zip" set args=%args% -gduke3d_hrp.zip |
||
112 | if exist "%exedir%\hrp_update.zip" set args=%args% -ghrp_update.zip |
||
113 | if exist "%exedir%\maphacks.zip" set args=%args% -gmaphacks.zip |
||
114 | if exist "%exedir%\eduke32_mus.zip" set args=%args% -geduke32_mus.zip |
||
18 | h266 | 115 | if exist "%addondir%" set args=%args% -j"%addondir:\=/%" |
116 | if exist "%addonhrpdir%" set args=%args% -j"%addonhrpdir:\=/%" |
||
21 | h266 | 117 | set args=%args% -gnwinter.grp -hnwinter.def -xNWEDuke.con |
18 | h266 | 118 | if "%editor%"=="1" set args=%args% -namesfile NWNames.h |
25 | h266 | 119 | if "%dp%"=="1" set args=%args% -hnw_dp.def -xNWDP.con |
120 | if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -gxxx_lite.zip |
||
121 | if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -jxxx_lite |
||
122 | if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -gxxx_pack.zip |
||
123 | if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -jxxx_pack |
||
124 | if "%xxx%"=="1" set args=%args% -hnw_xxx.def |
||
125 | if "%xxx%"=="1" if "%dp%"=="1" set args=%args% -hnw_dp_xxx.def -xNWDPXXX.con |
||
18 | h266 | 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. |
||
25 | h266 | 143 | |
144 | |||
1 | h266 | 145 | :retry |
146 | echo. |
||
147 | set cddrive= |
||
148 | set /p cddrive=What is the drive letter that your Nuclear Winter CD is in? |
||
149 | echo. |
||
150 | if not '%cddrive%'=='' set cddrive=%cddrive:~0,1% |
||
151 | if '%cddrive%'=='' goto cdno |
||
152 | if not exist %cddrive%:\ goto cdno |
||
153 | if not exist %cddrive%:\* goto cdno |
||
154 | if not exist %cddrive%:\GAMEDATA\NWINTER.GRP goto cdw |
||
155 | copy %cddrive%:GAMEDATA\NWINTER.GRP .\ |
||
156 | echo. |
||
157 | type NWINTRO.TXT |
||
158 | echo. |
||
159 | pause |
||
160 | goto nonwgrp_done |
||
161 | |||
162 | :cdno |
||
163 | echo '%cddrive%' is not valid. Please try again. |
||
164 | goto retry |
||
165 | |||
166 | :cdw |
||
167 | echo '%cddrive%' is not the correct disc. Please try again. |
||
168 | goto retry |
||
169 | |||
22 | h266 | 170 | :mapextract |
171 | echo Extracted maps not found. Proceeding to installation. |
||
172 | goto extract |
||
173 | |||
174 | :updateextract |
||
175 | echo Map patch update required. Proceeding to installation. |
||
176 | goto extract |
||
177 | |||
1 | h266 | 178 | :extract |
179 | echo. |
||
18 | h266 | 180 | echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» |
181 | echo º Installation º |
||
182 | echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ |
||
1 | h266 | 183 | echo. |
24 | h266 | 184 | if not exist nwl1.patch goto nopatch |
185 | if not exist nwl2.patch goto nopatch |
||
186 | if not exist nwl3.patch goto nopatch |
||
187 | if not exist nwl4.patch goto nopatch |
||
188 | if not exist nwl5.patch goto nopatch |
||
189 | if not exist nwl6.patch goto nopatch |
||
190 | if not exist nwl7.patch goto nopatch |
||
191 | if not exist nwl8.patch goto nopatch |
||
6 | h266 | 192 | md nw_preserve |
193 | if exist nwl*.map move /y nwl*.map nw_preserve\ |
||
18 | h266 | 194 | if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\ |
1 | h266 | 195 | utils\windows\win32\kextract.exe NWINTER.GRP E2L*.MAP |
196 | ren E2L1.MAP nwl1.map |
||
197 | ren E2L2.MAP nwl2.map |
||
198 | ren E2L3.MAP nwl3.map |
||
199 | ren E2L4.MAP nwl4.map |
||
200 | ren E2L5.MAP nwl5.map |
||
201 | ren E2L6.MAP nwl6.map |
||
202 | ren E2L7.MAP nwl7.map |
||
203 | ren E2L8.MAP nwl8.map |
||
204 | if exist nwpatch*.h266 del /f /q nwpatch*.h266 |
||
205 | if exist nwflag*.h266 del /f /q nwflag*.h266 |
||
206 | echo. |
||
207 | echo Map patching will now begin. |
||
208 | echo. |
||
209 | pause |
||
210 | echo |
||
24 | h266 | 211 | utils\windows\win32\bspatch.exe nwl1.map nwl1.map nwl1.patch |
212 | utils\windows\win32\bspatch.exe nwl2.map nwl2.map nwl2.patch |
||
213 | utils\windows\win32\bspatch.exe nwl3.map nwl3.map nwl3.patch |
||
214 | utils\windows\win32\bspatch.exe nwl4.map nwl4.map nwl4.patch |
||
215 | utils\windows\win32\bspatch.exe nwl5.map nwl5.map nwl5.patch |
||
216 | utils\windows\win32\bspatch.exe nwl6.map nwl6.map nwl6.patch |
||
217 | utils\windows\win32\bspatch.exe nwl7.map nwl7.map nwl7.patch |
||
218 | utils\windows\win32\bspatch.exe nwl8.map nwl8.map nwl8.patch |
||
1 | h266 | 219 | if exist nwpatch*.h266 del /f /q nwpatch*.h266 |
220 | if exist nwflag*.h266 del /f /q nwflag*.h266 |
||
18 | h266 | 221 | echo Do not delete this file^! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266 |
222 | attrib +r nwflag_%addonver%.h266 |
||
1 | h266 | 223 | echo. |
18 | h266 | 224 | echo Patching complete^! |
1 | h266 | 225 | :scanning |
18 | h266 | 226 | cd "%exedir%" |
1 | h266 | 227 | echo. |
228 | echo Scanning directory for potential problems. |
||
229 | if exist nwl1.mhk goto mhkfound |
||
230 | if exist nwl1demo.mhk goto mhkfound |
||
231 | if exist nwl2.mhk goto mhkfound |
||
232 | if exist nwl3.mhk goto mhkfound |
||
233 | if exist nwl4.mhk goto mhkfound |
||
234 | if exist nwl5.mhk goto mhkfound |
||
235 | if exist nwl6.mhk goto mhkfound |
||
236 | if exist nwl7.mhk goto mhkfound |
||
237 | if exist nwl8.mhk goto mhkfound |
||
238 | if exist _nwzoo.mhk goto mhkfound |
||
239 | :mhkfound_done |
||
240 | if exist TILES005.ART goto artfound |
||
241 | if exist TILES006.ART goto artfound |
||
242 | if exist TILES007.ART goto artfound |
||
243 | if exist TILES008.ART goto artfound |
||
244 | if exist TILES009.ART goto artfound |
||
245 | if exist TILES012.ART goto artfound |
||
246 | if exist TILES013.ART goto artfound |
||
247 | if exist TILES014.ART goto artfound |
||
248 | if exist TILES015.ART goto artfound |
||
249 | :artfound_done |
||
250 | if exist NWinter.con goto confound |
||
251 | if exist NWActor.con goto confound |
||
252 | if exist NWDefs.con goto confound |
||
253 | if exist NWDP.con goto confound |
||
254 | if exist NWDPCode.con goto confound |
||
255 | if exist NWDPXXX.con goto confound |
||
256 | if exist NWEDuke.con goto confound |
||
257 | if exist NWSnow.con goto confound |
||
258 | if exist NWUser.con goto confound |
||
259 | :confound_done |
||
260 | echo. |
||
261 | pause |
||
262 | goto restart |
||
263 | |||
24 | h266 | 264 | :nopatch |
1 | h266 | 265 | echo. |
24 | h266 | 266 | echo Error: You don't have all the *.patch files in your directory. |
1 | h266 | 267 | echo Aborting installation. |
268 | echo Map patching is required for NW+ to function correctly. |
||
269 | echo. |
||
270 | pause |
||
271 | goto end |
||
272 | |||
273 | :mhkfound |
||
274 | echo. |
||
275 | echo Problematic .mhk files have been found in your directory. |
||
276 | echo Unless you have knowingly made a modification to NW's map hacks, |
||
18 | h266 | 277 | echo the presence of these files in your %exeproper% directory will |
1 | h266 | 278 | echo cause NW+ to function incorrectly. |
279 | echo. |
||
280 | echo nwl1.mhk |
||
281 | echo nwl1demo.mhk |
||
282 | echo nwl2.mhk |
||
283 | echo nwl3.mhk |
||
284 | echo nwl4.mhk |
||
285 | echo nwl5.mhk |
||
286 | echo nwl6.mhk |
||
287 | echo nwl7.mhk |
||
288 | echo nwl8.mhk |
||
289 | echo _nwzoo.mhk |
||
290 | goto mhkfound_done |
||
291 | |||
292 | :artfound |
||
293 | echo. |
||
294 | echo Problematic .art files have been found in your directory. |
||
295 | echo Unless you have knowingly made a modification to NW's art, |
||
18 | h266 | 296 | echo the presence of these files in your %exeproper% directory will |
1 | h266 | 297 | echo cause NW+ to function incorrectly. |
298 | echo. |
||
299 | echo TILES005.ART |
||
300 | echo TILES006.ART |
||
301 | echo TILES007.ART |
||
302 | echo TILES008.ART |
||
303 | echo TILES009.ART |
||
304 | echo TILES012.ART |
||
305 | echo TILES013.ART |
||
306 | echo TILES014.ART |
||
307 | echo TILES015.ART |
||
308 | goto artfound_done |
||
309 | |||
310 | :confound |
||
311 | echo. |
||
312 | echo Problematic .con files have been found in your directory. |
||
313 | echo Unless you have knowingly made a modification to NW's programming, |
||
18 | h266 | 314 | echo the presence of these files in your %exeproper% directory will |
1 | h266 | 315 | echo cause NW+ to function incorrectly. |
316 | echo. |
||
317 | echo NWinter.con |
||
318 | echo NWEDuke.con |
||
319 | echo NWDefs.con |
||
320 | echo NWUser.con |
||
321 | echo NWDP.con |
||
322 | echo NWDPCode.con |
||
323 | echo NWDPXXX.con |
||
324 | echo NWActor.con |
||
325 | echo NWSnow.con |
||
326 | echo. |
||
327 | echo IF THESE ARE THE ORIGINAL NUCLEAR WINTER CON FILES, OR THEY COME FROM |
||
18 | h266 | 328 | echo AN OUTDATED VERSION OF NW+, REMOVE THEM FROM YOUR %exeproper% DIRECTORY |
329 | echo IMMEDIATELY^! |
||
1 | h266 | 330 | echo NW+ uses modified .con files to fix programming errors created by |
331 | echo the original programmers. Due to improvements made to the levels, |
||
332 | echo NW+ will have major errors if the included .con files are not used. |
||
333 | goto confound_done |
||
334 | |||
18 | h266 | 335 | :execheck |
336 | if exist %exename%.bat goto execheck_done |
||
337 | if exist ..\%exename%.exe ( |
||
1 | h266 | 338 | cd .. |
339 | goto recheck |
||
340 | ) |
||
18 | h266 | 341 | if exist ..\..\%exename%.exe ( |
1 | h266 | 342 | cd ..\.. |
343 | goto recheck |
||
344 | ) |
||
18 | h266 | 345 | if exist ..\..\..\%exename%.exe ( |
1 | h266 | 346 | cd ..\..\.. |
347 | goto recheck |
||
348 | ) |
||
18 | h266 | 349 | if exist ..\%exename%.bat ( |
1 | h266 | 350 | cd .. |
18 | h266 | 351 | goto execheck_done |
1 | h266 | 352 | ) |
18 | h266 | 353 | if exist ..\..\%exename%.bat ( |
1 | h266 | 354 | cd ..\.. |
18 | h266 | 355 | goto execheck_done |
1 | h266 | 356 | ) |
18 | h266 | 357 | if exist ..\..\..\%exename%.bat ( |
1 | h266 | 358 | cd ..\..\.. |
18 | h266 | 359 | goto execheck_done |
1 | h266 | 360 | ) |
18 | h266 | 361 | echo Warning: You don't have %exeproper% in your directory. |
362 | goto execheck_done |
||
1 | h266 | 363 | |
364 | :nodir |
||
365 | echo. |
||
366 | echo Error: "nw_plus" data directory not found. |
||
367 | echo Aborting launch. |
||
368 | echo. |
||
369 | pause |
||
370 | goto end |
||
371 | |||
372 | :end |
||
373 | echo. |
||
18 | h266 | 374 | set editor=0 |
375 | set xxx=0 |
||
376 | set dp=0 |
||
377 | set debug=0 |
||
378 | cd %dir% |
||
379 | @title %ComSpec% |
||
1 | h266 | 380 | @color 07 |