clear

echo The install program will now copy 
echo Football Online to your hard drive.
echo Approximate hard drive space required
echo during install:  7.0 Megs
echo Aproximate hard drive space required 
echo after install: 5.5 Megs
echo

:Continue
%1:
godir %4\football CantCreate

IF NOT EXIST ..\tsn.prg GOTO BadDir
IF NOT EXIST ..\arena\NUL GOTO NoArena

md inndata > nul

exists %2:RESOURCE.000 Please insert the disk labeled "Disk 1" in drive %2:.
echo Copying Game files...
copy %2:*.*

tsnprg -A ..\tsn.prg football football.prg
tsnprg -A ..\tsn.prg halftime football.prg
tsnprg -A ..\tsn.prg ball2 football.prg
tsnprg -A ..\tsn.prg endtime football.prg

doclst ..\doc.lst Football.doc
copy football.doc ..\football.doc

copy 912.so ..\arena\912.so
copy 928.so ..\arena\928.so
copy 12.v56 ..\arena\12.v56

del tsnprg.exe
del football.prg
del doclst.exe
del football.doc
del 912.so
del 928.so
del 12.v56
del install.bat
rename instfoot.exe install.exe

echo %3 > resource.cfg

echo Processing %2:resource.000...
unchunk RESOURCE.000 . > nul
if ERRORLEVEL 1 goto BadChunk
del RESOURCE.000

exists %2:RESOURCE.001 Please insert the disk labeled "Disk 2" in drive %2:.
copy %2:RESOURCE.001 

echo Processing %2:resource.001...
unchunk RESOURCE.001 . > nul
if ERRORLEVEL 1 goto BadChunk
del RESOURCE.001

exists %2:RESOURCE.002 Please insert the disk labeled "Disk 3" in drive %2:.
copy %2:RESOURCE.002 

echo Processing %2:resource.002...
unchunk RESOURCE.002 . > nul
if ERRORLEVEL 1 goto BadChunk
del RESOURCE.002
del UNCHUNK.EXE

if ERRORLEVEL 1 goto Corrupted

echo 5     2    Football >> ..\arena\gamelist.cfg
copy %2:OK.COM

fbcheck

clear
echo Need help playing Football?  Order the official 
echo Front Page Sports: Football Online manual!  To 
echo order, go to the ImagiNation Mall online or call
echo 1-800-IMAGIN-1. You will be charged a nominal fee
echo for this handy, easy-to-use reference. A text-only
echo version of the manual is also available free-of-charge 
echo by printing it offline from the Facemaker or online
echo in the Town Hall.
echo
echo
echo When the Football Online Install is finished, type
echo INN to start the ImagiNation Network.
echo
echo
pause
cd..
end

:NoSpace
clear
echo
alert There is not enough space on %1: to install Football Online on your hard drive.  11 megabytes of disk space are necessary.
end

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

:Corrupted
alert Corrupted files exist.  Please run install again.
end

:BadChunk
if ERRORLEVEL 6 goto ERR6
if ERRORLEVEL 5 goto ERR5
if ERRORLEVEL 4 goto ERR4
if ERRORLEVEL 3 goto ERR3
if ERRORLEVEL 2 goto ERR2
if ERRORLEVEL 1 goto ERR1
alert Unable to extract resource file.  Please run install again.
end

:ERR1
alert Unable to read resource file.  Make sure the drive door is shut and run install again.
end
:ERR2
alert Unable to write resource file to hard drive.  This program only installs games on hard drives.  Run install again.  If you get this message again you may have a problem with your hard drive.
end
:ERR3
alert Not enough memory to run extraction program.  The extraction program needs a minimum of 550k to operate.
end
:ERR4
alert The resource file is bad.  Run install again.  If you get this message again, you probably received a bad disk.
end
:ERR5
alert Unable to open the resource file for reading.  A possible solution might be to increase the value of the FILES setting in your CONFIG.SYS file.
end
:ERR6
alert Unable to open the target file for writing.  A possible solution might be to increase the value of the FILES setting in your CONFIG.SYS file.
end

:BadDir
alert INN files not found in specified directory.  Please run INSTALL again.
end

:NoArena
alert You must install the INN Arena to play Football Online.  Please run the INN install again.
end

:exit
end
