home *** CD-ROM | disk | FTP | other *** search
- ; REKO Datatype Installer Script
- ; $VER: reko.datatype.install 39.2 (22.1.95)
- ;
-
- ; First make sure we have WB3.0
- (set @default-dest "")
- (if (< (/ (getversion) 65536) 39)
- (
- (abort "You must have at least Workbench 3.0")
- ))
-
- ; Now check for at least a 68020 processor
- (set proc (database "cpu"))
-
- (set cpu (askchoice
- (prompt "Which version do you want to install ?")
- (choices "68000" "68020")
- (if (OR (= proc "68000") (= proc "68010"))
- (default 0)
- (default 1)
- )
- (help
- (cat "On machines with an 68020 processor or higher, like "
- "the Amiga 1200, 2500, 3000 and 4000 you can select "
- "the 68020 version, which is optimized for those "
- "processors.\n\n"
- "If you have an Amiga with a 68000 or 68010 processor, "
- "like the standard version of the Amiga 500, 500+, "
- "600, 2000 and you have upgraded to Kickstart 3.0 or "
- "higher, then you must select the 68000 version."))
- ))
-
- ; Check that the DataTypes directory exists
- (if (NOT (exists "SYS:Classes/DataTypes"))
- (
- (abort "Can't find the SYS:Classes/DataTypes directory")
- ))
-
- ; Copy the datatype to it
- (copylib
- (prompt "")
- (help @copyfiles-help)
- (if (= cpu 0)
- (source "Classes/DataTypes/reko.datatype.68000")
- (source "Classes/DataTypes/reko.datatype.68020")
- )
- (dest "SYS:Classes/DataTypes")
- (newname "reko.datatype")
- (confirm)
- )
-
- ; Find out what sort of installation this is
- (set choice (askchoice
- (prompt "Install as permanently enabled, or manually selectable")
- (choices "Permanently enabled" "Manual select")
- (help
- (cat "The datatype can be installed as permanently enabled, or"
- " manually selectable.\n\n"
- "Pemanently enabled means that the datatype is always ready for use.\n\n"
- "Manually Selectable means that the datatype has to be\n"
- "run before it can be used. Once it has been run, it\n"
- "remains installed until the computer is rebooted."))
- ))
-
- (if (= choice 0)
- (
- ; Permanent installation
- ; Check that the DataTypes directory exists
- (if (NOT (exists "DEVS:DataTypes"))
- (
- (abort "Can't find the DEVS:DataTypes directory")
- ))
-
- (if (NOT (exists "DEVS:DataTypes/REKO Cardset"))
- (
- ; Copy the datatype to it
- (copyfiles
- (prompt "")
- (help @copyfiles-help)
- (source "Devs/DataTypes/REKO Cardset")
- (infos)
- (dest "DEVS:DataTypes")
- )
- ))
- )
- (
- ; Manual installation
- ; Check that the storage directory exists
- (if (NOT (exists "SYS:Storage/DataTypes"))
- (
- (abort "Can't find the SYS:Storage/DataTypes directory")
- ))
-
- (if (NOT (exists "SYS:Storage/DataTypes/REKO Cardset"))
- (
- ; Copy the datatype to it
- (copyfiles
- (prompt "")
- (help @copyfiles-help)
- (source "Devs/DataTypes/REKO Cardset")
- (infos)
- (dest "SYS:Storage/DataTypes")
- )
- ))
- ))
-
- ; Now exit, telling them what the situation is
- (if (= choice 0)
- (
- ; Installation was permanent
- (exit
- (cat "You will have to reboot the system before you can use the "
- "REKO datatype."
- ))
- )
- (
- ; Installation was manual
- (exit
- (cat "You must double-click on the REKO Cardset icon in the "
- "Storage->DataTypes drawer on your Workbench disk in order to "
- "use the REKO datatype. The datatype will then be available "
- "for use until you reboot."
- ))
- ))