; $VER: MUI-IControl Intaller 1.50 (18.01.97) by Tony Daems
;  


(set cpu 1)

(if (database "cpu" "68000") (set cpu 0))
(if (database "cpu" "68020") (set cpu 1))
(if (database "cpu" "68030") (set cpu 2))
(if (database "cpu" "68040") (set cpu 3))

(set dest_dir
	(askdir
		(prompt "Where do you want MUI-IControl\nAdvised is Sys:Prefs/")
		(help @askdir-help)
		(default "SYS:Prefs/")
		(newpath)
	)
)

(set file
	(askchoice
		(prompt "Please choose which version of the program you want.\nEach one is compiled for the relevant cpu")
		(help @askchoice-help)
		(default cpu)
		(choices "68000" "68020" "68030" "68040")
	)
)

(set dest_dir_guide
	(askdir
		(prompt "Where do you want MUI-IControl.guide\nAdvised is HELP: so MUI-IControl\ncan use it for Online help")
		(help @askdir-help)
		(default "HELP:")
		(newpath)
	)
)

(set file 
	(select file "bin/MUI-IControl_68000" "bin/MUI-IControl_68020" "bin/MUI-IControl_68030" "bin/MUI-IControl_68040")
)

(set pref_icon (exists "ENV:SYS/def_pref.info" (noreq) ) )

(if (not pref_icon) 
	(set pref_icon 
		(askbool 
			(help @askbool-help) 
			(default 1) 
			(prompt "The standard pref icon is missing (def_pref.info)\nCan I install the Magic WB version ?")
		)
	)
	(set pref_icon 0)
)

(set opt 
	(askoptions 
		(help @askoptions-help)
		(prompt "Which of the following catalog file")
		(choices "nederlands/MUI-IControl.catalog" "MUI-IControl.cd")
	)
)

(copyfiles
	(source file)
	(dest dest_dir)
	(newname "MUI-IControl")
	(infos)
)

(copyfiles
	(source "doc/MUI-IControl.guide")
	(dest dest_dir_guide)
)

(if pref_icon
	(copyfiles
		(source "Icons/def_pref.info")
		(dest "ENV:Sys")
	)
)

(if pref_icon
	(copyfiles
		(source "Icons/def_pref.info")
		(dest "ENVARC:Sys")
	)
)

(if (in opt 0)
	(copyfiles
		(source "catalogs/nederlands/MUI-IControl.catalog")
		(dest "LOCALE:catalogs/nederlands/")
	)
)

(if (in opt 1)
	(copyfiles
		(source "catalogs/MUI-IControl.cd")
	    	(dest "LOCALE:catalogs/")
	)
)