failat 6 echo "ChaosCatle - Autoboot install script" echo "" echo "This script will install ChaosCastle on a floppy-disk which can be autobooted without the Workbench." echo "" echo "(Do not use this script to install the game on your hard disk !" echo "To install on hard disk, just copy the drawer containing the game at the right place.)" echo "" echo "This script will only run if:" echo "- You booted from a Workbench floppy-disk or from a fully installed hard-disk" echo " For registered user: boot from the system cointaining the keyfile" echo "- You have an empty floppy-disk labelled 'CCastle' ready, the game will be installed there" echo "- You have launched the script from the drawer containing the game (it should not be in the ram disk)" echo "If this is not the case, (or if you don't want to make the installation), press 'n' now and restart the script only once you are ready." echo "If you are ready, press 'y' (and return)" ask "Continue (y/n) ? " IF NOT Warn Quit 10 Endif echo "" echo "Loading required commands..." If EXISTS c:If Resident c:If pure EndIf IF EXISTS c:EndIf Resident c:EndIf pure EndIf If EXISTS c:Else Resident c:Else pure EndIf If EXISTS c:Echo Resident c:Echo pure Endif IF EXISTS c:Copy Resident c:Copy pure Endif If EXISTS c:delete Resident c:Delete pure Endif If EXISTS c:Else Resident c:Else pure EndIf If EXISTS c:Makedir Resident c:Makedir pure EndIf If EXISTS c:Assign Resident c:Assign pure EndIf echo "Making temporary drawer in ram:" If EXISTS ram:CCastle delete > NIL: ram:CCastle all EndIf makedir ram:CCastle makedir ram:CCastle/c makedir ram:CCastle/l makedir ram:CCastle/libs makedir ram:CCastle/s makedir ram:CCastle/CCastle echo "Copying required system files to ram:" If EXISTS DEVS:system-configuration copy DEVS:system-configuration ram:CCastle Endif If EXISTS C:SetPatch copy c:SetPatch ram:CCastle/c EndIf IF EXISTS C:Assign copy c:Assign ram:CCastle/c Endif If EXISTS C:cd copy c:cd ram:CCastle/c EndIf If EXISTS C:run copy c:run ram:CCastle/c Endif If EXISTS C:endcli copy c:endcli ram:CCastle/c Endif If EXISTS libs:icon.library copy libs:icon.library ram:CCastle/libs Endif IF EXISTS libs:diskfont.library copy libs:diskfont.library ram:CCastle/libs Endif IF EXISTS libs:lowlevel.library copy libs:lowlevel.library ram:CCastle/libs Endif IF EXISTS libs:asl.library copy libs:asl.library ram:CCastle/libs EndIf copy > NIL: libs:68???.library ram:CCastle/libs echo "Copying system files from ram: to disk CCastle:" copy > NIL: ram:CCastle CCastle: all echo "Cleaning up ram:" delete > NIL: ram:CCastle all echo "Copying game program to ram:" makedir ram:CCastle copy > NIL: #? ram:CCastle all echo "Copying game program from ram: to disk CCastle:" copy > NIL: ram:CCastle CCastle:CCastle all copy > NIL: ram:CCastle/startup-sequence CCastle:s echo "Cleaning up ram:" delete > NIL: ram:CCastle all echo "Copying your keyfile (if you are registered)..." If EXISTS S:ChaosCastle.key copy S:ChaosCastle.key CCastle:S EndIf If EXISTS L:ChaosCastle.key copy L:ChaosCastle.key CCastle:S EndIf Assign >NIL: KEYS: EXISTS IF NOT Warn If EXISTS KEYS:ChaosCastle.key copy KEYS:ChaosCastle.key CCastle:S EndIf EndIf Assign >NIL: KEYFILES: EXISTS IF NOT Warn If EXISTS KEYFILES:ChaosCastle.key copy KEYFILES:ChaosCastle.key CCastle:S Endif EndIf If EXISTS CCastle:S/ChaosCastle.key echo "keyfile copied" Else echo "no keyfile found" EndIf If EXISTS c:Install Resident c:Install pure echo "c:Install loaded (resident)" EndIf Echo "About to execute 'Install DF0:' to install the bootblock..." Echo "IMPORTANT: Now put your CCastle floppy-disk in drive DF0:" Echo "THEN press 'y' to continue, or 'n' to skip this part" Ask "Install bootblock in drive DF0: (y/n) ? " IF WARN Install df0: echo "Bootblock installed" Else Echo "Bootblock not installed. You may need to do it manually" Endif echo "" Ask "Installation completed. Press return"