Subversion Repositories nw_plus

Rev

Rev 20 | Rev 22 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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