@echo off

REM
REM  PATCH FOR BC3K v1.01 C5 (UK) 
REM

CLS

ECHO To install this patch you must have typed "UPDATE X" where
ECHO X is your CDROM drive letter.
ECHO.
ECHO EXAMPLE:  UPDATE E
ECHO.
ECHO.
ECHO IF YOU DID THIS CORRECTLY, PRESS 1 TO CONTINUE
ECHO IF YOU THINK YOU MADE A MISTAKE, PRESS 2 TO QUIT AND TRY AGAIN.

CHOICE /C12
IF ERRORLEVEL=2 GOTO QUIT
IF ERRORLEVEL=1 GOTO CONT

:CONT
CLS
ECHO YOU CHOSE TO CONTINUE

IF NOT EXIST bc3000ad.exe GOTO NO
IF NOT EXIST bc3kukc5.rtp GOTO ERROR2
             
copy %1:\bc3lib2.res /y
copy %1:\bc3lib3.res /y
copy %1:\bc3lib4.res /y
copy %1:\bc3lib6.res /y

del player*.cmd
del player*.log
del player*.cml

cls
ECHO

ECHO Sorry, but we must now delete all of your saved games.
ECHO If you do NOT delete these files, the patch will not work.
ECHO Please confirm file deletion:

del .\save\player?*.*
IF EXIST .\save\*.* goto error1

PATCH bc3kukc5.rtp

GOTO FINISH

:NO
echo BC3000AD is not installed in this directory!
echo Please locate the correct directory and try again.
echo Update will now exit.
pause
goto exit

:QUIT
CLS
ECHO YOU CHOSE TO EXIT
goto exit

:FINISH
cls
echo Battlecruiser is now updated to v1.01 C5
pause
goto exit

:error1
cls
echo There are still saved game files in your BC3000AD\SAVE directory.
echo These files must be deleted.  Manually delete these files and
echo re-run the update program.
echo Update will now exit.
pause
goto exit

:error2
cls
echo The patch was not found in the Battlecruiser directory.
echo Please copy the patch into the game directory
echo and re-run the update.
echo Update will now exit.
pause
goto exit

:EXIT

