; $VER: Install_F1GP_BKG_DataType 1.0 (6.1.97)
;   by Oliver Roberts (oliver@poboxes.com)


(set @default-dest "")
(set #cpu (database "cpu"))
(set #cpu020 (and (<> #cpu "68000") (<> #cpu "68010")))

(if (< (/ (getversion) 65536) 39)
	(abort "You must be running Kickstart 3.0 or higher to use datatypes.")
)

(set #cpu020
	(askchoice
		(help @askchoice-help)
		(prompt "Choose which version of the datatype to install")
		(choices "68000" "68020+")
		(default #cpu020)
	)
)

(working "Installing Datatype")

(if (<> (exists "SYS:Classes") 2) (makedir "SYS:Classes" (infos)) )

(set #dtname "Classes/DataTypes/f1gp_bkg.datatype")
(if #cpu020 (set #dtname (cat #dtname ".020")))

(copylib
	(help @copylib-help)
	(prompt "Installing f1gp_bkg.datatype class")
	(source #dtname)
	(dest "SYS:Classes/DataTypes")
	(newname "f1gp_bkg.datatype")
	(confirm)
)
(copyfiles
	(help @copyfiles-help)
	(prompt "Installing Format Descriptors")
	(source "Devs/DataTypes/F1GP Backdrop")
	(dest "DEVS:DataTypes")
	(infos)
	(confirm)
)

(run "C:AddDataTypes >NIL: REFRESH")
