;
; Installer-script for the installation of RevCo
;
;	$VER: Install RevCo 1.0 (26.03.94) by Litrik De Roy
;

(set @default-dest "")

(set #bad_kick "You must be using Kickstart 2.04 (or higher) !")

(set #install-msg
	(cat "\nRevCo installation script.\n\n"
   	  "This script installs RevCo 1.0 on your Amiga.\n\n"
	     "Read the documentation for\n"
   	  "information on the usage of RevCo.\n"
   	  "\nRevCo  1994 Litrik De Roy\n"
	     "All rights reserved."
	)
)

;=============================================================================
; make sure we are running under a 2.04 ROM

(if (< (/ (getversion) 65536) 37)
(
    (abort #bad_kick)
))

(welcome)

;=============================================================================
; say hi

(message #install-msg)

;=============================================================================
; 

(copylib
	(prompt "Copying executable...")
	(help @copylib-help)
	(source "RevCo")
	(dest
		(askdir
			(prompt "Copying executable...")
			(help @askdir-help)
			(default "C:")
		)
	)
	(confirm)
)

(complete 40)

(copyfiles
	(source "ENV/RevCo.prefs")
	(dest "ENV:")
	(nogauge)
)
(copyfiles
	(source "ENV/RevCo.prefs")
	(dest "ENVARC:")
	(nogauge)
)

(complete 60)

(set docchoice
	(askchoice
		(prompt "Do you want to install the\nAmigaGuide documentation ?")
		(help @askchoice-help)
		(choices ".guide" ".guide + icon" "No")
		(default 0)
	)
)
(if
	(= docchoice 0)
	(set docpatt "RevCo.guide")
	(set docpatt "RevCo.guide#?")
)
(if
	(not (= docchoice 2))
	(copyfiles
		(source "")
		(dest
			(askdir
				(prompt "Copying guide...")
				(help @askdir-help)
				(default "Docs:")
			)
		)
		(pattern docpatt)
	)
)

(complete 100)
