clear
space %1: 8000 NoSpace
godir %1:%4 CantCreate

echo Copying Startup Files ...
copy %2:version
copy %2:*.*

rem  Create batch files on the fly and copy it to the root dir
rem if exist %2:sciv.exe echo sciv > sierra.bat
rem if exist %2:beta.exe echo beta > sierra.bat
rem if exist %2:sierra.exe echo sierra > sierra.bat
echo cd %4 > slater.bat
echo call sierra -w 0 0 200 320 >> slater.bat
echo cd .. >> slater.bat
copy slater.bat ..

echo %3 > resource.cfg

echo Copying Game files...
rem Earl - copy resource.000 + %2:resource.001
rem Earl - copy resource.000 + %2:resource.002

rem Earl - echo Please wait - decompressing audio.
rem Earl - echo This should take a few minutes.
rem Earl - %2:auddcomp .\ %2: > nul
rem Earl - rem %2:auddcomp .\ %2: -d

if ERRORLEVEL 1 goto AudError

rem  copy debug script if it's there
if exist %2:98.* copy %2:98.*

:exit
clear
echo
echo ˙To play NOW:
echo ˙   Type SLATER [ENTER].
echo
echo ˙To play LATER:
echo ˙   From the directory of %1:%4,
echo ˙   Type SLATER and press [ENTER].
echo
pause
goto Exit2


:NoSpace
clear
echo
echo There is not enough space on %1: to install 
echo        Slater and Charlie
echo 8.0 megabytes of disk space are necessary.
echo
pause


:Exit2
end


:CantCreate
alert Unable to create directory %1:%4
end

:AudError
Alert AUDIO DECOMPERSSION FAILED!
end


