clear
:Choose
godir %1:%4 cantcreate
echo
echo You have three options for installing Gabriel 
echo Knight to your hard drive. The *full* installation
echo copies many game resources and sound effects
echo (35 M).  The *medium* install copies 20 M of
echo resources and the *tiny* install copies only a few
echo required files (1 M). An additional 4 M will be 
echo needed if you choose to copy the high resolution 
echo art.  If your CD-ROM is slow, and you have the drive   
echo space available, you may wish to select the *full*  
echo install. Regardless of your install choice you will   
echo still need the CD loaded to run the game.
echo
echo Enter your choice: (f)ull, (m)edium (t)iny
pick fmt full medium tiny

:full
space %1: 35000 nospace
echo Copying files to %1:%4 ...
echo @echo off >..\gkcd.bat
echo cd %4 >>..\gkcd.bat
echo call CheckCD %2 >>..\gkcd.bat
rem echo sci -i0 >>..\gkcd.bat
echo sierra >>..\gkcd.bat
echo cd .. >>..\gkcd.bat
echo @echo off >gkcd.bat
echo call CheckCD %2 >>gkcd.bat
rem echo sci -i0 >>gkcd.bat
echo sierra >>gkcd.bat
echo %3 >resource.cfg
echo audio=%1:%4;%2:;%2:\sfx;%2:\patches;%2:\aud >>resource.cfg
echo sync=%2:\aud >>resource.cfg
echo movieDir=%2:\seq >>resource.cfg
echo patchDir=%1:%4;%2:;%2:\patches >>resource.cfg
echo audiosize=63k >>resource.cfg
copy %2:gkcheck.bat %1:checkcd.bat
copy %2:install.* %1:
copy %2:sierra.err %1:
copy %2:*.drv %1:
copy %2:resource.000 %1:
copy %2:resource.map %1:
rem copy %2:sci.exe %1:
copy %2:sierra.exe %1:
copy %2:resource.sfx %1:
echo If you are running high resolution, you
echo can speed up loading hi res art by copying
echo the high res art to your hard drive.
echo copy high resolution art? (y)es or (n)o
pick yn hiRes done

:medium
space %1: 20000 nospace1
echo Copying files to %1:%4 ...
echo @echo off >..\gkcd.bat
echo cd %4 >>..\gkcd.bat
echo call CheckCD %2 >>..\gkcd.bat
rem echo sci -i0 >>..\gkcd.bat
echo sierra >>..\gkcd.bat
echo cd .. >>..\gkcd.bat
echo @echo off >gkcd.bat
echo call CheckCD %2 >>gkcd.bat
rem echo sci -i0 >>gkcd.bat
echo sierra >>gkcd.bat
echo %3 >resource.cfg
echo audio=%1:%4;%2:;%2:\sfx;%2:\patches;%2:\aud >>resource.cfg
echo sync=%2:\aud >>resource.cfg
echo movieDir=%2:\seq >>resource.cfg
echo patchDir=%1:%4;%2:;%2:\patches >>resource.cfg
echo audiosize=63k >>resource.cfg
copy %2:gkcheck.bat %1:checkcd.bat
copy %2:install.* %1:
copy %2:sierra.err %1:
copy %2:*.drv %1:
copy %2:resource.000 %1:
copy %2:resource.map %1:
rem copy %2:sci.exe %1:
copy %2:sierra.exe %1:
echo If you are running high resolution, you
echo can speed up loading hi res art by copying
echo the high res art to your hard drive.
echo copy high resolution art? (y)es or (n)o
pick yn hiRes done



:tiny
space %1: 1000 nospace2
echo @echo off >..\gkcd.bat
echo cd %4 >>..\gkcd.bat
echo call CheckCD %2 >>..\gkcd.bat
echo %2: >>..\gkcd.bat
rem echo sci -i0 %1:%4\resource.cfg >>..\gkcd.bat
echo sierra %1:%4\resource.cfg >>..\gkcd.bat
echo %1: >>..\gkcd.bat
echo @echo off >gkcd.bat
echo call CheckCD %2 >>gkcd.bat
echo %2: >> gkcd.bat
rem echo sci -i0 %1:%4\resource.cfg >>gkcd.bat
echo sierra %1:%4\resource.cfg >>gkcd.bat
echo %1: >> gkcd.bat
echo %3 >resource.cfg
echo audio=%1:%4;%2:;%2:\sfx;%2:\patches;%2:\aud >>resource.cfg
echo sync=%2:\aud >>resource.cfg
echo movieDir=%2:\seq >>resource.cfg
echo patchDir=%1:%4;%2:;%2:\patches >>resource.cfg
echo audiosize=63k >>resource.cfg
copy %2:gkcheck.bat %1:checkcd.bat
goto done

:hiRes
space %1: 4000 nospace3
copy %2:resource.alt %1:
copy %2:alt.map %1:
goto done

:done
cd ..>NUL
cls
echo
echo ˙To play Gabriel Knight now:
echo ˙   Type gkcd [ENTER].
echo
echo ˙To play Gabriel Knight later:
echo ˙   From the directory of %1:%4,
echo ˙   Type gkcd 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 35 Megabytes of disk space are necessary for
echo the full install.
echo
pause
goto quit


:nospace1
cls
echo
echo There is not enough space on %1: to install. 
echo 20 Megabytes of disk space are necessary for
echo the medium install.
echo
pause
goto quit

:nospace2
cls
echo
echo There is not enough space on %1: to install. 
echo 1 Megabyte of disk space is necessary for
echo the tiny install.
echo
pause
goto quit

:nospace3
cls
echo
echo There is not enough space on %1: to copy 
echo the high resolution art. About 4 Megabytes
echo are needed.
echo
pause
goto done

:quit
end

