Subversion Repositories vaca_plus

Rev

Rev 19 | Rev 21 | 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 vacaflag_%addonver%.h266 goto extract
  70. if not exist vaca1.map goto extract
  71. if not exist vaca2.map goto extract
  72. if not exist vaca3.map goto extract
  73. if not exist vaca4.map goto extract
  74. if not exist vaca5.map goto extract
  75. if not exist vaca6.map goto extract
  76. if not exist vaca7.map goto extract
  77. if not exist vacadm1.map goto extract
  78. if not exist vacadm2.map goto extract
  79. if not exist vacadm3.map goto extract
  80. if not exist vacadm4.map goto extract
  81. if not exist vacasl.map goto extract
  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. :extract
  242. echo.
  243. echo                                ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  244. echo                                º Installation º
  245. echo                                ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  246. echo.
  247. if not exist vaca1.ips goto noips
  248. if not exist vaca2.ips goto noips
  249. if not exist vaca3.ips goto noips
  250. if not exist vaca4.ips goto noips
  251. if not exist vaca5.ips goto noips
  252. if not exist vaca6.ips goto noips
  253. if not exist vaca7.ips goto noips
  254. if not exist vacasl.ips goto noips
  255. if not exist vacadm1.ips goto noips
  256. if not exist vacadm2.ips goto noips
  257. if not exist vacadm3.ips goto noips
  258. if not exist vacadm4.ips goto noips
  259. md vaca_preserve
  260. if exist vaca*.map move /y vaca*.map vaca_preserve\
  261. if exist "%exedir%\vaca*.map" move /y "%exedir%\vaca*.map" vaca_preserve\
  262. utils\windows\win32\kextract.exe VACATION.GRP VACA*.MAP
  263. ren VACA1.MAP vaca1.map
  264. ren VACA2.MAP vaca2.map
  265. ren VACA3.MAP vaca3.map
  266. ren VACA4.MAP vaca4.map
  267. ren VACA5.MAP vaca5.map
  268. ren VACA6.MAP vaca6.map
  269. ren VACA7.MAP vaca7.map
  270. ren VACASL.MAP vacasl.map
  271. ren VACADM1.MAP vacadm1.map
  272. ren VACADM2.MAP vacadm2.map
  273. ren VACADM3.MAP vacadm3.map
  274. ren VACADM4.MAP vacadm4.map
  275. if exist vacapatch*.h266 del /f /q vacapatch*.h266
  276. if exist vacaflag*.h266 del /f /q vacaflag*.h266
  277. echo.
  278. echo Map patching will now begin.
  279. echo.
  280. pause
  281. echo
  282. utils\windows\win32\uips.exe a vaca1.ips vaca1.map
  283. utils\windows\win32\uips.exe a vaca2.ips vaca2.map
  284. utils\windows\win32\uips.exe a vaca3.ips vaca3.map
  285. utils\windows\win32\uips.exe a vaca4.ips vaca4.map
  286. utils\windows\win32\uips.exe a vaca5.ips vaca5.map
  287. utils\windows\win32\uips.exe a vaca6.ips vaca6.map
  288. utils\windows\win32\uips.exe a vaca7.ips vaca7.map
  289. utils\windows\win32\uips.exe a vacasl.ips vacasl.map
  290. utils\windows\win32\uips.exe a vacadm1.ips vacadm1.map
  291. utils\windows\win32\uips.exe a vacadm2.ips vacadm2.map
  292. utils\windows\win32\uips.exe a vacadm3.ips vacadm3.map
  293. utils\windows\win32\uips.exe a vacadm4.ips vacadm4.map
  294. if exist vacapatch*.h266 del /f /q vacapatch*.h266
  295. if exist vacaflag*.h266 del /f /q vacaflag*.h266
  296. echo Do not delete this file^! You will be forced to reinstall Vaca+ and repatch the maps. >vacaflag_%addonver%.h266
  297. attrib +r vacaflag_%addonver%.h266
  298. echo.
  299. echo Patching complete^!
  300. :scanning
  301. cd "%exedir%"
  302. echo.
  303. echo Scanning directory for potential problems.
  304. if exist vaca1.mhk goto mhkfound
  305. if exist vaca2.mhk goto mhkfound
  306. if exist vaca3.mhk goto mhkfound
  307. if exist vaca4.mhk goto mhkfound
  308. if exist vaca5.mhk goto mhkfound
  309. if exist vaca6.mhk goto mhkfound
  310. if exist vaca7.mhk goto mhkfound
  311. if exist vacasl.mhk goto mhkfound
  312. if exist vacadm1.mhk goto mhkfound
  313. if exist vacadm2.mhk goto mhkfound
  314. if exist vacadm3.mhk goto mhkfound
  315. if exist vacadm4.mhk goto mhkfound
  316. if exist dcava0r.mhk goto mhkfound
  317. if exist dcava1.mhk goto mhkfound
  318. if exist _vacazoo.mhk goto mhkfound
  319. :mhkfound_done
  320. if exist TILES000.ART goto artfound
  321. if exist TILES003.ART goto artfound
  322. if exist TILES005.ART goto artfound
  323. if exist TILES006.ART goto artfound
  324. if exist TILES007.ART goto artfound
  325. if exist TILES008.ART goto artfound
  326. if exist TILES009.ART goto artfound
  327. if exist TILES010.ART goto artfound
  328. if exist TILES012.ART goto artfound
  329. if exist TILES014.ART goto artfound
  330. :artfound_done
  331. if exist Vacation.con goto confound
  332. if exist VacaEDuke.con goto confound
  333. if exist VacaDefs.con goto confound
  334. if exist VacaUser.con goto confound
  335. if exist VacaDP.con goto confound
  336. if exist VacaDPCode.con goto confound
  337. if exist VacaDPXXX.con goto confound
  338. if exist VSounds.con goto confound
  339. if exist VBeachBabe.con goto confound
  340. if exist VBeachBall.con goto confound
  341. if exist VBeachBather.con goto confound
  342. if exist VDragon.con goto confound
  343. if exist VSeagull.con goto confound
  344. :confound_done
  345. echo.
  346. pause
  347. goto restart
  348.  
  349. :noips
  350. echo.
  351. echo Error: You don't have all the *.ips files in your directory.
  352. echo Aborting installation.
  353. echo Map patching is required for Vaca+ to function correctly.
  354. echo.
  355. pause
  356. goto end
  357.  
  358. :mhkfound
  359. echo.
  360. echo Problematic .mhk files have been found in your directory.
  361. echo Unless you have knowingly made a modification to Vaca's map hacks,
  362. echo the presence of these files in your %exeproper% directory will
  363. echo cause Vaca+ to function incorrectly.
  364. echo.
  365. echo vaca1.mhk
  366. echo vaca2.mhk
  367. echo vaca3.mhk
  368. echo vaca4.mhk
  369. echo vaca5.mhk
  370. echo vaca6.mhk
  371. echo vaca7.mhk
  372. echo vacasl.mhk
  373. echo vacadm1.mhk
  374. echo vacadm2.mhk
  375. echo vacadm3.mhk
  376. echo vacadm4.mhk
  377. echo dcava0r.mhk
  378. echo dcava1.mhk
  379. echo _vacazoo.mhk
  380. goto mhkfound_done
  381.  
  382. :artfound
  383. echo.
  384. echo Problematic .art files have been found in your directory.
  385. echo Unless you have knowingly made a modification to Vaca's art,
  386. echo the presence of these files in your %exeproper% directory will
  387. echo cause Vaca+ to function incorrectly.
  388. echo.
  389. echo TILES000.ART
  390. echo TILES003.ART
  391. echo TILES005.ART
  392. echo TILES006.ART
  393. echo TILES007.ART
  394. echo TILES008.ART
  395. echo TILES009.ART
  396. echo TILES010.ART
  397. echo TILES012.ART
  398. echo TILES014.ART
  399. goto artfound_done
  400.  
  401. :confound
  402. echo.
  403. echo Problematic .con files have been found in your directory.
  404. echo Unless you have knowingly made a modification to Vaca's programming,
  405. echo the presence of these files in your %exeproper% directory will
  406. echo cause Vaca+ to function incorrectly.
  407. echo.
  408. echo Vacation.con
  409. echo VacaEDuke.con
  410. echo VacaDefs.con
  411. echo VacaUser.con
  412. echo VacaDP.con
  413. echo VacaDPCode.con
  414. echo VacaDPXXX.con
  415. echo VSounds.con
  416. echo VBeachBabe.con
  417. echo VBeachBall.con
  418. echo VBeachBather.con
  419. echo VDragon.con
  420. echo VSeagull.con
  421. echo.
  422. echo IF THESE ARE THE ORIGINAL CARIBBEAN CON FILES, OR THEY COME FROM
  423. echo AN OUTDATED VERSION OF VACA+, REMOVE THEM FROM YOUR %exeproper% DIRECTORY
  424. echo IMMEDIATELY^!
  425. echo Vaca+ uses modified .con files to fix programming errors created by
  426. echo the original programmers. Due to improvements made to the levels,
  427. echo Vaca+ will have major errors if the included .con files are not used.
  428. goto confound_done
  429.  
  430. :execheck
  431. if exist %exename%.bat goto execheck_done
  432. if exist ..\%exename%.exe (
  433. cd ..
  434. goto recheck
  435. )
  436. if exist ..\..\%exename%.exe (
  437. cd ..\..
  438. goto recheck
  439. )
  440. if exist ..\..\..\%exename%.exe (
  441. cd ..\..\..
  442. goto recheck
  443. )
  444. if exist ..\%exename%.bat (
  445. cd ..
  446. goto execheck_done
  447. )
  448. if exist ..\..\%exename%.bat (
  449. cd ..\..
  450. goto execheck_done
  451. )
  452. if exist ..\..\..\%exename%.bat (
  453. cd ..\..\..
  454. goto execheck_done
  455. )
  456. echo Warning: You don't have %exeproper% in your directory.
  457. goto execheck_done
  458.  
  459. :nodir
  460. echo.
  461. echo Error: "vaca_plus" data directory not found.
  462. echo Aborting launch.
  463. echo.
  464. pause
  465. goto end
  466.  
  467. :end
  468. echo.
  469. set editor=0
  470. set xxx=0
  471. set dp=0
  472. set debug=0
  473. cd %dir%
  474. @title %ComSpec%
  475. @color 07
  476.