rem *************************************************************
rem *** Variable Definitions:   %1 - Destination Drive Letter ***
rem ***                         %2 - Source Drive Letter      ***
rem ***                         %3 - RESOURCE.CFG Values      ***  
rem ***                         %4 - Destination Path         ***
rem *************************************************************

clear

space %1: 5000 trysmall 
goto bothinstalls
:trysmall
space %1: 120 NoSpace
clear
echo You only have enough room on your hard drive for 
echo a Minimum install. You can only run the game from
echo the CD. If you wish to do a Full install,
echo which copies the entire game to your hard drive,
echo you will need at least 5 megs of hard disk space.
echo 
echo Do you wish to (C)ontinue or (E)xit?
pick ce Minimum Exit


:bothinstalls
clear
echo Please choose an installation option:
echo 
echo   Minimum
echo   The Minimum install requires 120k of hard disk
echo   space. Your game will run from the CD. This
echo   option requires less hard disk space but the
echo   game runs slower from the CD.
echo 
echo   Full
echo   The Full install requires 5 megs of hard disk
echo   space. Your game will run from the hard disk and
echo   will not need the CD. This option runs faster
echo   but requires more hard disk space.
echo
echo Do you wish to install (M)inimum, (F)ull or (E)xit

pick mfe Minimum Full Exit

:Minimum
clear
godir %1:%4  CantCreate
godir %1:%4\tapes  CantCreate
cd .. > nul
godir %1:%4\custom  CantCreate
cd .. > nul


echo Copying Files ...
echo @echo off > BARONCD.bat
echo %2: >> BARONCD.bat
echo cd \redbaron >> BARONCD.bat
echo gcd -n%1:%4 >> BARONCD.bat
echo %1: >> BARONCD.bat


copy %2:\redbaron\roster.dat		
copy %2:\redbaron\script.dat		
copy %2:\redbaron\control.prf	
copy %2:\redbaron\creal.prf		
copy %2:\redbaron\mreal.prf		
copy %2:\redbaron\simprefs.prf
copy %2:\redbaron\sim.in			
copy %2:\redbaron\sim.out			
copy %2:\redbaron\inst*.*
copy %2:\redbaron\*.drv
copy %2:\redbaron\rc2cp.exe
copy %2:\redbaron\bootdisk.exe
copy %2:\redbaron\readme.txt

cd tapes > nul
copy %2:\redbaron\tapes\*.*
cd.. > nul
cd custom > nul
copy %2:\redbaron\custom\*.*
cd.. > nul

echo @echo off > install.bat
echo call inst.exe >> install.bat
echo call rc2cp.exe >> install.bat


echo %3 >resource.cfg
call rc2cp.exe

goto done

:Full

clear
godir %1:%4  CantCreate
godir %1:%4\tapes  CantCreate
cd .. > nul
godir %1:%4\custom  CantCreate
cd .. > nul

echo Copying Files ...
echo @echo off > BARONCD.bat
echo %1: >> BARONCD.bat
echo cd %4 >> BARONCD.bat
echo gcd -n%1:%4 >> BARONCD.bat
echo %1: >> BARONCD.bat


copy %2:\redbaron\roster.dat		
copy %2:\redbaron\script.dat		
copy %2:\redbaron\control.prf	
copy %2:\redbaron\creal.prf		
copy %2:\redbaron\mreal.prf		
copy %2:\redbaron\simprefs.prf
copy %2:\redbaron\sim.in			
copy %2:\redbaron\sim.out			
copy %2:\redbaron\inst*.*
copy %2:\redbaron\*.drv
copy %2:\redbaron\rc2cp.exe
copy %2:\redbaron\bootdisk.exe
copy %2:\redbaron\readme.txt

cd tapes > nul
copy %2:\redbaron\tapes\*.*
cd.. > nul
cd custom > nul
copy %2:\redbaron\custom\*.*
cd.. > nul


echo @echo off > install.bat
echo call inst.exe >> install.bat
echo call rc2cp.exe >> install.bat



copy %2:\redbaron\volume.001			
copy %2:\redbaron\volume.002			
copy %2:\redbaron\volume.003			
copy %2:\redbaron\volume.004			
copy %2:\redbaron\volume.005			
copy %2:\redbaron\volume.006			
copy %2:\redbaron\volume.007			
copy %2:\redbaron\heads.bmp			
copy %2:\redbaron\fokd7.clg			
copy %2:\redbaron\fokd8.clg			
copy %2:\redbaron\halbd2.clg			
copy %2:\redbaron\nieu11.clg			
copy %2:\redbaron\nieu28.clg			
copy %2:\redbaron\siemens.clg		
copy %2:\redbaron\gcd.com				
copy %2:\redbaron\ace.dat				
copy %2:\redbaron\aplane.dat			
copy %2:\redbaron\bfc.dat				
copy %2:\redbaron\elite.dat			
copy %2:\redbaron\evade.dat			
copy %2:\redbaron\fighter.dat		
copy %2:\redbaron\fokd8.dat			
copy %2:\redbaron\ftext.dat			
copy %2:\redbaron\genericf.dat		
copy %2:\redbaron\genericr.dat		
copy %2:\redbaron\halbd2.dat			
copy %2:\redbaron\historic.dat		
copy %2:\redbaron\nieu11.dat			
copy %2:\redbaron\nieu28.dat			
copy %2:\redbaron\ordinary.dat		
copy %2:\redbaron\sdef.dat			
copy %2:\redbaron\siemens.dat		
copy %2:\redbaron\skill.dat			
copy %2:\redbaron\ps.exe				
copy %2:\redbaron\rb.exe				
copy %2:\redbaron\rbmb.exe			
copy %2:\redbaron\system.fnt			
copy %2:\redbaron\psvols.map			
copy %2:\redbaron\simvols.map		
copy %2:\redbaron\rbmb.ovl			
copy %2:\redbaron\volume.rmf			
copy %2:\redbaron\fokd7.tbl			
copy %2:\redbaron\fokd8.tbl			
copy %2:\redbaron\halbd2.tbl			
copy %2:\redbaron\nieu11.tbl			
copy %2:\redbaron\nieu28.tbl			
copy %2:\redbaron\ptplane.tbl		
copy %2:\redbaron\siemens.tbl		
copy %2:\redbaron\fokd8.ttm			
copy %2:\redbaron\halbd2.ttm			
copy %2:\redbaron\nieu11.ttm			
copy %2:\redbaron\nieu28.ttm			
copy %2:\redbaron\siemens.ttm		

echo %3 >resource.cfg
call rc2cp.exe

goto done


:done
godir c:\sierra  CantCreate
echo [rb]>>sierra.sim
echo workdir=%1:%4\baroncd.bat>>sierra.sim
echo >>sierra.sim
%1:
cd %4

clear
echo
echo ˙To play NOW:
echo ˙   Type BARONCD and press [ENTER].
echo
echo ˙To play LATER:
echo ˙   From the root directory of %1:,
echo ˙   Type cd %4 and press [ENTER], then
echo ˙   Type BARONCD and press [ENTER].
echo
pause
end

:NoSpace
clear
echo
alert There is not enough space on %1: to install Red Baron on your hard drive.  5 Megabytes of disk space are necessary.
end

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

:Exit
clear
end
