;AccuPoint Boot Floppy installation Script
;Version 37.7 (28.04.93)

(complete 0)

; Get KickStart version
(set OSversion (getversion))
(set kickver (/ OSversion 65536))
(set kickrev (- OSversion (* kickver 65536)))

; Force "Expert" mode
(set @user-level 2)

; Undo any assign from a previous version
(makeassign "APoint")

; Message if not enough disk
(onerror
	(message
		"If you don't have enough free disk space on your boot floppy, "
		"try deleting some files.  Two candidates (if present) are "
		"DEVS:narrator.device and LIBS:translator.library, if you don't "
		"use the Amiga's speech often.  Other possibilities include any "
		"fonts you don't use, and some files in the Utilities or Tools "
		"drawers.  You may have to use Amiga Shell to delete some of these. "
		"See your Amiga's manual for details."
	)
)

(message 
	"BEFORE PROCEEDING, be sure you have NOT booted with the AccuPoint disk!\n"
	"This program may adjust some files on your AccuPoint Disk.  Make "
	"certain your are using your WORKING COPY of the AccuPoint floppy "
	"Disk!"
)
(message
	"This program will install the file \"tablet.library\" in the LIBS: "
	"drawer of your boot floppy disk.  It will also check for the "
	"file \"serial.device\" in the DEVS: "
	"drawer of your boot floppy disk (required by the AccuPoint software). "
	"It will also check for the presence of Commodore's AmigaGuide (2.0 "
	"users) (required by AccuPoint.Guide, the online manual). "
	"If any of these are missing, installer will attempt to install "
	"them for you.  If you run out of room, you will have to delete some "
	"files, and try again.    NOTE:  you do not HAVE to install the "
	"AmigaGuide files.  If you do not, you will have to boot from the "
	"working copy of the AccuPoint disk in order to use the online manual."
)

(complete 10)
; Check/install tablet.library
(copylib
	(prompt "AccuPoint requires that \"tablet.library\" be present "
		" in your LIBS: directory."
	)
	(help @copylib-help)
	(source "APoint:libs/tablet.library")
	(dest "LIBS:")
	(confirm)
)

; Check for presence of correct serial.device
(copylib
	(prompt "AccuPoint requires that the file  \"serial.device\" be "
		"present in your DEVS: directory."
	)
	(help @copylib-help)
	(source "APoint:devs/serial.device")
	(dest "DEVS:")
	(confirm)
)

(complete 40)
(if
	(askbool
		(prompt "Do you want the files needed by the AccuPoint Online Manual "
			" installed onto your boot floppy?")
		(help "The online manual uses Commodore's AmigaGuide "
			"(MultiView for 3.0 Users) to allow "
		 	"you to rapidly locate information on features of the AccuPoint "
		 	"software."
		)
		(default 1)
	)
	(if
		(< kickver 39)
		(
			(copylib
				(prompt "The AccuPoint online manual requires that AmigaGuide "
					"be present in your SYS:Utilities Drawer."
				)
				(help @copylib-help)
				(source "APoint:Utilities/AmigaGuide")
				(dest "SYS:Utilities")
				(confirm)
				(infos)
			)
			(tooltype
				(dest "SYS:Utilities/AmigaGuide")
				(noposition)
			)
			(complete 70)
			(copylib
				(prompt "AmigaGuide requires that amigaguide.library "
					"be present in your LIBS: Drawer."
				)
				(help @copylib-help)
				(source "APoint:libs/amigaguide.library")
				(dest "LIBS:")
				(confirm)
			)
			(copyfiles
				(source "APoint:s/help.guide")
				(dest "S:")
				(help @copyfiles_help)
			)
			(tooltype
				(dest 
					("APoint:APMan/AccuPoint.Guide")
				)
				(setdefaulttool "SYS:Utilities/AmigaGuide")
			)
		)
		(
			(tooltype
				(dest 
					("APoint:APMan/AccuPoint.Guide")
				)
				(setdefaulttool "SYS:Utilities/MultiView")
			)
		)
	)
)
(complete 100)
