Subversion Repositories vaca_plus

Rev

Rev 13 | Rev 17 | 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 Batch Launcher

set dir=%cd%
set eduke32dir=%~dp0
set vacadir=%~dp0
set vacahrpdir=%~dp0
set vacaver=30
set hrp=
set hrpu=

:title
echo             ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo             º Duke Caribbean: Life's A Beach Plus Batch Launcher º
echo             ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo                               ³ By Hendricks266 ³
echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
echo.
echo You are playing 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.

:recheck
if not exist eduke32.exe goto eduke32check
:eduke32check_done
set eduke32dir=%cd%
if "%debug%"=="1" echo DEBUG: EDuke32 Directory: "%eduke32dir%"

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 vacahrpdir=%cd%
:vacadircheck
if exist VACATION.PRG ren VACATION.PRG vacation.grp
cd vaca_plus
set vacadir=%cd%
if exist vacation\ set vacahrpdir=%cd%
if exist vaca_plus\ goto vacadircheck
if "%debug%"=="1" echo DEBUG: Vaca+ Directory: "%vacadir%".
if "%debug%"=="1" echo DEBUG: VacaHRP Directory: "%vacahrpdir%".

if not exist "%vacadir%\VACATION.GRP" (
if exist "%eduke32dir%\VACATION.GRP" (
move /y "%eduke32dir%\VACATION.GRP" "%vacadir%\"
ren "%vacadir%\VACATION.GRP" vacation.grp
) else (
goto novacagrp
)
)

:novacagrp_done
if not exist vacaflag%vacaver%.h266 goto extract
if not exist vaca1.map goto extract
if not exist vaca2.map goto extract
if not exist vaca3.map goto extract
if not exist vaca4.map goto extract
if not exist vaca5.map goto extract
if not exist vaca6.map goto extract
if not exist vaca7.map goto extract
if not exist vacadm1.map goto extract
if not exist vacadm2.map goto extract
if not exist vacadm3.map goto extract
if not exist vacadm4.map goto extract
if not exist vacasl.map goto extract
cd "%eduke32dir%"
echo.
echo.
echo.
echo.

:init
pause
echo.
goto check

:check

if exist duke3d_hrp.zip set hrp=-gduke3d_hrp.zip
if exist hrp_update.zip set hrpu=-ghrp_update.zip

echo.
echo Launching Duke Nukem 3D . . .
echo Thanks for playing!
echo.
echo Please do not close this window.
echo It will close automatically.

::if exist *.art ren *.art *.abk

set args=-xVacaEDuke.con -hvacation.def
if exist "%vacadir%" set args=%args% -j"%vacadir:\=/%"
if exist "%vacahrpdir%" set args=%args% -j"%vacahrpdir:\=/%"
set args=%args% -gvacation.grp %hrp% %hrpu% %*

set exe=eduke32
if "%debug%"=="1" set exe=eduke32.debug

if exist %exe%.bat (
call %exe%.bat %args%
) else (
start %exe%.exe %args%
)

::if exist *.abk ren *.abk *.art

goto end

:noduke
echo.

echo Aborting launch.
echo.
pause
goto end

:novacagrp
echo.
echo Error: You don't have VACATION.GRP in your directory.
echo.
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.
: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
goto novacagrp_done

:cdno
echo '%cddrive%' is not valid.  Please try again.
goto retry

:cdw
echo '%cddrive%' is not the correct disc.  Please try again.
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%".
..\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%".
..\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%".
..\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 DUKETEAM.ANM RADLOGO.ANM
..\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

:extract
echo.
echo              ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo              º Duke Caribbean: Life's A Beach Plus Installation º
echo              ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo                               ³ By Hendricks266 ³
echo                               ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
echo.
if not exist vaca1.ips goto noips
if not exist vaca2.ips goto noips
if not exist vaca3.ips goto noips
if not exist vaca4.ips goto noips
if not exist vaca5.ips goto noips
if not exist vaca6.ips goto noips
if not exist vaca7.ips goto noips
if not exist vacasl.ips goto noips
if not exist vacadm1.ips goto noips
if not exist vacadm2.ips goto noips
if not exist vacadm3.ips goto noips
if not exist vacadm4.ips goto noips
md vaca_preserve
if exist vaca*.map move /y vaca*.map vaca_preserve\
if exist "%eduke32dir%\vaca*.map" move /y "%eduke32dir%\vaca*.map" vaca_preserve\
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
utils\windows\win32\uips.exe a vaca1.ips vaca1.map
utils\windows\win32\uips.exe a vaca2.ips vaca2.map
utils\windows\win32\uips.exe a vaca3.ips vaca3.map
utils\windows\win32\uips.exe a vaca4.ips vaca4.map
utils\windows\win32\uips.exe a vaca5.ips vaca5.map
utils\windows\win32\uips.exe a vaca6.ips vaca6.map
utils\windows\win32\uips.exe a vaca7.ips vaca7.map
utils\windows\win32\uips.exe a vacasl.ips vacasl.map
utils\windows\win32\uips.exe a vacadm1.ips vacadm1.map
utils\windows\win32\uips.exe a vacadm2.ips vacadm2.map
utils\windows\win32\uips.exe a vacadm3.ips vacadm3.map
utils\windows\win32\uips.exe a vacadm4.ips vacadm4.map
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%vacaver%.h266
attrib +r vacaflag%vacaver%.h266
echo.
echo Patching complete!
:scanning
cd "%eduke32dir%"
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
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
echo.
pause
goto restart

:noips
echo.
echo Error: You don't have all the *.ips 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 EDuke32 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 EDuke32 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 EDuke32 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 EDUKE32 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

:eduke32check
if exist eduke32.bat goto eduke32check_done
if exist ..\eduke32.exe (
cd ..
goto recheck
)
if exist ..\..\eduke32.exe (
cd ..\..
goto recheck
)
if exist ..\..\..\eduke32.exe (
cd ..\..\..
goto recheck
)
if exist ..\eduke32.bat (
cd ..
goto eduke32check_done
)
if exist ..\..\eduke32.bat (
cd ..\..
goto eduke32check_done
)
if exist ..\..\..\eduke32.bat (
cd ..\..\..
goto eduke32check_done
)
echo Warning: You don't have EDuke32 in your directory.
goto eduke32check_done

:nodir
echo.
echo Error: "vaca_plus" data directory not found.
echo Aborting launch.
echo.
pause
goto end

:end
echo.
@color 07
@title %ComSpec%
cd %dir%