Subversion Repositories nw_plus

Rev

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