Subversion Repositories nw_plus

Rev

Rev 13 | 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\ set nwhrpdir=%cd%
  36. :nwdircheck
  37. cd nw_plus
  38. set nwdir=%cd%
  39. if exist nwinter\ 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
  90. if exist "%nwdir%" set args=%args% -j"%nwdir:\=/%"
  91. if exist "%nwhrpdir%" set args=%args% -j"%nwhrpdir:\=/%"
  92. set args=%args% -gnwinter.grp %hrp% %hrpu% %*
  93.  
  94. set exe=eduke32
  95. if "%debug%"=="1" set exe=eduke32.debug
  96.  
  97. if exist %exe%.bat (
  98. call %exe%.bat %args%
  99. ) else (
  100. start %exe%.exe %args%
  101. )
  102.  
  103. ::if exist *.abk ren *.abk *.art
  104.  
  105. goto end
  106.  
  107. :nonwgrp
  108. echo.
  109. echo Error: You don't have NWINTER.GRP in your directory.
  110. :retry
  111. echo.
  112. set cddrive=
  113. set /p cddrive=What is the drive letter that your Nuclear Winter CD is in?
  114. echo.
  115. if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
  116. if '%cddrive%'=='' goto cdno
  117. if not exist %cddrive%:\ goto cdno
  118. if not exist %cddrive%:\* goto cdno
  119. if not exist %cddrive%:\GAMEDATA\NWINTER.GRP goto cdw
  120. copy %cddrive%:GAMEDATA\NWINTER.GRP .\
  121. pause
  122. echo.
  123. type NWINTRO.TXT
  124. echo.
  125. pause
  126. goto nonwgrp_done
  127.  
  128. :cdno
  129. echo '%cddrive%' is not valid.  Please try again.
  130. goto retry
  131.  
  132. :cdw
  133. echo '%cddrive%' is not the correct disc.  Please try again.
  134. goto retry
  135.  
  136. :extract
  137. echo.
  138. echo                   ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  139. echo                   º Duke: Nuclear Winter Plus Installation º
  140. echo                   ÈÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍͼ
  141. echo                               ³ By Hendricks266 ³
  142. echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  143. echo.
  144. if not exist nwl1.ips goto noips
  145. if not exist nwl2.ips goto noips
  146. if not exist nwl3.ips goto noips
  147. if not exist nwl4.ips goto noips
  148. if not exist nwl5.ips goto noips
  149. if not exist nwl6.ips goto noips
  150. if not exist nwl7.ips goto noips
  151. if not exist nwl8.ips goto noips
  152. md nw_preserve
  153. if exist nwl*.map move /y nwl*.map nw_preserve\
  154. if exist "%eduke32dir%\nwl*.map" move /y "%eduke32dir%\nwl*.map" nw_preserve\
  155. utils\windows\win32\kextract.exe NWINTER.GRP E2L*.MAP
  156. ren E2L1.MAP nwl1.map
  157. ren E2L2.MAP nwl2.map
  158. ren E2L3.MAP nwl3.map
  159. ren E2L4.MAP nwl4.map
  160. ren E2L5.MAP nwl5.map
  161. ren E2L6.MAP nwl6.map
  162. ren E2L7.MAP nwl7.map
  163. ren E2L8.MAP nwl8.map
  164. if exist nwpatch*.h266 del /f /q nwpatch*.h266
  165. if exist nwflag*.h266 del /f /q nwflag*.h266
  166. echo.
  167. echo Map patching will now begin.
  168. echo.
  169. pause
  170. echo
  171. utils\windows\win32\uips.exe a nwl1.ips nwl1.map
  172. utils\windows\win32\uips.exe a nwl2.ips nwl2.map
  173. utils\windows\win32\uips.exe a nwl3.ips nwl3.map
  174. utils\windows\win32\uips.exe a nwl4.ips nwl4.map
  175. utils\windows\win32\uips.exe a nwl5.ips nwl5.map
  176. utils\windows\win32\uips.exe a nwl6.ips nwl6.map
  177. utils\windows\win32\uips.exe a nwl7.ips nwl7.map
  178. utils\windows\win32\uips.exe a nwl8.ips nwl8.map
  179. if exist nwpatch*.h266 del /f /q nwpatch*.h266
  180. if exist nwflag*.h266 del /f /q nwflag*.h266
  181. echo Do not delete this file! You will be forced to reinstall NW+ and repatch the maps. >nwflag%nwver%.h266
  182. attrib +r nwflag%nwver%.h266
  183. echo.
  184. echo Patching complete!
  185. :scanning
  186. cd "%eduke32dir%"
  187. echo.
  188. echo Scanning directory for potential problems.
  189. if exist nwl1.mhk goto mhkfound
  190. if exist nwl1demo.mhk goto mhkfound
  191. if exist nwl2.mhk goto mhkfound
  192. if exist nwl3.mhk goto mhkfound
  193. if exist nwl4.mhk goto mhkfound
  194. if exist nwl5.mhk goto mhkfound
  195. if exist nwl6.mhk goto mhkfound
  196. if exist nwl7.mhk goto mhkfound
  197. if exist nwl8.mhk goto mhkfound
  198. if exist _nwzoo.mhk goto mhkfound
  199. :mhkfound_done
  200. if exist TILES005.ART goto artfound
  201. if exist TILES006.ART goto artfound
  202. if exist TILES007.ART goto artfound
  203. if exist TILES008.ART goto artfound
  204. if exist TILES009.ART goto artfound
  205. if exist TILES012.ART goto artfound
  206. if exist TILES013.ART goto artfound
  207. if exist TILES014.ART goto artfound
  208. if exist TILES015.ART goto artfound
  209. :artfound_done
  210. if exist NWinter.con goto confound
  211. if exist NWActor.con goto confound
  212. if exist NWDefs.con goto confound
  213. if exist NWDP.con goto confound
  214. if exist NWDPCode.con goto confound
  215. if exist NWDPXXX.con goto confound
  216. if exist NWEDuke.con goto confound
  217. if exist NWSnow.con goto confound
  218. if exist NWUser.con goto confound
  219. :confound_done
  220. echo.
  221. pause
  222. goto restart
  223.  
  224. :noips
  225. echo.
  226. echo Error: You don't have all the *.ips files in your directory.
  227. echo Aborting installation.
  228. echo Map patching is required for NW+ to function correctly.
  229. echo.
  230. pause
  231. goto end
  232.  
  233. :mhkfound
  234. echo.
  235. echo Problematic .mhk files have been found in your directory.
  236. echo Unless you have knowingly made a modification to NW's map hacks,
  237. echo the presence of these files in your EDuke32 directory will
  238. echo cause NW+ to function incorrectly.
  239. echo.
  240. echo nwl1.mhk
  241. echo nwl1demo.mhk
  242. echo nwl2.mhk
  243. echo nwl3.mhk
  244. echo nwl4.mhk
  245. echo nwl5.mhk
  246. echo nwl6.mhk
  247. echo nwl7.mhk
  248. echo nwl8.mhk
  249. echo _nwzoo.mhk
  250. goto mhkfound_done
  251.  
  252. :artfound
  253. echo.
  254. echo Problematic .art files have been found in your directory.
  255. echo Unless you have knowingly made a modification to NW's art,
  256. echo the presence of these files in your EDuke32 directory will
  257. echo cause NW+ to function incorrectly.
  258. echo.
  259. echo TILES005.ART
  260. echo TILES006.ART
  261. echo TILES007.ART
  262. echo TILES008.ART
  263. echo TILES009.ART
  264. echo TILES012.ART
  265. echo TILES013.ART
  266. echo TILES014.ART
  267. echo TILES015.ART
  268. goto artfound_done
  269.  
  270. :confound
  271. echo.
  272. echo Problematic .con files have been found in your directory.
  273. echo Unless you have knowingly made a modification to NW's programming,
  274. echo the presence of these files in your EDuke32 directory will
  275. echo cause NW+ to function incorrectly.
  276. echo.
  277. echo NWinter.con
  278. echo NWEDuke.con
  279. echo NWDefs.con
  280. echo NWUser.con
  281. echo NWDP.con
  282. echo NWDPCode.con
  283. echo NWDPXXX.con
  284. echo NWActor.con
  285. echo NWSnow.con
  286. echo.
  287. echo IF THESE ARE THE ORIGINAL NUCLEAR WINTER CON FILES, OR THEY COME FROM
  288. echo AN OUTDATED VERSION OF NW+, REMOVE THEM FROM YOUR EDUKE32 DIRECTORY
  289. echo IMMEDIATELY!
  290. echo NW+ uses modified .con files to fix programming errors created by
  291. echo the original programmers. Due to improvements made to the levels,
  292. echo NW+ will have major errors if the included .con files are not used.
  293. goto confound_done
  294.  
  295. :eduke32check
  296. if exist eduke32.bat goto eduke32check_done
  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.exe (
  306. cd ..\..\..
  307. goto recheck
  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. if exist ..\..\..\eduke32.bat (
  318. cd ..\..\..
  319. goto eduke32check_done
  320. )
  321. echo Warning: You don't have EDuke32 in your directory.
  322. goto eduke32check_done
  323.  
  324. :nodir
  325. echo.
  326. echo Error: "nw_plus" data directory not found.
  327. echo Aborting launch.
  328. echo.
  329. pause
  330. goto end
  331.  
  332. :end
  333. echo.
  334. @color 07
  335. @title %ComSpec%
  336. cd %dir%
  337.