clear
godir %1:%4 CantCreate

rem  Copy over the necessary files.
rem  patches - if they exist - will be in the \both directory

echo Copying Startup Files ...
copy %2:\version
copy %2:\dosonly\*.*
copy %2:\both\*.*

if exist sierra.exe del sierra.exe

rem  Create batch file on the fly and copy to the root dir

echo cd %4 > pq4.bat
echo sierra >> pq4.bat
copy pq4.bat %1:\

echo %3 > resource.cfg

echo Copying Game files...

exists %2:\disk2 Please insert the disk labelled "Disk 2" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk3 Please insert the disk labelled "Disk 3" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk4 Please insert the disk labelled "Disk 4" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk5 Please insert the disk labelled "Disk 5" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk6 Please insert the disk labelled "Disk 6" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk7 Please insert the disk labelled "Disk 7" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk8 Please insert the disk labelled "Disk 8" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk9 Please insert the disk labelled "Disk 9" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk10 Please insert the disk labelled "Disk 10" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk11 Please insert the disk labelled "Disk 11" in drive %2:.
copy resource.000 + %2:\both\resource.000

exists %2:\disk12 Please insert the disk labelled "Disk 12" in drive %2:.
copy resource.000 + %2:\both\resource.000
copy %2:\both\resource.sfx

copy %2:\auddcomp.exe

rem rem make a bat file for install.bat to call
rem echo echo Decompressing interpreter - please wait>intdcomp.bat
rem echo %2:\interp.exe .\>>intdcomp.bat

echo Please wait - decompressing audio.
echo This should take a few minutes.
auddcomp>nul

if ERRORLEVEL 1 goto AudError

echo Decompressing interpreter - please wait
interp.exe>nul

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

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


:Exit2
end


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


:AudError
Alert AUDIO DECOMPERSSION FAILED!
end

