
REM INSTALL.SCR for non-root installs

clear

REM Sierra install script for Torin's Passage

REM %1 = dest drive
REM %2 = src  drive
REM %3 = Chosen drivers
REM %4 = dest dir

:Choose
godir %1:%4 cantcreate

cls

space %1: 4000 nospace

REM The install program is running from 
REM the install directory on the CD
copy %2:..\sierrah.exe					%1:
copy %2:..\sierra.err					%1:
copy %2:bootdisk.exe		%1:
copy %2:install.*			%1:
copy %2:*.drv				%1:
copy %2:checkcd.bat		%1:
copy %2:readme.*			%1:
copy %2:cpuid.exe			%1:
copy %2:dos4gw.exe		%1:
copy %2:hddtec.exe		%1:
copy %2:frog.bmp			%1:
copy %2:resource.cfg		%1:

echo
echo Do you want to test hardware? (y/n)
echo
pick yn TEST SKIPTEST

:TEST
clear
echo 
echo Be sure you have a CD loaded in the CD drive.
echo
pause

cpuid
hddtec

:SKIPTEST
:INSTALL

REM Batch file to run game from SIERRA directory
echo @echo off                               >..\tordemo.bat
echo %1:                                    >>..\tordemo.bat
echo cd %4                                  >>..\tordemo.bat

REM Following line removed for non-root installs
REM echo call CheckCD %2                        >>..\tordemo.bat

echo @if exist vesa.bat call vesa.bat       >>..\tordemo.bat
echo sierrah resource.cfg                   >>..\tordemo.bat

REM Batch file to run game from GAME directory
copy ..\tordemo.bat tordemo.bat

REM Making vesadrv.bat
echo %2:                                     >vesadrv.bat
REM ==========================================================
REM ==========================================================
REM CHANGES NEED TO BE MADE HERE
REM ==========================================================
REM ==========================================================
echo cd \tordemo\install\vesa          >>vesadrv.bat
REM ==========================================================
REM ==========================================================
REM ==========================================================
REM ==========================================================
echo vesainst /Vvesa /B%1:%4 /Tsierra.dib   >>vesadrv.bat





REM If the data has been moved from the root directory,
REM the following lines MUST be changed. If for example
REM the data will be found in \DIR1\DIR2:
REM change all %2:\ to %2:\DIR1\DIR2

REM Original lines:
REM echo resSfx= %2:\                      >>resource.cfg
REM echo resAud= %2:\                      >>resource.cfg
REM echo resMap= %2:\                      >>resource.cfg
REM echo patchDir= %1:%4;%2:\patches;%2:\  >>resource.cfg

REM After the changes have been made:
REM echo resSfx= %2:\DIR1\DIR2               >>resource.cfg
REM echo resAud= %2:\DIR1\DIR2               >>resource.cfg
REM echo resMap= %2:\DIR1\DIR2               >>resource.cfg
REM echo patchDir= %1:%4;%2:\DIR1\DIR2\patches;%2:\DIR1\DIR2  >>resource.cfg


REM add the chosen drivers and our paths to the resource file
echo %3                                 >resource.cfg
REM ==========================================================
REM ==========================================================
REM CHANGES NEED TO BE MADE HERE
REM ==========================================================
REM ==========================================================
echo resSfx= %2:\tordemo               >>resource.cfg
echo resAud= %2:\tordemo               >>resource.cfg
echo resMap= %2:\tordemo               >>resource.cfg
echo patchDir= %1:%4;%2:\tordemo\patches;%2:\tordemo  >>resource.cfg
REM ==========================================================
REM ==========================================================
REM ==========================================================
REM ==========================================================

goto done

:done
rem cd ..>NUL
cls
echo
echo ˙To play Torin's Passage later:
echo ˙   From the directory of %1:%4,
echo ˙   Type TORDEMO 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 4 Megabytes of disk space is necessary for
echo the install.
echo
pause
goto quit

:quit
end

