Subversion Repositories vaca_plus

Rev

Rev 17 | Rev 19 | 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

set dir=%cd%
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=r001

: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
) )

:novacagrp_done
if not exist vacaflag_%addonver%.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 "%exedir%"
echo.
echo.
echo.
echo.
echo.


:init
pause
echo.
goto check

:check

echo.
echo Launching Duke Nukem 3D . . .
echo Thanks for %action%^!

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 polymer_hrp\ set args=%args% -jpolymer_hrp
if exist duke3d_voxel.zip set args=%args% -gduke3d_voxel.zip
if exist duke3d_hrp.zip set args=%args% -gduke3d_hrp.zip
if exist hrp_update.zip set args=%args% -ghrp_update.zip
if exist maphacks.zip set args=%args% -gmaphacks.zip
if exist eduke32_mus.zip set args=%args% -geduke32_mus.zip
if exist "%addondir%" set args=%args% -j"%addondir:\=/%"
if exist "%addonhrpdir%" set args=%args% -j"%addonhrpdir:\=/%"
set args=%args% -gvacation.grp -hvacation.def
if "%editor%"=="1" set args=%args% -namesfile VacaNames.h
if not "%editor%"=="1" set args=%args% -xVacaEDuke.con
if "%dp%"=="1" (
set args=%args% -hvaca_dp.def
if not "%editor%"=="1" set args=%args% -xVacaDP.con
)
if "%xxx%"=="1" (
if exist xxx_lite.zip set args=%args% -gxxx_lite.zip
if exist xxx_pack.zip set args=%args% -gxxx_pack.zip
set args=%args% -hvaca_xxx.def
if "%dp%"=="1" (
set args=%args% -hvaca_dp_xxx.def
if not "%editor%"=="1" set args=%args% -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%
)

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                                º Installation º
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 "%exedir%\vaca*.map" move /y "%exedir%\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_%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
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 %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 editor=0
set xxx=0
set dp=0
set debug=0
cd %dir%
@title %ComSpec%
@color 07