color 0C
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
:restart
title Duke Caribbean: Life's A Beach Plus Launcher
if "
%editor%"=="1"
title Duke Caribbean: Life's A Beach Plus Editor Launcher
set addonhrpdir=
%startdir%
)
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º Duke Caribbean: Life's A Beach Plus º
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
if "
%xxx%"=="1"
echo Using XXX mode.
if "
%dp%"=="1"
echo Using Duke Plus by DeeperThought.
if "
%debug%"=="1"
echo Using debug mode.
if "
%debug%"=="1"
echo DEBUG: Command Line Input:
%*
:recheck
:execheck_done
if "
%debug%"=="1"
echo DEBUG:
%exeproper% Directory: "
%exedir%"
if not exist duke3d.grp
echo Warning: You don't have Duke3D.grp
in your directory.
:addondircheck
if exist VACATION.PRG
ren VACATION.PRG vacation.grp
if "
%debug%"=="1"
echo DEBUG: Vaca+ Directory: "
%addondir%".
if "
%debug%"=="1"
echo DEBUG: VacaHRP Directory: "
%addonhrpdir%".
set kextract=
%addondir%\utils\windows\win32\kextract.exe
if "
%debug%"=="1"
set kextract=
%addondir%\utils\windows\win32\kextract.debug.exe
set kgroup=
%addondir%\utils\windows\win32\kgroup.exe
if "
%debug%"=="1"
set kgroup=
%addondir%\utils\windows\win32\kgroup.debug.exe
set unpackssi=
%addondir%\utils\windows\win32\unpackssi.exe
if "
%debug%"=="1"
set unpackssi=
%addondir%\utils\windows\win32\unpackssi.debug.exe
set bspatch=
%addondir%\utils\windows\win32\bspatch.exe
set sha1sum=
%addondir%\utils\windows\win32\sha1sum.exe
if "
%vacagrpname%"==""
set vacagrpname=vacation.grp
if exist vacation.grp
ren vacation.grp vacation.grp
:novacagrp_return
if not "
%version%"=="demo"
(
)
:init
:check
echo Launching Duke Nukem 3D . . .
type "%exedir%\names.h" > "%exedir%\VacaNames.h"
echo.
>> "
%exedir%\VacaNames.h"
type "%addondir%\VacaNames.def" >> "%exedir%\VacaNames.h"
)
:arguments
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% -g
%vacagrpname% -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
if "
%dp%"=="1"
set args=
%args% -jDukePlus
if "
%debug%"=="1"
set exe=
%exename%.debug
if "
%debug%"=="1"
echo DEBUG: Final Command Line:
call %exe%.bat
%args%
if "
%debug%"=="1"
echo DEBUG: Final Command Line: start
%exe%.exe
%args%
start %exe%.exe %args%
)
if "
%svnpath%"=="0"
if exist "
%startdir%\svn\bin\svn.exe"
set svnpath=
%startdir%\svn\bin
if "
%svnpath%"=="0"
if exist "
%exedir%\svn\bin\svn.exe"
set svnpath=
%exedir%\svn\bin
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
:svn_action
set PATH=
%PATH%;
%svnpath%
for /f "delims="
%%a in ('svnversion.exe .'
) do @set oldrev=
%%a
if "
%oldrev%"=="exported"
goto :
eof
if "
%oldrev%"=="Unversioned directory"
goto :
eof
"svn.exe" update
for /f "delims="
%%a in ('svnversion.exe .'
) do @set rev=
%%a
set /a oldrev=
%oldrev% + 1
"svn.exe" log -r %oldrev%:%rev%
:novacagrp
echo Error: You don't have VACATION.GRP
in your directory.
:retry
set /p cddrive=What is the drive letter that your Caribbean
CD is
in?
if not '
%cddrive%'==''
set cddrive=
%cddrive:~0,1%
if exist %cddrive%:\VACATION\VACA13.SSI
copy %cddrive%:\VACATION\*.SSI .\
&& goto ssicheck
if exist %cddrive%:\VACATION\VACATION\VACA13.SSI
copy %cddrive%:\VACATION\VACATION\*.SSI .\
&& goto ssicheck
if exist %cddrive%:\CARIBBEA\VACA13.SSI
copy %cddrive%:\CARIBBEA\VACATION\*.SSI .\
&& goto ssicheck
if exist %cddrive%:\CARIBBEAN\VACA13.SSI
copy %cddrive%:\CARIBBEAN\VACATION\*.SSI .\
&& goto ssicheck
:cdno
echo '
%cddrive%' is
not valid. Please try again.
:cdwrong
echo '
%cddrive%' is
not the correct disc. Please try again.
:ssicheck
echo You don't have the SSI files
in your directory.
:ssi1
echo You
do have the Caribbean SSI file
in this directory, but it has
not been
echo extracted. It will now be unpacked.
if "
%debug%"=="1"
echo DEBUG: Changing directory to "
%cd%".
"%unpackssi%" ..\VACA15.SSI
if exist VACATION.PRG
move /y VACATION.PRG ..\vacation.grp
if "
%debug%"=="1"
echo DEBUG: Changing directory to "
%cd%".
)
echo Contact Hendricks266
for help.
)
:ssi2
echo You
do have the Caribbean SSI file
in this directory, but it has
not been
echo extracted. It will now be unpacked.
if "
%debug%"=="1"
echo DEBUG: Changing directory to "
%cd%".
"%unpackssi%" ..\VACAPP.SSI
if exist VACATION.PRG
move /y VACATION.PRG ..\vacation.grp
if "
%debug%"=="1"
echo DEBUG: Changing directory to "
%cd%".
)
echo Contact Hendricks266
for help.
)
:ssi3
echo You
do have the Caribbean SSI file
in this directory, but it has
not been
echo extracted. It will now be unpacked.
if "
%debug%"=="1"
echo DEBUG: Changing directory to "
%cd%".
"%unpackssi%" ..\VACA13.SSI
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 DUKETEAM.ANM RADLOGO.ANM
"%kgroup%" vacation.grp *.ART *.SCP *.map *.MID *.ANM *.VOC *.DMO CARIB.EXE
if exist vacation.grp
move /y vacation.grp ..\vacation.grp
if "
%debug%"=="1"
echo DEBUG: Changing directory to "
%cd%".
)
echo Contact Hendricks266
for help.
)
:novacagrp_done
type DVINTRO.TXT
call :
grpchecksum_results
:grpchecksum
)
echo ea0a9a77b9aee6edce76afa19eaea3a810fb2390 *
%vacagrpname% | "
%sha1sum%" --status --check -
if "
%ERRORLEVEL%"=="1"
set version=unknown
: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.
:mapextract
echo Extracted maps
not found or patched. Proceeding to installation.
:updateextract
echo Map patch update required. Proceeding to installation.
:extract
call :
grpchecksum_results
if exist "
%exedir%\vaca*.map"
move /y "
%exedir%\vaca*.map" vaca_preserve\
"%kextract%" vacation.grp VACA*.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
echo Map patching will now begin.
"%bspatch%" vaca1.map vaca1.map vaca1.patch
"%bspatch%" vaca2.map vaca2.map vaca2.patch
"%bspatch%" vaca3.map vaca3.map vaca3.patch
"%bspatch%" vaca4.map vaca4.map vaca4.patch
"%bspatch%" vaca5.map vaca5.map vaca5.patch
"%bspatch%" vaca6.map vaca6.map vaca6.patch
"%bspatch%" vaca7.map vaca7.map vaca7.patch
"%bspatch%" vacasl.map vacasl.map vacasl.patch
"%bspatch%" vacadm1.map vacadm1.map vacadm1.patch
"%bspatch%" vacadm2.map vacadm2.map vacadm2.patch
"%bspatch%" vacadm3.map vacadm3.map vacadm3.patch
"%bspatch%" vacadm4.map vacadm4.map vacadm4.patch
if exist vacapatch*.h266
del /f /q vacapatch*.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
:scanning
echo Scanning directory
for potential problems.
:mhkfound_done
: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:"
:confound_done
:checksum
)
echo %~1 *
%~2 | "
%sha1sum%" --status --check -
ren "
%~2" "VacaOld_
%addonver%_
%~nx2"
)
:nopatch
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.
:mhkfound
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.
:artfound
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.
:confound
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 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 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.
:execheck
echo Warning: You don't have
%exeproper% in your directory.
:nodir
echo Error: "vaca_plus" data directory
not found.
:end
color 07