Rev 38 | Rev 40 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
@echo off
@color 0C
:restart
title Duke Caribbean: Life's A Beach Plus Launcher
if "%editor%"=="1" title Duke Caribbean: Life's A Beach Plus Editor Launcher
pushd .
set exedir=%~dp0
set addondir=%~dp0
set addonhrpdir=%~dp0
set exename=eduke32
set exeproper=EDuke32
set action=playing
if "%editor%"=="1" (
set exename=mapster32
set exeproper=Mapster32
set action=editing
)
set addonver=r004
:title
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º Duke Caribbean: Life's A Beach Plus º
echo ÈÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍͼ
echo ³ By Hendricks266 ³
echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
echo.
echo You are %action% Sunstorm Interactive's Duke Caribbean: Life's A Beach with the
echo various enhancements of Duke Caribbean: Life's A Beach Plus, maintained by
echo Hendricks266.
echo.
if "%xxx%"=="1" echo Using XXX mode.
if "%dp%"=="1" echo Using Duke Plus by DeeperThought.
if "%debug%"=="1" echo Using debug mode.
:recheck
if not exist %exename%.exe goto execheck
:execheck_done
set exedir=%cd%
if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%"
if not exist vaca_plus\ goto nodir
if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory.
if exist vacation\ set addonhrpdir=%cd%
:addondircheck
if exist VACATION.PRG ren VACATION.PRG vacation.grp
cd vaca_plus
set addondir=%cd%
if exist vacation\ set addonhrpdir=%cd%
if exist vaca_plus\ goto addondircheck
if "%debug%"=="1" echo DEBUG: Vaca+ Directory: "%addondir%".
if "%debug%"=="1" echo DEBUG: VacaHRP Directory: "%addonhrpdir%".
if not exist "%addondir%\VACATION.GRP" (
if exist "%exedir%\VACATION.GRP" (
move /y "%exedir%\VACATION.GRP" "%addondir%\"
ren "%addondir%\VACATION.GRP" vacation.grp
) else (
goto novacagrp
) )
call :grpchecksum
:novacagrp_return
if not "%version%"=="demo" (
if not exist vaca1.map goto mapextract
if not exist vaca2.map goto mapextract
if not exist vaca3.map goto mapextract
if not exist vaca4.map goto mapextract
if not exist vaca5.map goto mapextract
if not exist vaca6.map goto mapextract
if not exist vaca7.map goto mapextract
if not exist vacasl.map goto mapextract
if not exist vacadm1.map goto mapextract
if not exist vacadm2.map goto mapextract
if not exist vacadm3.map goto mapextract
if not exist vacadm4.map goto mapextract
if not exist vacaflag_%addonver%.h266 goto updateextract
)
cd "%exedir%"
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
:init
pause
echo.
goto check
:check
echo.
echo Launching Duke Nukem 3D . . .
echo Thanks for %action%^!
echo.
if "%editor%"=="1" (
type "%exedir%\names.h" > "%exedir%\VacaNames.h"
echo. >> "%exedir%\VacaNames.h"
type "%addondir%\VacaNames.def" >> "%exedir%\VacaNames.h"
)
:arguments
set args=
if exist "%exedir%\HRP\" set args=%args% -jHRP
if exist "%exedir%\polymer_hrp\" set args=%args% -jpolymer_hrp
if exist "%exedir%\duke3d_voxel.zip" set args=%args% -gduke3d_voxel.zip
if exist "%exedir%\duke3d_hrp.zip" set args=%args% -gduke3d_hrp.zip
if exist "%exedir%\hrp_update.zip" set args=%args% -ghrp_update.zip
if exist "%exedir%\maphacks.zip" set args=%args% -gmaphacks.zip
if exist "%exedir%\eduke32_mus.zip" set args=%args% -geduke32_mus.zip
if exist "%addondir%" if not "%addondir%"=="%exedir%" set args=%args% -j"%addondir:\=/%"
if exist "%addonhrpdir%" if not "%addonhrpdir%"=="%exedir%" if not "%addonhrpdir%"=="%addondir%" set args=%args% -j"%addonhrpdir:\=/%"
set args=%args% -gvacation.grp -hvacation.def -xVacaEDuke.con
if "%editor%"=="1" set args=%args% -namesfile VacaNames.h
if "%dp%"=="1" set args=%args% -hvaca_dp.def -xVacaDP.con
if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -gxxx_lite.zip
if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -jxxx_lite
if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -gxxx_pack.zip
if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -jxxx_pack
if "%xxx%"=="1" set args=%args% -hvaca_xxx.def
if "%xxx%"=="1" if "%dp%"=="1" set args=%args% -hvaca_dp_xxx.def -xVacaDPXXX.con
set args=%args% %*
if "%dp%"=="1" set args=%args% -jDukePlus
set exe=%exename%
if "%debug%"=="1" set exe=%exename%.debug
if exist %exe%.bat (
call %exe%.bat %args%
) else (
start %exe%.exe %args%
)
set svnpath=0
if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin
if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
cd /d "%addondir%"
if not "%svnpath%"=="0" if exist ".svn" svn update
cd /d "%addonhrpdir%"
if not "%svnpath%"=="0" if exist ".svn" svn update
set svnpath=
goto end
:novacagrp
echo.
echo Error: You don't have VACATION.GRP in your directory.
echo.
goto ssicheck
:retry
echo.
set cddrive=
set /p cddrive=What is the drive letter that your Caribbean CD is in?
echo.
if not '%cddrive%'=='' set cddrive=%cddrive:~0,1%
if '%cddrive%'=='' goto cdno
if not exist %cddrive%:\ goto cdno
if not exist %cddrive%:\* goto cdno
if not exist %cddrive%:\VACATION\VACA13.SSI goto cdw
copy %cddrive%:\VACATION\*.SSI .\
echo.
type DVINTRO.TXT
echo.
pause
goto ssicheck
:cdno
echo '%cddrive%' is not valid. Please try again.
goto retry
:cdw
echo '%cddrive%' is not the correct disc. Please try again.
goto retry
:ssicheck
if exist VACA15.SSI goto ssi1
if exist VACAPP.SSI goto ssi2
if exist VACA13.SSI goto ssi3
echo You don't have the SSI files in your directory.
goto retry
:ssi1
echo You do have the Caribbean SSI file in this directory, but it has not been
echo extracted. It will now be unpacked.
echo.
pause
md vaca15ssi
cd vaca15ssi
if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
"%addondir%\utils\windows\win32\unpackssi.exe" ..\VACA15.SSI
move /y VACATION.PRG ..\vacation.grp
cd ..
if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
rd /s /q vaca15ssi
goto novacagrp_done
:ssi2
echo You do have the Caribbean SSI file in this directory, but it has not been
echo extracted. It will now be unpacked.
echo.
pause
md vacappssi
cd vacappssi
if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
"%addondir%\utils\windows\win32\unpackssi.exe" ..\VACAPP.SSI
move /y VACATION.PRG ..\vacation.grp
cd ..
if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
rd /s /q vacappssi
goto novacagrp_done
:ssi3
echo You do have the Caribbean SSI file in this directory, but it has not been
echo extracted. It will now be unpacked.
echo.
pause
md vaca13ssi
cd vaca13ssi
if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
"%addondir%\utils\windows\win32\unpackssi.exe" ..\VACA13.SSI
ren *.TRA *.ART
ren *.PCS *.SCP
ren VACA1.MAP vaca1.map
ren VACA2.MAP vaca2.map
ren VACA3.MAP vaca3.map
ren VACA4.MAP vaca4.map
ren VACA5.MAP vaca5.map
ren VACA6.MAP vaca6.map
ren VACA7.MAP vaca7.map
ren VACASL.MAP vacasl.map
ren VACADM1.MAP vacadm1.map
ren VACADM2.MAP vacadm2.map
ren VACADM3.MAP vacadm3.map
ren VACADM4.MAP vacadm4.map
ren *.NOC *.CON
ren *.DIM *.MID
ren *.MNA *.ANM
ren *.COV *.VOC
ren *.OMD *.DMO
ren GAME.CON VACAGAME.CON
ren USER.CON VACAUSER.CON
ren DEFS.CON VACADEFS.CON
ren DUKETEAM.ANM RADLOGO.ANM
"%addondir%\utils\windows\win32\kgroup.exe" VACATION.GRP *.ART *.SCP *.map *.MID *.ANM *.VOC *.DMO CARIB.EXE
move /y VACATION.GRP ..\vacation.grp
move /y *.map ..\
cd ..
if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%".
rd /s /q vaca13ssi
goto novacagrp_done
:novacagrp_done
call :grpchecksum
call :grpchecksum_results
goto novacagrp_return
:grpchecksum
echo ea0a9a77b9aee6edce76afa19eaea3a810fb2390 *vacation.grp | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
if "%ERRORLEVEL%"=="0" set version=full
if "%ERRORLEVEL%"=="1" set version=unknown
goto :eof
:grpchecksum_results
if "%version%"=="full" echo VACATION.GRP checksum verified.
if "%version%"=="unknown" echo VACATION.GRP checksum does not match. You may have a bad copy.
echo.
goto :eof
:mapextract
echo Extracted maps not found or patched. Proceeding to installation.
goto extract
:updateextract
echo Map patch update required. Proceeding to installation.
goto extract
:extract
echo.
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º Installation º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
call :grpchecksum
call :grpchecksum_results
if not exist vaca1.patch goto nopatch
if not exist vaca2.patch goto nopatch
if not exist vaca3.patch goto nopatch
if not exist vaca4.patch goto nopatch
if not exist vaca5.patch goto nopatch
if not exist vaca6.patch goto nopatch
if not exist vaca7.patch goto nopatch
if not exist vacasl.patch goto nopatch
if not exist vacadm1.patch goto nopatch
if not exist vacadm2.patch goto nopatch
if not exist vacadm3.patch goto nopatch
if not exist vacadm4.patch goto nopatch
md vaca_preserve
if exist vaca*.map move /y vaca*.map vaca_preserve\
if exist "%exedir%\vaca*.map" move /y "%exedir%\vaca*.map" vaca_preserve\
"%addondir%\utils\windows\win32\kextract.exe" VACATION.GRP VACA*.MAP
ren VACA1.MAP vaca1.map
ren VACA2.MAP vaca2.map
ren VACA3.MAP vaca3.map
ren VACA4.MAP vaca4.map
ren VACA5.MAP vaca5.map
ren VACA6.MAP vaca6.map
ren VACA7.MAP vaca7.map
ren VACASL.MAP vacasl.map
ren VACADM1.MAP vacadm1.map
ren VACADM2.MAP vacadm2.map
ren VACADM3.MAP vacadm3.map
ren VACADM4.MAP vacadm4.map
if exist vacapatch*.h266 del /f /q vacapatch*.h266
if exist vacaflag*.h266 del /f /q vacaflag*.h266
echo.
echo Map patching will now begin.
echo.
pause
echo
"%addondir%\utils\windows\win32\bspatch.exe" vaca1.map vaca1.map vaca1.patch
"%addondir%\utils\windows\win32\bspatch.exe" vaca2.map vaca2.map vaca2.patch
"%addondir%\utils\windows\win32\bspatch.exe" vaca3.map vaca3.map vaca3.patch
"%addondir%\utils\windows\win32\bspatch.exe" vaca4.map vaca4.map vaca4.patch
"%addondir%\utils\windows\win32\bspatch.exe" vaca5.map vaca5.map vaca5.patch
"%addondir%\utils\windows\win32\bspatch.exe" vaca6.map vaca6.map vaca6.patch
"%addondir%\utils\windows\win32\bspatch.exe" vaca7.map vaca7.map vaca7.patch
"%addondir%\utils\windows\win32\bspatch.exe" vacasl.map vacasl.map vacasl.patch
"%addondir%\utils\windows\win32\bspatch.exe" vacadm1.map vacadm1.map vacadm1.patch
"%addondir%\utils\windows\win32\bspatch.exe" vacadm2.map vacadm2.map vacadm2.patch
"%addondir%\utils\windows\win32\bspatch.exe" vacadm3.map vacadm3.map vacadm3.patch
"%addondir%\utils\windows\win32\bspatch.exe" vacadm4.map vacadm4.map vacadm4.patch
if exist vacapatch*.h266 del /f /q vacapatch*.h266
if exist vacaflag*.h266 del /f /q vacaflag*.h266
echo Do not delete this file^! You will be forced to reinstall Vaca+ and repatch the maps. >vacaflag_%addonver%.h266
attrib +r vacaflag_%addonver%.h266
echo.
echo Patching complete^!
:scanning
cd "%exedir%"
echo.
echo Scanning directory for potential problems.
if exist vaca1.mhk goto mhkfound
if exist vaca2.mhk goto mhkfound
if exist vaca3.mhk goto mhkfound
if exist vaca4.mhk goto mhkfound
if exist vaca5.mhk goto mhkfound
if exist vaca6.mhk goto mhkfound
if exist vaca7.mhk goto mhkfound
if exist vacasl.mhk goto mhkfound
if exist vacadm1.mhk goto mhkfound
if exist vacadm2.mhk goto mhkfound
if exist vacadm3.mhk goto mhkfound
if exist vacadm4.mhk goto mhkfound
if exist dcava0r.mhk goto mhkfound
if exist dcava1.mhk goto mhkfound
if exist _vacazoo.mhk goto mhkfound
:mhkfound_done
if exist TILES000.ART goto artfound
if exist TILES003.ART goto artfound
if exist TILES005.ART goto artfound
if exist TILES006.ART goto artfound
if exist TILES007.ART goto artfound
if exist TILES008.ART goto artfound
if exist TILES009.ART goto artfound
if exist TILES010.ART goto artfound
if exist TILES012.ART goto artfound
if exist TILES014.ART goto artfound
:artfound_done
call :checksum 3d5092d053b23a823c1fa0ad0b0bdbc33b2a09bb DEFS.CON "VACA15 file detected and neutralized:"
call :checksum 807aaf21edd6e315bcb76dd54450f28616f84609 GAME.CON "VACA15 file detected and neutralized:"
call :checksum 6d29c3b19d26ff84edb104e68120edc5150066dd USER.CON "VACA15 file detected and neutralized:"
call :checksum 856374f3b42a1f2e355730ffc70497a3e6a49585 BEACHBAB.CON "VACA15 file detected and neutralized:"
call :checksum efb8168c6351d4b5e2c108ebc8189d4aba85ef35 BEACHBAL.CON "VACA15 file detected and neutralized:"
call :checksum a947947409a76ea7e6c46076a8cfbaa76f8b0172 BEACHBTH.CON "VACA15 file detected and neutralized:"
call :checksum 3c11b9d40a204849c2d7d6c10984397f3b6a444c DRAGON.CON "VACA15 file detected and neutralized:"
call :checksum 1417476e2cd8a3aef85dd9c1f36308f2123d8b54 SEAGULL.CON "VACA15 file detected and neutralized:"
call :checksum 0c1314dcd983b232f6afb941942e1ccbd7331ebb SOUNDS.CON "VACA15 file detected and neutralized:"
call :checksum 032a25b2cd98e19a5ff9a859ac27c91a4abfcb46 USER.CON "VACAPP file detected and neutralized:"
call :checksum 34ed9d27095d547e20fb9db87957d17ca9cb2046 DEFS.CON "VACA13 file detected and neutralized:"
call :checksum 3480ad8caca150b7c4678a42a606c0d9941db631 GAME.CON "VACA13 file detected and neutralized:"
call :checksum 74feb12ecfa57cb4c8e151593bff89e06b1ae11e USER.CON "VACA13 file detected and neutralized:"
call :checksum 840d701ca5e1e590ff03510eb5d63880f3e5be79 BEACHBAB.CON "VACA13 file detected and neutralized:"
call :checksum f4c7080384dde2f298e807b1bc9901e6e61ac617 BEACHBAL.CON "VACA13 file detected and neutralized:"
call :checksum 9965ae6e6b4337d06e1df22b41592b4cdfb69b2f BEACHBTH.CON "VACA13 file detected and neutralized:"
call :checksum d56a1ff075671d0919540086a062b37290113621 DRAGON.CON "VACA13 file detected and neutralized:"
call :checksum 06be81473bad004296324b2d63f4730ac2160aa6 SEAGULL.CON "VACA13 file detected and neutralized:"
call :checksum ef149cd90764bae685d9fab83eb2fe719486dce3 SOUNDS.CON "VACA13 file detected and neutralized:"
if exist Vacation.con goto confound
if exist VacaEDuke.con goto confound
if exist VacaDefs.con goto confound
if exist VacaUser.con goto confound
if exist VacaDP.con goto confound
if exist VacaDPCode.con goto confound
if exist VacaDPXXX.con goto confound
if exist VSounds.con goto confound
if exist VBeachBabe.con goto confound
if exist VBeachBall.con goto confound
if exist VBeachBather.con goto confound
if exist VDragon.con goto confound
if exist VSeagull.con goto confound
:confound_done
cd /d "%exedir%"
if not exist GAME.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP GAME.CON
if not exist DEFS.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP DEFS.CON
if not exist USER.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP USER.CON
cd /d "%addondir%"
echo.
pause
goto restart
:checksum
if not exist "%~2" goto :eof
echo %~1 *%~2 | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
if "%ERRORLEVEL%"=="0" (
ren "%~2" "VacaOld_%addonver%_%~nx2"
echo %~3 %~nx2
)
goto :eof
:nopatch
echo.
echo Error: You don't have all the *.patch files in your directory.
echo Aborting installation.
echo Map patching is required for Vaca+ to function correctly.
echo.
pause
goto end
:mhkfound
echo.
echo Problematic .mhk files have been found in your directory.
echo Unless you have knowingly made a modification to Vaca's map hacks,
echo the presence of these files in your %exeproper% directory will
echo cause Vaca+ to function incorrectly.
echo.
echo vaca1.mhk
echo vaca2.mhk
echo vaca3.mhk
echo vaca4.mhk
echo vaca5.mhk
echo vaca6.mhk
echo vaca7.mhk
echo vacasl.mhk
echo vacadm1.mhk
echo vacadm2.mhk
echo vacadm3.mhk
echo vacadm4.mhk
echo dcava0r.mhk
echo dcava1.mhk
echo _vacazoo.mhk
goto mhkfound_done
:artfound
echo.
echo Problematic .art files have been found in your directory.
echo Unless you have knowingly made a modification to Vaca's art,
echo the presence of these files in your %exeproper% directory will
echo cause Vaca+ to function incorrectly.
echo.
echo TILES000.ART
echo TILES003.ART
echo TILES005.ART
echo TILES006.ART
echo TILES007.ART
echo TILES008.ART
echo TILES009.ART
echo TILES010.ART
echo TILES012.ART
echo TILES014.ART
goto artfound_done
:confound
echo.
echo Problematic .con files have been found in your directory.
echo Unless you have knowingly made a modification to Vaca's programming,
echo the presence of these files in your %exeproper% directory will
echo cause Vaca+ to function incorrectly.
echo.
echo Vacation.con
echo VacaEDuke.con
echo VacaDefs.con
echo VacaUser.con
echo VacaDP.con
echo VacaDPCode.con
echo VacaDPXXX.con
echo VSounds.con
echo VBeachBabe.con
echo VBeachBall.con
echo VBeachBather.con
echo VDragon.con
echo VSeagull.con
echo.
echo IF THESE ARE THE ORIGINAL CARIBBEAN CON FILES, OR THEY COME FROM
echo AN OUTDATED VERSION OF VACA+, REMOVE THEM FROM YOUR %exeproper% DIRECTORY
echo IMMEDIATELY^!
echo Vaca+ uses modified .con files to fix programming errors created by
echo the original programmers. Due to improvements made to the levels,
echo Vaca+ will have major errors if the included .con files are not used.
goto confound_done
:execheck
if exist %exename%.bat goto execheck_done
if exist ..\%exename%.exe (
cd ..
goto recheck
)
if exist ..\..\%exename%.exe (
cd ..\..
goto recheck
)
if exist ..\..\..\%exename%.exe (
cd ..\..\..
goto recheck
)
if exist ..\%exename%.bat (
cd ..
goto execheck_done
)
if exist ..\..\%exename%.bat (
cd ..\..
goto execheck_done
)
if exist ..\..\..\%exename%.bat (
cd ..\..\..
goto execheck_done
)
echo Warning: You don't have %exeproper% in your directory.
goto execheck_done
:nodir
echo.
echo Error: "vaca_plus" data directory not found.
echo Aborting launch.
echo.
pause
goto end
:end
echo.
set version=
set editor=
set xxx=
set dp=
set debug=
popd
@title %ComSpec%
@color 07