rem *** Setup tests ***

TESTDIR %1:%4
SPACE %1 18400 NoSpace
GODIR %1:%4 CantCreate

rem *** Start installation ***

echo Copying Startup files ...
rem Install dependant files
copy %2:*.drv					%1:
copy %2:*.hlp					%1:
copy %2:*.txt					%1:
copy %2:install.exe		%1:

rem *** Game specific files ***

COPY %2:VERSION					%1:
COPY %2:SIERRA.EXE			%1:
COPY %2:*.DLL						%1:
COPY %2:SIERRA.ERR			%1:
COPY %2:\VMD\*.VMD			%1:
copy %2:\patches\*.*		%1:
copy %2:demo.dat				%1:

rem *** Copies contents of Resource confiuration file to hard drive. ***

ECHO %3 > RESOURCE.CFG
echo cdSpeed  =2                 >>resource.cfg
echo resAUD   =CD:\              >>resource.cfg
echo resSFX   =CD:\              >>resource.cfg
echo resMAP   =CD:\;%1:%4        >>resource.cfg
echo rescdisc =CD:\              >>resource.cfg
echo robot    =CD:\robots		 	   >>resource.cfg
echo movieDir =%1:%4;CD:\vmd		 >>resource.cfg
echo patchDir =%1:%4;CD:\patches >>resource.cfg
echo CD:      =%2:;              >>resource.cfg

rem *** Create batch files to start

echo @echo off                          		>ramademo.bat
echo cd %1:%4                         			>>ramademo.bat
echo @if exist vesadrv.bat call vesadrv.bat	>>ramademo.bat
echo %1:%4\sierra %1:%4\resource.cfg  			>>ramademo.bat

copy ramademo.bat ..\ramademo.bat
echo cd .. 												>>..\ramademo.bat

rem *** VESA Installation ***
%2:
cd\
vesainst /Vvesa /B%1:%4 /TSIERRA.DIB
%1:

rem *** Installation Complete ***
clear
echo
echo	Rama Demo Installation Complete.
echo
echo	To play NOW:
echo ÿ   At the DOS prompt, 
echo		type RAMADEMO and press [ENTER]
echo
echo	To play LATER:
echo ÿ   From the directory of %1:%4,
echo		type RAMADEMO and press [ENTER]
echo
echo
echo
echo
pause
end

rem *** Error Messages ***

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

:NoSpace
alert 18400 Kilobytes ( 17.89 MegaBytes ) are required on %1:, to install the Rama Demo.
end


