; $VER: ClassAction V2.0 Installer  (18.05.95)
; Script to install Release 2.0 ClassAction
(complete 0)

(set #Abort
(cat "Don't Overwrite"
))

(set #Overwrite
(cat "Overwrite"
))

(set #conf
(cat "You have a ClassAction \nconfig file already installed\n"
     "on your system , shall I overwrite it \n"
     "with the default config ?\n\n"
     "I recommand you to Don't Overwrite it"
))

(set #conf-help
(cat "\n\nThe installer has found a previous installed\n"
     "ClassAction config file\n\n"
     "Select Overwrite if you want to use the one\n"
     "by default or Select Don't Overwrite\n"
     "to keep your own config."
))


;********************************************************************

(set #warn-kickstart-text
(cat	"\n		*** WARNING.***\n\n"
	"ClassAction has been written for KickStart 3.0 (V39) or higher. \n\nIt will also work on earlier versions\nwith some features disabled."
	"\n\nYou currently are running KickStart V%ld.\n\n"
	"Continue Install ?"
))

;*********************************************************************

(set #DOC-query-text
(cat "Where do you which\nto install documentation"
))

(set #DOC-query-help
(cat "\n\nYou have now to choose a directory where\n"
	"you want to install the guide file\n\n"
	"Just click on it with your mouse and"
	" select proceed"
))

;****************************************

(set #CA-query-text
(cat "Where do you which\nto install ClassAction\nmain program"
))

(set #CA-query-help
(cat "\n\nYou have now to choose a directory where\n"
	"you want to install the main program file\n\n"
	"Just click on it with your mouse and"
	" select proceed"
))

;****************************************

(set #CAP-query-text
(cat "Where do you which\nto install ClassActionPrefs"
))

(set #CAP-query-help
(cat "\n\nYou have now to choose a directory where\n"
	"you want to install the Prefs program file\n\n"
	"Just click on it with your mouse and"
	" select proceed\n"
	"you can select SYS:Prefs if you don't know where to\n"
	" install it..."
))


;********************************************************************

(set #goodbye
(cat "\nClassAction is now installed."
))

;********************************************************************

(set ver (/ (getversion) 65536) )
(if (< ver 39) (
	(set warning (#warn-kickstart-text ver) ) (message warning)
))


		(set thedir (askdir (prompt #CA-query-text) (help #CA-query-help) (default "SYS:")))
		(copyfiles (source "ClassAction") (dest thedir) (infos) )

(complete 25)


		(set thedir (askdir (prompt #CAP-query-text) (help #CAP-query-help) (default "SYS:Prefs")))
		(copyfiles (source "ClassActionPrefs") (dest thedir) (infos) )
(complete 50)

		(set thedir (askdir (prompt #DOC-query-text) (help #DOC-query-help) (default "SYS:")))
		(copyfiles (source "ClassAction.guide") (dest thedir) (infos) )
(complete 75)

(if (exists "ENVARC:ClassAction.prefs"))
(
	(if(askbool (prompt #conf) (help #conf-help) (choices #Overwrite #Abort))
		(copyfiles (source "ClassAction.prefs") (dest "ENVARC:"))
		(complete 100)
	)
)



(message #goodbye)
