Subversion Repositories vaca_plus

Rev

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