Subversion Repositories vaca_plus

Rev

Rev 76 | Rev 78 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. @echo off
  2. color 0C
  3. setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
  4. pushd "%~dp0"
  5. set startdir=%cd%
  6.  
  7. :restart
  8. title Duke Caribbean: Life's A Beach Plus Launcher
  9. if "%editor%"=="1" title Duke Caribbean: Life's A Beach Plus Editor Launcher
  10.  
  11. set exedir=%startdir%
  12. set addondir=%startdir%
  13. set addonhrpdir=%startdir%
  14.  
  15. set exename=eduke32
  16. set exeproper=EDuke32
  17. set action=playing
  18.  
  19. if "%editor%"=="1" (
  20. set exename=mapster32
  21. set exeproper=Mapster32
  22. set action=editing
  23. )
  24.  
  25. set addonver=r004
  26.  
  27. :title
  28. echo                     ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  29. echo                     º Duke Caribbean: Life's A Beach Plus º
  30. echo                     ÈÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍͼ
  31. echo                               ³ By Hendricks266 ³
  32. echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  33. echo.
  34. echo You are %action% Sunstorm Interactive's Duke Caribbean: Life's A Beach with the
  35. echo various enhancements of Duke Caribbean: Life's A Beach Plus, maintained by
  36. echo Hendricks266.
  37. echo.
  38.  
  39. if "%xxx%"=="1" echo Using XXX mode.
  40. if "%dp%"=="1" echo Using Duke Plus by DeeperThought.
  41. if "%debug%"=="1" echo Using debug mode.
  42.  
  43. if "%debug%"=="1" echo DEBUG: Command Line Input: %*
  44.  
  45. :recheck
  46. if not exist %exename%.exe goto execheck
  47. :execheck_done
  48. set exedir=%cd%
  49. if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%"
  50.  
  51. if not exist vaca_plus\ goto nodir
  52. if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
  53.  
  54. if exist vacation\ set addonhrpdir=%cd%
  55. :addondircheck
  56. if exist VACATION.PRG ren VACATION.PRG vacation.grp
  57. chdir vaca_plus
  58. set addondir=%cd%
  59. if exist vacation\ set addonhrpdir=%cd%
  60. if exist vaca_plus\ goto addondircheck
  61. if "%debug%"=="1" echo DEBUG: Vaca+ Directory: "%addondir%".
  62. if "%debug%"=="1" echo DEBUG: VacaHRP Directory: "%addonhrpdir%".
  63.  
  64. set kextract=%addondir%\utils\windows\win32\kextract.exe
  65. if "%debug%"=="1" set kextract=%addondir%\utils\windows\win32\kextract.debug.exe
  66. set kgroup=%addondir%\utils\windows\win32\kgroup.exe
  67. if "%debug%"=="1" set kgroup=%addondir%\utils\windows\win32\kgroup.debug.exe
  68. set unpackssi=%addondir%\utils\windows\win32\unpackssi.exe
  69. if "%debug%"=="1" set unpackssi=%addondir%\utils\windows\win32\unpackssi.debug.exe
  70. set bspatch=%addondir%\utils\windows\win32\bspatch.exe
  71. set sha1sum=%addondir%\utils\windows\win32\sha1sum.exe
  72.  
  73. if "%vacagrpname%"=="" set vacagrpname=vacation.grp
  74. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%exedir%\vaca15.grp" set vacagrpname=vaca15.grp
  75. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%addondir%\vaca15.grp" set vacagrpname=vaca15.grp
  76. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%exedir%\vacapp.grp" set vacagrpname=vacapp.grp
  77. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%addondir%\vacapp.grp" set vacagrpname=vacapp.grp
  78. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%exedir%\vaca13.grp" set vacagrpname=vaca13.grp
  79. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%addondir%\vaca13.grp" set vacagrpname=vaca13.grp
  80. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%exedir%\vacation13.grp" set vacagrpname=vacation13.grp
  81. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" if exist "%addondir%\vacation13.grp" set vacagrpname=vacation13.grp
  82. if not exist "%exedir%\%vacagrpname%" if not exist "%addondir%\%vacagrpname%" goto novacagrp
  83.  
  84. if exist vacation.grp ren vacation.grp vacation.grp
  85. call :grpchecksum
  86. :novacagrp_return
  87. if not "%version%"=="demo" (
  88. if not exist vaca1.map goto mapextract
  89. if not exist vaca2.map goto mapextract
  90. if not exist vaca3.map goto mapextract
  91. if not exist vaca4.map goto mapextract
  92. if not exist vaca5.map goto mapextract
  93. if not exist vaca6.map goto mapextract
  94. if not exist vaca7.map goto mapextract
  95. if not exist vacasl.map goto mapextract
  96. if not exist vacadm1.map goto mapextract
  97. if not exist vacadm2.map goto mapextract
  98. if not exist vacadm3.map goto mapextract
  99. if not exist vacadm4.map goto mapextract
  100. if not exist vacaflag_%addonver%.h266 goto updateextract
  101. )
  102. chdir /d "%exedir%"
  103. echo.
  104. echo.
  105. echo.
  106. echo.
  107. echo.
  108. echo.
  109. echo.
  110. echo.
  111. echo.
  112.  
  113. :init
  114. pause
  115. echo.
  116. goto check
  117.  
  118. :check
  119.  
  120. echo.
  121. echo Launching Duke Nukem 3D . . .
  122. echo Thanks for %action%!
  123. echo.
  124.  
  125. if "%editor%"=="1" (
  126. type "%exedir%\names.h" > "%exedir%\VacaNames.h"
  127. echo. >> "%exedir%\VacaNames.h"
  128. type "%addondir%\VacaNames.def" >> "%exedir%\VacaNames.h"
  129. )
  130.  
  131. :arguments
  132. set args=
  133. if exist "%exedir%\HRP\" set args=%args% -jHRP
  134. if exist "%exedir%\polymer_hrp\" set args=%args% -jpolymer_hrp
  135. if exist "%exedir%\duke3d_voxel.zip" set args=%args% -gduke3d_voxel.zip
  136. if exist "%exedir%\duke3d_hrp.zip" set args=%args% -gduke3d_hrp.zip
  137. if exist "%exedir%\hrp_update.zip" set args=%args% -ghrp_update.zip
  138. if exist "%exedir%\maphacks.zip" set args=%args% -gmaphacks.zip
  139. if exist "%exedir%\eduke32_mus.zip" set args=%args% -geduke32_mus.zip
  140. if exist "%addondir%" if not "%addondir%"=="%exedir%" set args=%args% -j"%addondir:\=/%"
  141. if exist "%addonhrpdir%" if not "%addonhrpdir%"=="%exedir%" if not "%addonhrpdir%"=="%addondir%" set args=%args% -j"%addonhrpdir:\=/%"
  142. set args=%args% -g%vacagrpname% -hvacation.def -xVacaEDuke.con
  143. if "%editor%"=="1" set args=%args% -namesfile VacaNames.h
  144. if "%dp%"=="1" set args=%args% -hvaca_dp.def -xVacaDP.con
  145. if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -gxxx_lite.zip
  146. if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -jxxx_lite
  147. if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -gxxx_pack.zip
  148. if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -jxxx_pack
  149. if "%xxx%"=="1" set args=%args% -hvaca_xxx.def
  150. if "%xxx%"=="1" if "%dp%"=="1" set args=%args% -hvaca_dp_xxx.def -xVacaDPXXX.con
  151. set args=%args% %*
  152. if "%dp%"=="1" set args=%args% -jDukePlus
  153.  
  154. set exe=%exename%
  155. if "%debug%"=="1" set exe=%exename%.debug
  156.  
  157. if exist %exe%.bat (
  158. if "%debug%"=="1" echo DEBUG: Final Command Line: call %exe%.bat %args%
  159. call %exe%.bat %args%
  160. ) else (
  161. if "%debug%"=="1" echo DEBUG: Final Command Line: start %exe%.exe %args%
  162. start %exe%.exe %args%
  163. )
  164.  
  165. set svnpath=0
  166. if "%svnpath%"=="0" if exist "%startdir%\svn\bin\svn.exe" set svnpath=%startdir%\svn\bin
  167. if "%svnpath%"=="0" if exist "%exedir%\svn\bin\svn.exe" set svnpath=%exedir%\svn\bin
  168. if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin
  169. if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin
  170. if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin
  171. if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
  172. if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
  173. if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
  174. if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
  175.  
  176. chdir /d "%addondir%"
  177. if not "%svnpath%"=="0" call :svn_action
  178. chdir /d "%addonhrpdir%"
  179. if not "%svnpath%"=="0" call :svn_action
  180.  
  181. goto end
  182.  
  183. :svn_action
  184. set PATH=%PATH%;%svnpath%
  185. for /f "delims=" %%a in ('svnversion.exe .') do @set oldrev=%%a
  186. if "%oldrev%"=="exported" goto :eof
  187. if "%oldrev%"=="Unversioned directory" goto :eof
  188. "svn.exe" update
  189. for /f "delims=" %%a in ('svnversion.exe .') do @set rev=%%a
  190. set oldrev=%oldrev:M=%
  191. set oldrev=%oldrev:S=%
  192. set oldrev=%oldrev:P=%
  193. set rev=%rev:M=%
  194. set rev=%rev:S=%
  195. set rev=%rev:P=%
  196. if %rev% EQU %oldrev% goto :eof
  197. set /a oldrev=%oldrev% + 1
  198. echo.
  199. "svn.exe" log -r %oldrev%:%rev%
  200. echo.
  201. pause
  202. goto :eof
  203.  
  204. :novacagrp
  205. set megaton=Steam\SteamApps\common\Duke Nukem 3D\gameroot\addons\vacation.grp
  206. if exist "%ProgramFiles%\%megaton%" copy "%ProgramFiles%\%megaton%" .\ && call :conprotect && goto novacagrp_done
  207. if exist "%ProgramFiles(x86)%\%megaton%" copy "%ProgramFiles(x86)%\%megaton%" .\ && call :conprotect && goto novacagrp_done
  208. echo.
  209. echo Error: You don't have VACATION.GRP in your directory.
  210. echo.
  211. goto ssicheck
  212. :retry
  213. echo.
  214. set cddrive=
  215. set /p cddrive=What is the drive letter that your Caribbean CD is in?
  216. echo.
  217. if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
  218. if '%cddrive%'=='' goto cdno
  219. if not exist %cddrive%:\ goto cdno
  220. if not exist %cddrive%:\* goto cdno
  221. if exist %cddrive%:\VACATION\VACA13.SSI copy %cddrive%:\VACATION\*.SSI .\ && goto ssicheck
  222. if exist %cddrive%:\VACATION\VACATION\VACA13.SSI copy %cddrive%:\VACATION\VACATION\*.SSI .\ && goto ssicheck
  223. if exist %cddrive%:\CARIBBEA\VACA13.SSI copy %cddrive%:\CARIBBEA\VACATION\*.SSI .\ && goto ssicheck
  224. if exist %cddrive%:\CARIBBEAN\VACA13.SSI copy %cddrive%:\CARIBBEAN\VACATION\*.SSI .\ && goto ssicheck
  225. goto cdwrong
  226.  
  227. :cdno
  228. echo '%cddrive%' is not valid.  Please try again.
  229. goto retry
  230.  
  231. :cdwrong
  232. echo '%cddrive%' is not the correct disc.  Please try again.
  233. goto retry
  234.  
  235. :ssicheck
  236. if exist VACA15.SSI goto ssi1
  237. if exist VACAPP.SSI goto ssi2
  238. if exist VACA13.SSI goto ssi3
  239. echo You don't have the SSI files in your directory.
  240. goto retry
  241.  
  242. :ssi1
  243. echo You do have the Caribbean SSI file in this directory, but it has not been
  244. echo extracted.  It will now be unpacked.
  245. echo.
  246. pause
  247. mkdir vaca15ssi
  248. chdir vaca15ssi
  249. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  250. "%unpackssi%" ..\VACA15.SSI
  251. if exist VACATION.PRG move /y VACATION.PRG ..\vacation.grp
  252. chdir ..
  253. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  254. if exist vacation.grp (
  255. rmdir /s /q vaca15ssi
  256. goto novacagrp_done
  257. )
  258. if not exist vacation.grp (
  259. echo Installation Error!
  260. echo Contact Hendricks266 for help.
  261. echo.
  262. pause
  263. goto end
  264. )
  265.  
  266. :ssi2
  267. echo You do have the Caribbean SSI file in this directory, but it has not been
  268. echo extracted.  It will now be unpacked.
  269. echo.
  270. pause
  271. mkdir vacappssi
  272. chdir vacappssi
  273. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  274. "%unpackssi%" ..\VACAPP.SSI
  275. if exist VACATION.PRG move /y VACATION.PRG ..\vacation.grp
  276. chdir ..
  277. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  278. if exist vacation.grp (
  279. rmdir /s /q vacappssi
  280. goto novacagrp_done
  281. )
  282. if not exist vacation.grp (
  283. echo Installation Error!
  284. echo Contact Hendricks266 for help.
  285. echo.
  286. pause
  287. goto end
  288. )
  289.  
  290. :ssi3
  291. echo You do have the Caribbean SSI file in this directory, but it has not been
  292. echo extracted.  It will now be unpacked.
  293. echo.
  294. pause
  295. mkdir vaca13ssi
  296. chdir vaca13ssi
  297. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  298. "%unpackssi%" ..\VACA13.SSI
  299. ren *.TRA *.ART
  300. ren *.PCS *.SCP
  301. ren VACA1.MAP vaca1.map
  302. ren VACA2.MAP vaca2.map
  303. ren VACA3.MAP vaca3.map
  304. ren VACA4.MAP vaca4.map
  305. ren VACA5.MAP vaca5.map
  306. ren VACA6.MAP vaca6.map
  307. ren VACA7.MAP vaca7.map
  308. ren VACASL.MAP vacasl.map
  309. ren VACADM1.MAP vacadm1.map
  310. ren VACADM2.MAP vacadm2.map
  311. ren VACADM3.MAP vacadm3.map
  312. ren VACADM4.MAP vacadm4.map
  313. ren *.NOC *.CON
  314. ren *.DIM *.MID
  315. ren *.MNA *.ANM
  316. ren *.COV *.VOC
  317. ren *.OMD *.DMO
  318. ren GAME.CON VACAGAME.CON
  319. ren USER.CON VACAUSER.CON
  320. ren DEFS.CON VACADEFS.CON
  321. ren DUKETEAM.ANM RADLOGO.ANM
  322. "%kgroup%" vacation.grp *.ART *.SCP *.map *.MID *.ANM *.VOC *.DMO CARIB.EXE
  323. if exist vacation.grp move /y vacation.grp ..\vacation.grp
  324. move /y *.map ..\
  325. chdir ..
  326. if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
  327. if exist vacation.grp (
  328. rmdir /s /q vaca13ssi
  329. goto novacagrp_done
  330. )
  331. if not exist vacation.grp (
  332. echo Installation Error!
  333. echo Contact Hendricks266 for help.
  334. echo.
  335. pause
  336. goto end
  337. )
  338.  
  339. :novacagrp_done
  340. type DVINTRO.TXT
  341. echo.
  342. pause
  343. call :grpchecksum
  344. call :grpchecksum_results
  345. goto novacagrp_return
  346.  
  347. :grpchecksum
  348. if not exist "%sha1sum%" (
  349. echo "%sha1sum%" not found.
  350. goto :eof
  351. )
  352. pushd .
  353. if exist "%addondir%\%vacagrpname%" chdir /d %addondir%
  354. if exist "%exedir%\%vacagrpname%" chdir /d %exedir%
  355. echo ea0a9a77b9aee6edce76afa19eaea3a810fb2390 *%vacagrpname% | "%sha1sum%" --status --check -
  356. if "%ERRORLEVEL%"=="0" set version=full && popd && goto :eof
  357. if "%ERRORLEVEL%"=="1" echo 65b8b787616ed637f86cfcaa90de24c8e65b3dcc *%vacagrpname% | "%sha1sum%" --status --check -
  358. if "%ERRORLEVEL%"=="0" set version=megaton && call :conprotect && popd && goto :eof
  359. if "%ERRORLEVEL%"=="1" set version=unknown
  360. popd
  361. goto :eof
  362.  
  363. :grpchecksum_results
  364. if "%version%"=="full" echo VACATION.GRP checksum verified.
  365. if "%version%"=="megaton" echo VACATION.GRP (Megaton Edition) checksum verified.
  366. if "%version%"=="unknown" echo VACATION.GRP checksum does not match. You may have a bad copy.
  367. echo.
  368. goto :eof
  369.  
  370.  
  371. :mapextract
  372. echo Extracted maps not found or patched. Proceeding to installation.
  373. goto extract
  374.  
  375. :updateextract
  376. echo Map patch update required. Proceeding to installation.
  377. goto extract
  378.  
  379. :extract
  380. echo.
  381. echo                                ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  382. echo                                º Installation º
  383. echo                                ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  384. echo.
  385. call :grpchecksum
  386. call :grpchecksum_results
  387. if not exist vaca1.patch goto nopatch
  388. if not exist vaca2.patch goto nopatch
  389. if not exist vaca3.patch goto nopatch
  390. if not exist vaca4.patch goto nopatch
  391. if not exist vaca5.patch goto nopatch
  392. if not exist vaca6.patch goto nopatch
  393. if not exist vaca7.patch goto nopatch
  394. if not exist vacasl.patch goto nopatch
  395. if not exist vacadm1.patch goto nopatch
  396. if not exist vacadm2.patch goto nopatch
  397. if not exist vacadm3.patch goto nopatch
  398. if not exist vacadm4.patch goto nopatch
  399. mkdir vaca_preserve
  400. if exist vaca*.map move /y vaca*.map vaca_preserve\
  401. if exist "%exedir%\vaca*.map" move /y "%exedir%\vaca*.map" vaca_preserve\
  402. :: TODO: eliminate the need for the if exist checks; tighten up path handling
  403. set grp=vacation.grp
  404. if exist "%addondir%\%vacagrpname%" set grp=%addondir%\%vacagrpname%
  405. if exist "%exedir%\%vacagrpname%" set grp=%exedir%\%vacagrpname%
  406. "%kextract%" "%grp%" VACA*.MAP
  407. ren VACA1.MAP vaca1.map
  408. ren VACA2.MAP vaca2.map
  409. ren VACA3.MAP vaca3.map
  410. ren VACA4.MAP vaca4.map
  411. ren VACA5.MAP vaca5.map
  412. ren VACA6.MAP vaca6.map
  413. ren VACA7.MAP vaca7.map
  414. ren VACASL.MAP vacasl.map
  415. ren VACADM1.MAP vacadm1.map
  416. ren VACADM2.MAP vacadm2.map
  417. ren VACADM3.MAP vacadm3.map
  418. ren VACADM4.MAP vacadm4.map
  419. if exist vacapatch*.h266 del /f /q vacapatch*.h266
  420. if exist vacaflag*.h266 del /f /q vacaflag*.h266
  421. echo.
  422. echo Map patching will now begin.
  423. echo.
  424. pause
  425. echo
  426. "%bspatch%" vaca1.map vaca1.map vaca1.patch
  427. "%bspatch%" vaca2.map vaca2.map vaca2.patch
  428. "%bspatch%" vaca3.map vaca3.map vaca3.patch
  429. "%bspatch%" vaca4.map vaca4.map vaca4.patch
  430. "%bspatch%" vaca5.map vaca5.map vaca5.patch
  431. "%bspatch%" vaca6.map vaca6.map vaca6.patch
  432. "%bspatch%" vaca7.map vaca7.map vaca7.patch
  433. "%bspatch%" vacasl.map vacasl.map vacasl.patch
  434. "%bspatch%" vacadm1.map vacadm1.map vacadm1.patch
  435. "%bspatch%" vacadm2.map vacadm2.map vacadm2.patch
  436. "%bspatch%" vacadm3.map vacadm3.map vacadm3.patch
  437. "%bspatch%" vacadm4.map vacadm4.map vacadm4.patch
  438. if exist vacapatch*.h266 del /f /q vacapatch*.h266
  439. if exist vacaflag*.h266 del /f /q vacaflag*.h266
  440. echo Do not delete this file! You will be forced to reinstall Vaca+ and repatch the maps. >vacaflag_%addonver%.h266
  441. attrib +r vacaflag_%addonver%.h266
  442. echo.
  443. echo Patching complete!
  444. :scanning
  445. chdir "%exedir%"
  446. echo.
  447. echo Scanning directory for potential problems.
  448. if exist vaca1.mhk goto mhkfound
  449. if exist vaca2.mhk goto mhkfound
  450. if exist vaca3.mhk goto mhkfound
  451. if exist vaca4.mhk goto mhkfound
  452. if exist vaca5.mhk goto mhkfound
  453. if exist vaca6.mhk goto mhkfound
  454. if exist vaca7.mhk goto mhkfound
  455. if exist vacasl.mhk goto mhkfound
  456. if exist vacadm1.mhk goto mhkfound
  457. if exist vacadm2.mhk goto mhkfound
  458. if exist vacadm3.mhk goto mhkfound
  459. if exist vacadm4.mhk goto mhkfound
  460. if exist dcava0r.mhk goto mhkfound
  461. if exist dcava1.mhk goto mhkfound
  462. if exist _vacazoo.mhk goto mhkfound
  463. :mhkfound_done
  464. if exist TILES000.ART goto artfound
  465. if exist TILES003.ART goto artfound
  466. if exist TILES005.ART goto artfound
  467. if exist TILES006.ART goto artfound
  468. if exist TILES007.ART goto artfound
  469. if exist TILES008.ART goto artfound
  470. if exist TILES009.ART goto artfound
  471. if exist TILES010.ART goto artfound
  472. if exist TILES012.ART goto artfound
  473. if exist TILES014.ART goto artfound
  474. :artfound_done
  475. call :checksum 3d5092d053b23a823c1fa0ad0b0bdbc33b2a09bb DEFS.CON "VACA15 file detected and neutralized:"
  476. call :checksum 807aaf21edd6e315bcb76dd54450f28616f84609 GAME.CON "VACA15 file detected and neutralized:"
  477. call :checksum 6d29c3b19d26ff84edb104e68120edc5150066dd USER.CON "VACA15 file detected and neutralized:"
  478. call :checksum 856374f3b42a1f2e355730ffc70497a3e6a49585 BEACHBAB.CON "VACA15 file detected and neutralized:"
  479. call :checksum efb8168c6351d4b5e2c108ebc8189d4aba85ef35 BEACHBAL.CON "VACA15 file detected and neutralized:"
  480. call :checksum a947947409a76ea7e6c46076a8cfbaa76f8b0172 BEACHBTH.CON "VACA15 file detected and neutralized:"
  481. call :checksum 3c11b9d40a204849c2d7d6c10984397f3b6a444c DRAGON.CON "VACA15 file detected and neutralized:"
  482. call :checksum 1417476e2cd8a3aef85dd9c1f36308f2123d8b54 SEAGULL.CON "VACA15 file detected and neutralized:"
  483. call :checksum 0c1314dcd983b232f6afb941942e1ccbd7331ebb SOUNDS.CON "VACA15 file detected and neutralized:"
  484. call :checksum 032a25b2cd98e19a5ff9a859ac27c91a4abfcb46 USER.CON "VACAPP file detected and neutralized:"
  485. call :checksum 34ed9d27095d547e20fb9db87957d17ca9cb2046 DEFS.CON "VACA13 file detected and neutralized:"
  486. call :checksum 3480ad8caca150b7c4678a42a606c0d9941db631 GAME.CON "VACA13 file detected and neutralized:"
  487. call :checksum 74feb12ecfa57cb4c8e151593bff89e06b1ae11e USER.CON "VACA13 file detected and neutralized:"
  488. call :checksum 840d701ca5e1e590ff03510eb5d63880f3e5be79 BEACHBAB.CON "VACA13 file detected and neutralized:"
  489. call :checksum f4c7080384dde2f298e807b1bc9901e6e61ac617 BEACHBAL.CON "VACA13 file detected and neutralized:"
  490. call :checksum 9965ae6e6b4337d06e1df22b41592b4cdfb69b2f BEACHBTH.CON "VACA13 file detected and neutralized:"
  491. call :checksum d56a1ff075671d0919540086a062b37290113621 DRAGON.CON "VACA13 file detected and neutralized:"
  492. call :checksum 06be81473bad004296324b2d63f4730ac2160aa6 SEAGULL.CON "VACA13 file detected and neutralized:"
  493. call :checksum ef149cd90764bae685d9fab83eb2fe719486dce3 SOUNDS.CON "VACA13 file detected and neutralized:"
  494. if exist Vacation.con goto confound
  495. if exist VacaEDuke.con goto confound
  496. if exist VacaDefs.con goto confound
  497. if exist VacaUser.con goto confound
  498. if exist VacaDP.con goto confound
  499. if exist VacaDPCode.con goto confound
  500. if exist VacaDPXXX.con goto confound
  501. if exist VSounds.con goto confound
  502. if exist VBeachBabe.con goto confound
  503. if exist VBeachBall.con goto confound
  504. if exist VBeachBather.con goto confound
  505. if exist VDragon.con goto confound
  506. if exist VSeagull.con goto confound
  507. :confound_done
  508. call :conprotect
  509. chdir /d "%addondir%"
  510. echo.
  511. pause
  512. goto restart
  513.  
  514. :conprotect
  515. pushd "%exedir%"
  516. if not exist GAME.CON "%kextract%" DUKE3D.GRP GAME.CON
  517. if not exist DEFS.CON "%kextract%" DUKE3D.GRP DEFS.CON
  518. if not exist USER.CON "%kextract%" DUKE3D.GRP USER.CON
  519. popd
  520. goto :eof
  521.  
  522. :checksum
  523. if not exist "%sha1sum%" (
  524. echo "%sha1sum%" not found.
  525. goto :eof
  526. )
  527. if not exist "%~2" goto :eof
  528. echo %~1 *%~2 | "%sha1sum%" --status --check -
  529. if "%ERRORLEVEL%"=="0" (
  530. ren "%~2" "VacaOld_%addonver%_%~nx2"
  531. echo %~3 %~nx2
  532. )
  533. goto :eof
  534.  
  535. :nopatch
  536. echo.
  537. echo Error: You don't have all the *.patch files in your directory.
  538. echo Aborting installation.
  539. echo Map patching is required for Vaca+ to function correctly.
  540. echo.
  541. pause
  542. goto end
  543.  
  544. :mhkfound
  545. echo.
  546. echo Problematic .mhk files have been found in your directory.
  547. echo Unless you have knowingly made a modification to Vaca's map hacks,
  548. echo the presence of these files in your %exeproper% directory will
  549. echo cause Vaca+ to function incorrectly.
  550. echo.
  551. echo vaca1.mhk
  552. echo vaca2.mhk
  553. echo vaca3.mhk
  554. echo vaca4.mhk
  555. echo vaca5.mhk
  556. echo vaca6.mhk
  557. echo vaca7.mhk
  558. echo vacasl.mhk
  559. echo vacadm1.mhk
  560. echo vacadm2.mhk
  561. echo vacadm3.mhk
  562. echo vacadm4.mhk
  563. echo dcava0r.mhk
  564. echo dcava1.mhk
  565. echo _vacazoo.mhk
  566. goto mhkfound_done
  567.  
  568. :artfound
  569. echo.
  570. echo Problematic .art files have been found in your directory.
  571. echo Unless you have knowingly made a modification to Vaca's art,
  572. echo the presence of these files in your %exeproper% directory will
  573. echo cause Vaca+ to function incorrectly.
  574. echo.
  575. echo TILES000.ART
  576. echo TILES003.ART
  577. echo TILES005.ART
  578. echo TILES006.ART
  579. echo TILES007.ART
  580. echo TILES008.ART
  581. echo TILES009.ART
  582. echo TILES010.ART
  583. echo TILES012.ART
  584. echo TILES014.ART
  585. goto artfound_done
  586.  
  587. :confound
  588. echo.
  589. echo Problematic .con files have been found in your directory.
  590. echo Unless you have knowingly made a modification to Vaca's programming,
  591. echo the presence of these files in your %exeproper% directory will
  592. echo cause Vaca+ to function incorrectly.
  593. echo.
  594. echo Vacation.con
  595. echo VacaEDuke.con
  596. echo VacaDefs.con
  597. echo VacaUser.con
  598. echo VacaDP.con
  599. echo VacaDPCode.con
  600. echo VacaDPXXX.con
  601. echo VSounds.con
  602. echo VBeachBabe.con
  603. echo VBeachBall.con
  604. echo VBeachBather.con
  605. echo VDragon.con
  606. echo VSeagull.con
  607. echo.
  608. echo IF THESE ARE THE ORIGINAL CARIBBEAN CON FILES, OR THEY COME FROM
  609. echo AN OUTDATED VERSION OF VACA+, REMOVE THEM FROM YOUR %exeproper% DIRECTORY
  610. echo IMMEDIATELY!
  611. echo Vaca+ uses modified .con files to fix programming errors created by
  612. echo the original programmers. Due to improvements made to the levels,
  613. echo Vaca+ will have major errors if the included .con files are not used.
  614. goto confound_done
  615.  
  616. :execheck
  617. if exist %exename%.bat goto execheck_done
  618. if exist %exename%.exe goto recheck
  619. set prevdir=%cd%
  620. if not "%cd%"=="%cd:~0,3%" chdir ..
  621. if not "%cd%"=="%prevdir%" goto execheck
  622. echo Warning: You don't have %exeproper% in your directory.
  623. chdir /d "%startdir%"
  624. goto execheck_done
  625.  
  626. :nodir
  627. echo.
  628. echo Error: "vaca_plus" data directory not found.
  629. echo Aborting launch.
  630. echo.
  631. pause
  632. goto end
  633.  
  634. :end
  635. if "%debug%"=="1" echo.
  636. if "%debug%"=="1" pause
  637. echo.
  638. popd
  639. endlocal
  640. title %ComSpec%
  641. color 07
  642.