clear
godir %1:%4 cantcreate

clear
space %1: 500 nospace

echo Copying files to %1:%4 ...
copy %2:\vesatest.exe %1:
copy %2:install.exe %1:
copy %2:install.scr %1:
copy %2:install.txt %1:
copy %2:install.hlp %1:
copy %2:*.drv %1:
rem copy %2:\patches\*.* %1: /q
copy %2:version %1:
copy %2:sq6demo.bat
echo vesatest.exe >>sq6demo.bat
echo if errorlevel == 1 goto noVesa >>sq6demo.bat
echo set sdrive=%2:>> sq6demo.BAT 
echo set sdir=%2:\sq6demo>> sq6demo.BAT 
echo set ddrive=%1:>> sq6demo.BAT 
echo set ddir=%1:%4>> sq6demo.BAT 
echo set dgame=sq6demo>> sq6demo.BAT 
echo GOTO checkCD>> sq6demo.BAT 
echo :noVesa >> sq6demo.bat
echo echo A VESA driver was not found on your system. Please rerun install >>sq6demo.bat
echo echo and check the readme file for help on installing a VESA driver. >>sq6demo.bat
echo :end>> sq6demo.BAT 
echo %1:>> sq6demo.BAT 
echo set sdrive=>> sq6demo.BAT 
echo set sdir=>> sq6demo.BAT 
echo set ddrive=>> sq6demo.BAT 
echo set dgame=>> sq6demo.BAT 
echo set ddir=>> sq6demo.BAT 

clear
echo %3 >resource.cfg
echo resAUD=%2:   >> resource.cfg
echo resSFX=%2: >> resource.cfg
echo patchDir=%1:%4;%2:;%2:\AVI >>resource.cfg

cd ..
cls
echo
echo ˙To play the Space Quest 6 demo now:
echo ˙   At the DOS prompt, 
echo      type sq6demo and press [ENTER].
echo
echo ˙To play the Space Quest 6 demo later:
echo ˙   From the directory of %1:%4,
echo ˙   Type sq6demo and press [ENTER].
echo
pause
goto quit

:cantcreate
alert Unable to create directory %1:%4
pause
goto quit

:nospace
cls
echo
echo There is not enough space on %1: to install. 
echo At least 1 Megabyte of disk space is necessary for
echo installing the game.
echo
pause

:quit
end

