Subversion Repositories vaca_plus

Rev

Rev 24 | Rev 26 | 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 Caribbean: Life's A Beach Plus Launcher
  6. if "%editor%"=="1" title Duke Caribbean: Life's A Beach 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=r003
  24.  
  25. :title
  26. echo                     ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  27. echo                     º Duke Caribbean: Life's A Beach Plus º
  28. echo                     ÈÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍͼ
  29. echo                               ³ By Hendricks266 ³
  30. echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  31. echo.
  32. echo You are %action% Sunstorm Interactive's Duke Caribbean: Life's A Beach with the
  33. echo various enhancements of Duke Caribbean: Life's A Beach Plus, maintained by
  34. echo Hendricks266.
  35. echo.
  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 vaca_plus\ goto nodir
  48. if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
  49.  
  50. if exist vacation\ set addonhrpdir=%cd%
  51. :addondircheck
  52. if exist VACATION.PRG ren VACATION.PRG vacation.grp
  53. cd vaca_plus
  54. set addondir=%cd%
  55. if exist vacation\ set addonhrpdir=%cd%
  56. if exist vaca_plus\ goto addondircheck
  57. if "%debug%"=="1" echo DEBUG: Vaca+ Directory: "%addondir%".
  58. if "%debug%"=="1" echo DEBUG: VacaHRP Directory: "%addonhrpdir%".
  59.  
  60. if not exist "%addondir%\VACATION.GRP" (
  61. if exist "%exedir%\VACATION.GRP" (
  62. move /y "%exedir%\VACATION.GRP" "%addondir%\"
  63. ren "%addondir%\VACATION.GRP" vacation.grp
  64. ) else (
  65. goto novacagrp
  66. ) )
  67.  
  68. :novacagrp_done
  69. if not exist vaca1.map goto mapextract
  70. if not exist vaca2.map goto mapextract
  71. if not exist vaca3.map goto mapextract
  72. if not exist vaca4.map goto mapextract
  73. if not exist vaca5.map goto mapextract
  74. if not exist vaca6.map goto mapextract
  75. if not exist vaca7.map goto mapextract
  76. if not exist vacadm1.map goto mapextract
  77. if not exist vacadm2.map goto mapextract
  78. if not exist vacadm3.map goto mapextract
  79. if not exist vacadm4.map goto mapextract
  80. if not exist vacasl.map goto mapextract
  81. if not exist vacaflag_%addonver%.h266 goto updateextract
  82. cd "%exedir%"
  83. echo.
  84. echo.
  85. echo.
  86. echo.
  87. echo.
  88.  
  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%\VacaNames.h"
  103. echo. >> "%exedir%\VacaNames.h"
  104. type "%addondir%\VacaNames.def" >> "%exedir%\VacaNames.h"
  105. )
  106.  
  107. :arguments
  108. set args=
  109. if exist "%exedir%\polymer_hrp\" set args=%args% -jpolymer_hrp
  110. if exist "%exedir%\duke3d_voxel.zip" set args=%args% -gduke3d_voxel.zip
  111. if exist "%exedir%\duke3d_hrp.zip" set args=%args% -gduke3d_hrp.zip
  112. if exist "%exedir%\hrp_update.zip" set args=%args% -ghrp_update.zip
  113. if exist "%exedir%\maphacks.zip" set args=%args% -gmaphacks.zip
  114. if exist "%exedir%\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% -gvacation.grp -hvacation.def -xVacaEDuke.con
  118. if "%editor%"=="1" set args=%args% -namesfile VacaNames.h
  119. if "%dp%"=="1" set args=%args% -hvaca_dp.def -xVacaDP.con
  120. if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -gxxx_lite.zip
  121. if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -jxxx_lite
  122. if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -gxxx_pack.zip
  123. if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -jxxx_pack
  124. if "%xxx%"=="1" set args=%args% -hvaca_xxx.def
  125. if "%xxx%"=="1" if "%dp%"=="1" set args=%args% -hvaca_dp_xxx.def -xVacaDPXXX.con
  126. set args=%args% %*
  127. if "%dp%"=="1" set args=%args% -jDukePlus
  128.  
  129. set exe=%exename%
  130. if "%debug%"=="1" set exe=%exename%.debug
  131.  
  132. if exist %exe%.bat (
  133. call %exe%.bat %args%
  134. ) else (
  135. start %exe%.exe %args%
  136. )
  137.  
  138. goto end
  139.  
  140. :novacagrp
  141. echo.
  142. echo Error: You don't have VACATION.GRP in your directory.
  143. echo.
  144. goto ssicheck
  145. :retry
  146. echo.
  147. set cddrive=
  148. set /p cddrive=What is the drive letter that your Caribbean CD is in?
  149. echo.
  150. if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
  151. if '%cddrive%'=='' goto cdno
  152. if not exist %cddrive%:\ goto cdno
  153. if not exist %cddrive%:\* goto cdno
  154. if not exist %cddrive%:\VACATION\VACA13.SSI goto cdw
  155. copy %cddrive%:\VACATION\*.SSI .\
  156. echo.
  157. type DVINTRO.TXT
  158. echo.
  159. pause
  160. goto ssicheck
  161.  
  162. :cdno
  163. echo '%cddrive%' is not valid.  Please try again.
  164. goto retry
  165.  
  166. :cdw
  167. echo '%cddrive%' is not the correct disc.  Please try again.
  168. goto retry
  169.  
  170. :ssicheck
  171. if exist VACA15.SSI goto ssi1
  172. if exist VACAPP.SSI goto ssi2
  173. if exist VACA13.SSI goto ssi3
  174. echo You don't have the SSI files in your directory.
  175. goto retry
  176.  
  177. :ssi1
  178. echo You do have the Caribbean SSI file in this directory, but it has not been
  179. echo extracted.  It will now be unpacked.
  180. echo.
  181. pause
  182. md vaca15ssi
  183. cd vaca15ssi
  184. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  185. ..\utils\windows\win32\unpackssi.exe ..\VACA15.SSI
  186. move /y VACATION.PRG ..\vacation.grp
  187. cd ..
  188. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  189. rd /s /q vaca15ssi
  190. goto novacagrp_done
  191.  
  192. :ssi2
  193. echo You do have the Caribbean SSI file in this directory, but it has not been
  194. echo extracted.  It will now be unpacked.
  195. echo.
  196. pause
  197. md vacappssi
  198. cd vacappssi
  199. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  200. ..\utils\windows\win32\unpackssi.exe ..\VACAPP.SSI
  201. move /y VACATION.PRG ..\vacation.grp
  202. cd ..
  203. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  204. rd /s /q vacappssi
  205. goto novacagrp_done
  206.  
  207. :ssi3
  208. echo You do have the Caribbean SSI file in this directory, but it has not been
  209. echo extracted.  It will now be unpacked.
  210. echo.
  211. pause
  212. md vaca13ssi
  213. cd vaca13ssi
  214. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  215. ..\utils\windows\win32\unpackssi.exe ..\VACA13.SSI
  216. ren *.TRA *.ART
  217. ren *.PCS *.SCP
  218. ren VACA1.MAP vaca1.map
  219. ren VACA2.MAP vaca2.map
  220. ren VACA3.MAP vaca3.map
  221. ren VACA4.MAP vaca4.map
  222. ren VACA5.MAP vaca5.map
  223. ren VACA6.MAP vaca6.map
  224. ren VACA7.MAP vaca7.map
  225. ren VACASL.MAP vacasl.map
  226. ren VACADM1.MAP vacadm1.map
  227. ren VACADM2.MAP vacadm2.map
  228. ren VACADM3.MAP vacadm3.map
  229. ren VACADM4.MAP vacadm4.map
  230. ren *.NOC *.CON
  231. ren *.DIM *.MID
  232. ren *.MNA *.ANM
  233. ren *.COV *.VOC
  234. ren *.OMD *.DMO
  235. ren DUKETEAM.ANM RADLOGO.ANM
  236. ..\utils\windows\win32\kgroup.exe VACATION.GRP *.ART *.SCP *.map *.MID *.ANM *.VOC *.DMO CARIB.EXE
  237. move /y VACATION.GRP ..\vacation.grp
  238. move /y *.map ..\
  239. cd ..
  240. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  241. rd /s /q vaca13ssi
  242. goto novacagrp_done
  243.  
  244. :mapextract
  245. echo Extracted maps not found. Proceeding to installation.
  246. goto extract
  247.  
  248. :updateextract
  249. echo Map patch update required. Proceeding to installation.
  250. goto extract
  251.  
  252. :extract
  253. echo.
  254. echo                                ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  255. echo                                º Installation º
  256. echo                                ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  257. echo.
  258. if not exist vaca1.patch goto nopatch
  259. if not exist vaca2.patch goto nopatch
  260. if not exist vaca3.patch goto nopatch
  261. if not exist vaca4.patch goto nopatch
  262. if not exist vaca5.patch goto nopatch
  263. if not exist vaca6.patch goto nopatch
  264. if not exist vaca7.patch goto nopatch
  265. if not exist vacasl.patch goto nopatch
  266. if not exist vacadm1.patch goto nopatch
  267. if not exist vacadm2.patch goto nopatch
  268. if not exist vacadm3.patch goto nopatch
  269. if not exist vacadm4.patch goto nopatch
  270. md vaca_preserve
  271. if exist vaca*.map move /y vaca*.map vaca_preserve\
  272. if exist "%exedir%\vaca*.map" move /y "%exedir%\vaca*.map" vaca_preserve\
  273. utils\windows\win32\kextract.exe VACATION.GRP VACA*.MAP
  274. ren VACA1.MAP vaca1.map
  275. ren VACA2.MAP vaca2.map
  276. ren VACA3.MAP vaca3.map
  277. ren VACA4.MAP vaca4.map
  278. ren VACA5.MAP vaca5.map
  279. ren VACA6.MAP vaca6.map
  280. ren VACA7.MAP vaca7.map
  281. ren VACASL.MAP vacasl.map
  282. ren VACADM1.MAP vacadm1.map
  283. ren VACADM2.MAP vacadm2.map
  284. ren VACADM3.MAP vacadm3.map
  285. ren VACADM4.MAP vacadm4.map
  286. if exist vacapatch*.h266 del /f /q vacapatch*.h266
  287. if exist vacaflag*.h266 del /f /q vacaflag*.h266
  288. echo.
  289. echo Map patching will now begin.
  290. echo.
  291. pause
  292. echo
  293. utils\windows\win32\bspatch.exe vaca1.map vaca1.map vaca1.patch
  294. utils\windows\win32\bspatch.exe vaca2.map vaca2.map vaca2.patch
  295. utils\windows\win32\bspatch.exe vaca3.map vaca3.map vaca3.patch
  296. utils\windows\win32\bspatch.exe vaca4.map vaca4.map vaca4.patch
  297. utils\windows\win32\bspatch.exe vaca5.map vaca5.map vaca5.patch
  298. utils\windows\win32\bspatch.exe vaca6.map vaca6.map vaca6.patch
  299. utils\windows\win32\bspatch.exe vaca7.map vaca7.map vaca7.patch
  300. utils\windows\win32\bspatch.exe vacasl.map vacasl.map vacasl.patch
  301. utils\windows\win32\bspatch.exe vacadm1.map vacadm1.map vacadm1.patch
  302. utils\windows\win32\bspatch.exe vacadm2.map vacadm2.map vacadm2.patch
  303. utils\windows\win32\bspatch.exe vacadm3.map vacadm3.map vacadm3.patch
  304. utils\windows\win32\bspatch.exe vacadm4.map vacadm4.map vacadm4.patch
  305. if exist vacapatch*.h266 del /f /q vacapatch*.h266
  306. if exist vacaflag*.h266 del /f /q vacaflag*.h266
  307. echo Do not delete this file^! You will be forced to reinstall Vaca+ and repatch the maps. >vacaflag_%addonver%.h266
  308. attrib +r vacaflag_%addonver%.h266
  309. echo.
  310. echo Patching complete^!
  311. :scanning
  312. cd "%exedir%"
  313. echo.
  314. echo Scanning directory for potential problems.
  315. if exist vaca1.mhk goto mhkfound
  316. if exist vaca2.mhk goto mhkfound
  317. if exist vaca3.mhk goto mhkfound
  318. if exist vaca4.mhk goto mhkfound
  319. if exist vaca5.mhk goto mhkfound
  320. if exist vaca6.mhk goto mhkfound
  321. if exist vaca7.mhk goto mhkfound
  322. if exist vacasl.mhk goto mhkfound
  323. if exist vacadm1.mhk goto mhkfound
  324. if exist vacadm2.mhk goto mhkfound
  325. if exist vacadm3.mhk goto mhkfound
  326. if exist vacadm4.mhk goto mhkfound
  327. if exist dcava0r.mhk goto mhkfound
  328. if exist dcava1.mhk goto mhkfound
  329. if exist _vacazoo.mhk goto mhkfound
  330. :mhkfound_done
  331. if exist TILES000.ART goto artfound
  332. if exist TILES003.ART goto artfound
  333. if exist TILES005.ART goto artfound
  334. if exist TILES006.ART goto artfound
  335. if exist TILES007.ART goto artfound
  336. if exist TILES008.ART goto artfound
  337. if exist TILES009.ART goto artfound
  338. if exist TILES010.ART goto artfound
  339. if exist TILES012.ART goto artfound
  340. if exist TILES014.ART goto artfound
  341. :artfound_done
  342. if exist Vacation.con goto confound
  343. if exist VacaEDuke.con goto confound
  344. if exist VacaDefs.con goto confound
  345. if exist VacaUser.con goto confound
  346. if exist VacaDP.con goto confound
  347. if exist VacaDPCode.con goto confound
  348. if exist VacaDPXXX.con goto confound
  349. if exist VSounds.con goto confound
  350. if exist VBeachBabe.con goto confound
  351. if exist VBeachBall.con goto confound
  352. if exist VBeachBather.con goto confound
  353. if exist VDragon.con goto confound
  354. if exist VSeagull.con goto confound
  355. :confound_done
  356. echo.
  357. pause
  358. goto restart
  359.  
  360. :nopatch
  361. echo.
  362. echo Error: You don't have all the *.patch files in your directory.
  363. echo Aborting installation.
  364. echo Map patching is required for Vaca+ to function correctly.
  365. echo.
  366. pause
  367. goto end
  368.  
  369. :mhkfound
  370. echo.
  371. echo Problematic .mhk files have been found in your directory.
  372. echo Unless you have knowingly made a modification to Vaca's map hacks,
  373. echo the presence of these files in your %exeproper% directory will
  374. echo cause Vaca+ to function incorrectly.
  375. echo.
  376. echo vaca1.mhk
  377. echo vaca2.mhk
  378. echo vaca3.mhk
  379. echo vaca4.mhk
  380. echo vaca5.mhk
  381. echo vaca6.mhk
  382. echo vaca7.mhk
  383. echo vacasl.mhk
  384. echo vacadm1.mhk
  385. echo vacadm2.mhk
  386. echo vacadm3.mhk
  387. echo vacadm4.mhk
  388. echo dcava0r.mhk
  389. echo dcava1.mhk
  390. echo _vacazoo.mhk
  391. goto mhkfound_done
  392.  
  393. :artfound
  394. echo.
  395. echo Problematic .art files have been found in your directory.
  396. echo Unless you have knowingly made a modification to Vaca's art,
  397. echo the presence of these files in your %exeproper% directory will
  398. echo cause Vaca+ to function incorrectly.
  399. echo.
  400. echo TILES000.ART
  401. echo TILES003.ART
  402. echo TILES005.ART
  403. echo TILES006.ART
  404. echo TILES007.ART
  405. echo TILES008.ART
  406. echo TILES009.ART
  407. echo TILES010.ART
  408. echo TILES012.ART
  409. echo TILES014.ART
  410. goto artfound_done
  411.  
  412. :confound
  413. echo.
  414. echo Problematic .con files have been found in your directory.
  415. echo Unless you have knowingly made a modification to Vaca's programming,
  416. echo the presence of these files in your %exeproper% directory will
  417. echo cause Vaca+ to function incorrectly.
  418. echo.
  419. echo Vacation.con
  420. echo VacaEDuke.con
  421. echo VacaDefs.con
  422. echo VacaUser.con
  423. echo VacaDP.con
  424. echo VacaDPCode.con
  425. echo VacaDPXXX.con
  426. echo VSounds.con
  427. echo VBeachBabe.con
  428. echo VBeachBall.con
  429. echo VBeachBather.con
  430. echo VDragon.con
  431. echo VSeagull.con
  432. echo.
  433. echo IF THESE ARE THE ORIGINAL CARIBBEAN CON FILES, OR THEY COME FROM
  434. echo AN OUTDATED VERSION OF VACA+, REMOVE THEM FROM YOUR %exeproper% DIRECTORY
  435. echo IMMEDIATELY^!
  436. echo Vaca+ uses modified .con files to fix programming errors created by
  437. echo the original programmers. Due to improvements made to the levels,
  438. echo Vaca+ will have major errors if the included .con files are not used.
  439. goto confound_done
  440.  
  441. :execheck
  442. if exist %exename%.bat goto execheck_done
  443. if exist ..\%exename%.exe (
  444. cd ..
  445. goto recheck
  446. )
  447. if exist ..\..\%exename%.exe (
  448. cd ..\..
  449. goto recheck
  450. )
  451. if exist ..\..\..\%exename%.exe (
  452. cd ..\..\..
  453. goto recheck
  454. )
  455. if exist ..\%exename%.bat (
  456. cd ..
  457. goto execheck_done
  458. )
  459. if exist ..\..\%exename%.bat (
  460. cd ..\..
  461. goto execheck_done
  462. )
  463. if exist ..\..\..\%exename%.bat (
  464. cd ..\..\..
  465. goto execheck_done
  466. )
  467. echo Warning: You don't have %exeproper% in your directory.
  468. goto execheck_done
  469.  
  470. :nodir
  471. echo.
  472. echo Error: "vaca_plus" data directory not found.
  473. echo Aborting launch.
  474. echo.
  475. pause
  476. goto end
  477.  
  478. :end
  479. echo.
  480. set editor=0
  481. set xxx=0
  482. set dp=0
  483. set debug=0
  484. cd %dir%
  485. @title %ComSpec%
  486. @color 07
  487.