Subversion Repositories nw_plus

Rev

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