Subversion Repositories nw_plus

Rev

Rev 7 | Rev 16 | 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 Batch Launcher
  6.  
  7. set dir=%cd%
  8. set nwver=30
  9. set hrp=
  10. set hrpu=
  11.  
  12. :title
  13. echo.
  14. echo                   ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  15. echo                   º Duke: Nuclear Winter Plus Batch Launcher º
  16. echo                   ÈÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍͼ
  17. echo                                ³ By Hendricks266 ³
  18. echo                                ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  19. echo.
  20. echo You are playing Simply Silly Software's Duke: Nuclear Winter with the various
  21. echo enhancements of Duke: Nuclear Winter Plus, maintained by Hendricks266.
  22. echo.
  23. :recheck
  24. if not exist eduke32.exe goto eduke32check
  25. :eduke32check_done
  26. if "%debug%"=="1" echo DEBUG: Directory: "%cd%"
  27. if exist NWDuke.rt_ del /f /q NWDuke.rt_
  28. if exist NWSanta.grp del /f /q NWSanta.grp
  29. if not exist nw_plus\ goto nodir
  30. if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
  31. if not exist nw_plus\NWINTER.GRP (
  32. if exist NWINTER.GRP move /y NWINTER.GRP nw_plus\
  33. )
  34. cd nw_plus
  35. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  36. if not exist NWINTER.GRP goto nonwgrp
  37. :nonwgrp_done
  38. if not exist nwflag%nwver%.h266 goto extract
  39. if not exist nwl1.map goto extract
  40. if not exist nwl2.map goto extract
  41. if not exist nwl3.map goto extract
  42. if not exist nwl4.map goto extract
  43. if not exist nwl5.map goto extract
  44. if not exist nwl6.map goto extract
  45. if not exist nwl7.map goto extract
  46. if not exist nwl8.map goto extract
  47. cd ..
  48. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  49. echo.
  50. echo To switch your character, open the console (~) and type one of the following:
  51. echo Duke: "setvar skin 0".
  52. echo Santa: "setvar skin 1".
  53. echo.
  54.  
  55. :init
  56. pause
  57. echo.
  58. goto check
  59.  
  60. :check
  61.  
  62. if exist duke3d_hrp.zip set hrp=/gduke3d_hrp.zip
  63. if exist hrp_update.zip set hrpu=/ghrp_update.zip
  64.  
  65. echo.
  66. echo Launching Duke Nukem 3D . . .
  67. echo Thanks for playing!
  68. echo.
  69. echo Please leave this window open for the entire duration of your game.
  70. echo It will close automatically.
  71.  
  72. ::if exist *.art ren *.art *.abk
  73.  
  74. eduke32 /xNWEDuke.con /hnwinter.def /jnw_plus /gNWINTER.GRP %hrp% %hrpu% %*
  75.  
  76. ::if exist *.abk ren *.abk *.art
  77.  
  78. goto end
  79.  
  80. :nonwgrp
  81. echo.
  82. echo Error: You don't have NWINTER.GRP in your directory.
  83. :retry
  84. echo.
  85. set cddrive=
  86. set /p cddrive=What is the drive letter that your Nuclear Winter CD is in?
  87. echo.
  88. if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
  89. if '%cddrive%'=='' goto cdno
  90. if not exist %cddrive%:\ goto cdno
  91. if not exist %cddrive%:\* goto cdno
  92. if not exist %cddrive%:\GAMEDATA\NWINTER.GRP goto cdw
  93. copy %cddrive%:GAMEDATA\NWINTER.GRP .\
  94. pause
  95. echo.
  96. type NWINTRO.TXT
  97. echo.
  98. pause
  99. goto nonwgrp_done
  100.  
  101. :cdno
  102. echo '%cddrive%' is not valid.  Please try again.
  103. goto retry
  104.  
  105. :cdw
  106. echo '%cddrive%' is not the correct disc.  Please try again.
  107. goto retry
  108.  
  109. :extract
  110. echo.
  111. echo                   ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  112. echo                   º Duke: Nuclear Winter Plus Installation º
  113. echo                   ÈÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍͼ
  114. echo                               ³ By Hendricks266 ³
  115. echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  116. echo.
  117. if not exist nwl1.ips goto noips
  118. if not exist nwl2.ips goto noips
  119. if not exist nwl3.ips goto noips
  120. if not exist nwl4.ips goto noips
  121. if not exist nwl5.ips goto noips
  122. if not exist nwl6.ips goto noips
  123. if not exist nwl7.ips goto noips
  124. if not exist nwl8.ips goto noips
  125. md nw_preserve
  126. if exist nwl*.map move /y nwl*.map nw_preserve\
  127. if exist ..\nwl*.map move /y ..\nwl*.map nw_preserve\
  128. utils\windows\win32\kextract.exe NWINTER.GRP E2L*.MAP
  129. ren E2L1.MAP nwl1.map
  130. ren E2L2.MAP nwl2.map
  131. ren E2L3.MAP nwl3.map
  132. ren E2L4.MAP nwl4.map
  133. ren E2L5.MAP nwl5.map
  134. ren E2L6.MAP nwl6.map
  135. ren E2L7.MAP nwl7.map
  136. ren E2L8.MAP nwl8.map
  137. if exist nwpatch*.h266 del /f /q nwpatch*.h266
  138. if exist nwflag*.h266 del /f /q nwflag*.h266
  139. echo.
  140. echo Map patching will now begin.
  141. echo.
  142. pause
  143. echo
  144. utils\windows\win32\uips.exe a nwl1.ips nwl1.map
  145. utils\windows\win32\uips.exe a nwl2.ips nwl2.map
  146. utils\windows\win32\uips.exe a nwl3.ips nwl3.map
  147. utils\windows\win32\uips.exe a nwl4.ips nwl4.map
  148. utils\windows\win32\uips.exe a nwl5.ips nwl5.map
  149. utils\windows\win32\uips.exe a nwl6.ips nwl6.map
  150. utils\windows\win32\uips.exe a nwl7.ips nwl7.map
  151. utils\windows\win32\uips.exe a nwl8.ips nwl8.map
  152. if exist nwpatch*.h266 del /f /q nwpatch*.h266
  153. if exist nwflag*.h266 del /f /q nwflag*.h266
  154. echo Do not delete this file! You will be force to reinstall NW+ and repatch the maps. >nwflag%nwver%.h266
  155. attrib +r nwflag%nwver%.h266
  156. echo.
  157. echo Patching complete!
  158. :scanning
  159. cd ..
  160. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  161. echo.
  162. echo Scanning directory for potential problems.
  163. if exist nwl1.mhk goto mhkfound
  164. if exist nwl1demo.mhk goto mhkfound
  165. if exist nwl2.mhk goto mhkfound
  166. if exist nwl3.mhk goto mhkfound
  167. if exist nwl4.mhk goto mhkfound
  168. if exist nwl5.mhk goto mhkfound
  169. if exist nwl6.mhk goto mhkfound
  170. if exist nwl7.mhk goto mhkfound
  171. if exist nwl8.mhk goto mhkfound
  172. if exist _nwzoo.mhk goto mhkfound
  173. :mhkfound_done
  174. if exist TILES005.ART goto artfound
  175. if exist TILES006.ART goto artfound
  176. if exist TILES007.ART goto artfound
  177. if exist TILES008.ART goto artfound
  178. if exist TILES009.ART goto artfound
  179. if exist TILES012.ART goto artfound
  180. if exist TILES013.ART goto artfound
  181. if exist TILES014.ART goto artfound
  182. if exist TILES015.ART goto artfound
  183. :artfound_done
  184. if exist NWinter.con goto confound
  185. if exist NWActor.con goto confound
  186. if exist NWDefs.con goto confound
  187. if exist NWDP.con goto confound
  188. if exist NWDPCode.con goto confound
  189. if exist NWDPXXX.con goto confound
  190. if exist NWEDuke.con goto confound
  191. if exist NWSnow.con goto confound
  192. if exist NWUser.con goto confound
  193. :confound_done
  194. echo.
  195. pause
  196. goto restart
  197.  
  198. :noips
  199. echo.
  200. echo Error: You don't have all the *.ips files in your directory.
  201. echo Aborting installation.
  202. echo Map patching is required for NW+ to function correctly.
  203. echo.
  204. pause
  205. goto end
  206.  
  207. :mhkfound
  208. echo.
  209. echo Problematic .mhk files have been found in your directory.
  210. echo Unless you have knowingly made a modification to NW's map hacks,
  211. echo the presence of these files in your EDuke32 directory will
  212. echo cause NW+ to function incorrectly.
  213. echo.
  214. echo nwl1.mhk
  215. echo nwl1demo.mhk
  216. echo nwl2.mhk
  217. echo nwl3.mhk
  218. echo nwl4.mhk
  219. echo nwl5.mhk
  220. echo nwl6.mhk
  221. echo nwl7.mhk
  222. echo nwl8.mhk
  223. echo _nwzoo.mhk
  224. goto mhkfound_done
  225.  
  226. :artfound
  227. echo.
  228. echo Problematic .art files have been found in your directory.
  229. echo Unless you have knowingly made a modification to NW's art,
  230. echo the presence of these files in your EDuke32 directory will
  231. echo cause NW+ to function incorrectly.
  232. echo.
  233. echo TILES005.ART
  234. echo TILES006.ART
  235. echo TILES007.ART
  236. echo TILES008.ART
  237. echo TILES009.ART
  238. echo TILES012.ART
  239. echo TILES013.ART
  240. echo TILES014.ART
  241. echo TILES015.ART
  242. goto artfound_done
  243.  
  244. :confound
  245. echo.
  246. echo Problematic .con files have been found in your directory.
  247. echo Unless you have knowingly made a modification to NW's programming,
  248. echo the presence of these files in your EDuke32 directory will
  249. echo cause NW+ to function incorrectly.
  250. echo.
  251. echo NWinter.con
  252. echo NWEDuke.con
  253. echo NWDefs.con
  254. echo NWUser.con
  255. echo NWDP.con
  256. echo NWDPCode.con
  257. echo NWDPXXX.con
  258. echo NWActor.con
  259. echo NWSnow.con
  260. echo.
  261. echo IF THESE ARE THE ORIGINAL NUCLEAR WINTER CON FILES, OR THEY COME FROM
  262. echo AN OUTDATED VERSION OF NW+, REMOVE THEM FROM YOUR EDUKE32 DIRECTORY
  263. echo IMMEDIATELY!
  264. echo NW+ uses modified .con files to fix programming errors created by
  265. echo the original programmers. Due to improvements made to the levels,
  266. echo NW+ will have major errors if the included .con files are not used.
  267. goto confound_done
  268.  
  269. :eduke32check
  270. if exist eduke32.bat goto eduke32check_done
  271. if exist ..\eduke32.exe (
  272. cd ..
  273. goto recheck
  274. )
  275. if exist ..\..\eduke32.exe (
  276. cd ..\..
  277. goto recheck
  278. )
  279. if exist ..\..\..\eduke32.exe (
  280. cd ..\..\..
  281. goto recheck
  282. )
  283. if exist ..\eduke32.bat (
  284. cd ..
  285. goto eduke32check_done
  286. )
  287. if exist ..\..\eduke32.bat (
  288. cd ..\..
  289. goto eduke32check_done
  290. )
  291. if exist ..\..\..\eduke32.bat (
  292. cd ..\..\..
  293. goto eduke32check_done
  294. )
  295. echo Warning: You don't have EDuke32 in your directory.
  296. goto eduke32check_done
  297.  
  298. :nodir
  299. echo.
  300. echo Error: "nw_plus" data directory not found.
  301. echo Aborting launch.
  302. echo.
  303. pause
  304. goto end
  305.  
  306. :end
  307. set hrp=
  308. set hrpu=
  309. echo.
  310. @color 07
  311. @title %ComSpec%
  312. cd %dir%
  313. @echo on
  314.