clear
space %1: 9300 NoSpace
godir %1:%4 CantCreate
echo COPYING DRIVER FILES & GAME FILE PART 1
if exist resource.000 del resource.000
if exist resource.aud del resource.aud
copy %2:\dosonly\*.*
copy %2:\both\*.*

rem  Create batch files on the fly and copy it to the root dir
if exist %2:\dosonly\sciv.exe echo sciv > sierra.bat
if exist %2:\dosonly\beta.exe echo beta > sierra.bat
if exist %2:\dosonly\sierra.exe echo sierra > sierra.bat
echo cd %4 > Pepper.bat
echo call sierra >> Pepper.bat
copy Pepper.bat %1:\

echo %3 > resource.cfg

exists %2:\disk2 Please insert the disk labeled "Disk 2" in drive %2:
echo ADDING GAME FILE PART 2
copy resource.000 + %2:\both\resource.000
exists %2:\disk3 Please insert the disk labeled "Disk 3" in drive %2:
echo ADDING GAME FILE PART 3
copy resource.000 + %2:\both\resource.000
exists %2:\disk4 Please insert the disk labeled "Disk 4" in drive %2:
echo ADDING GAME FILE PART 4
copy resource.000 + %2:\both\resource.000
exists %2:\disk5 Please insert the disk labeled "Disk 5" in drive %2:
echo ADDING GAME FILE PART 5
copy resource.000 + %2:\both\resource.000
echo PLEASE WAIT - DECOMPRESSING AUDIO
echo THIS SHOULD TAKE A FEW MINUTES
%2:\dcompaud .\ %2:\both > NULL

if ERRORLEVEL 1 goto ERROR

clear
echo

echo To play "Pepper's Adventures In Time" now:
echo   Type Pepper [ENTER]
echo
echo To play later:
echo   From the directory of %1:%4,
echo   type Pepper [ENTER]
echo

pause
goto Exit2


:NoSpace
clear
echo
echo You do not have enough disk space in %1,
echo to install Pepper's Adventures in Time!
echo 9.5 Meg. of free disk space is required.
echo
pause

:Exit2
end

:CantCreate
alert Cannot create directory %1:%4
end

:ERROR
Alert AUDIO DECOMPRESSION FAILED
end


