rem This is the install script
rem MAKE SURE YOU UPDATE THE INSTALL.SCR IN ..\CC1DISK!!!
rem Or tell Bill so he can update it!!!!

echo Setting up the directory for ImagiNation
godir %1:%6 CantCreate
godir %1:%6\VMF CantCreate
godir %1:%6
del *.so
del *.to
del *.p56
del *.v56
del *.snd
del resource.*
del *.drv
del *.dll
del *.exe
del hostaddr.tim
del *.prf

rem	Is there space?
space %1: 3000 NoSpace
if errorlevel 1 goto NoSpace

echo Copying files...

copy	%2:READ.ME /q
echo	Installing Re-Install
copy	%2:INSTALL.EXE insttsn.exe
copy	%2:BOOTDISK.EXE
rem copy	%2:puff.exe
copy	%2:INSTALL.BAT
copy	%2:INSTALL.TXT
copy	%2:DRIVERS.TXT
copy	%2:INSTALL.HLP
copy	%2:INSTTSN.TXT
copy	%2:INSTTSN.HLP
copy	%2:MODEM.TXT
copy	%2:PHONE.TXT

echo	Installing ImagiNation executive
copy	%2:TSNEXEC.EXE
rem echo Decompressing executive
rem puff	/D _SNEXEC.EXE
copy	%2:TSN.PRG
copy	%2:MODEM.DRV
copy	%2:NOBRK.DRV
copy	%2:INN.ICO
copy	%2:INN.PIF
copy	%2:PATCHPIF.EXE
patchpif %1 %6 > nul
copy	%2:HOSTADDR
copy	%2:tsnver
echo	@echo off>INN.BAT
echo	tsnexec DEFAULT>>INN.BAT

echo	Installing SCI and Drivers
copy	%2:LSCITV.EXE
rem echo Decompressing interpreter
rem puff	/D _SCITV.EXE
copy	%2:GAME.CFG
copy  %2:LAND.CFG
copy	%2:TWEAKER.DRV
copy	%2:MT32.DRV
copy	%2:ADL.DRV
copy	%2:SNDBLAST.DRV
copy	%2:TANDYXL.DRV
copy	%2:IBMKBD.DRV
copy	%2:_LNULL.DLL
rem echo Decompressing null-dll
puff	/D _LNULL.DLL
copy	%2:VGA320.DRV /q
copy	%2:_RAPH256.DLL /q
rem echo Decompressing graph256 dll
puff	/D _RAPH256.DLL
copy	%2:EGA640.DRV /q

echo %3>lsci.cfg
echo %4>%1:%6\tsn.cfg
echo %5>%1:%6\PASS_SET.DTA

rem Get the volumes installed from their blender file
rem ALSO round-about method for finding out installed video config

echo	Setting Up Video Drivers
echo  dll = graph256.dll>>lsci.cfg
echo  dll = nlnull.dll>>lsci.cfg
echo  pathStr = .\>>lsci.cfg
echo  hostID = SIERRA>>lsci.cfg
echo  virtualDir = VMF>>lsci.cfg
echo  swapSize = 100>>lsci.cfg

rem start the de-archiver
defuse %2 %1 part %6

godir %1:%6

rem rem Copy any patches which have found their way onto the final disk
copy 	%2:ccPatch\*.* /q
if exist _*.* puff /D _*.*

echo Installing ImagiNation Documentation
copy	%2:_ENERAL.DOC
copy	%2:_LUBHOUS.DOC
puff	/D _*.DOC

echo General.doc>doc.lst
echo Clubhous.doc>>doc.lst

cls
echo Installation complete.
echo 
echo 
echo To run The ImagiNation Network, type
echo      "cd %6"
echo      "INN"
echo 
end

:NoSpace
cls
echo There is not enough space on %1: to install ImagiNation!
echo 3.0 Megabytes are required.  ImagiNation may require
echo significantly more space if installed to a compressed
echo disk. Please delete some files you are no longer using.
pause
end

:CantCreate
Alert Unable to create %1:%6
cls
echo	There may already be a file called %1:%6.
echo
echo	If there is, rename it or install ImagiNation on another hard
echo	disk partition.
echo
pause
end

