;
; $PROJECT: PointerEyes 3.10
;
; (C) Copyright 1995 John Hughes.  All Rights Reserved.
;

(message "\n\nPointerEyes 3.10 requires AmigaDos 2.0 or greater.\n\nIf you have AmigaDos 3.0 or greater, you may want to install PointerEyes 4.2.  It takes advantage of the datatypes.library, and allows you to customize the eye images.")

(set mode
	  (askchoice
			(prompt @app-name)
			(help @askchoice-help)
			(choices "Install" "Remove")
	  )
)

(if mode
		  (set pmode "Remove")
		  (set pmode "Install")
)

; GET INSTALL DIRECTORY
(set installdir
		  (askdir
					 (prompt "Where do you want to put the PointerEyes executable?")
					 (help @askdir-help)
					 (default "SYS:WBStartup")
		  )
)

; do install or remove
(if mode
		  ; Remove
		  (
					 (working "Removing " @app-name)

					 ; Remove the non-standard pieces
					 (delete (tackon installdir "PointerEyes") (infos))

					 (message "Pointer Eyes has been successfully removed.\nscreennotify.library was left in libs: since\nother applications you have may need it.")
					 (exit (quiet))
		  )

		  ; Install
		  (
					 (working "Installing " @app-name)

					 ; Install the Executable
					 (copyfiles
								(prompt "Copying the PointerEyes Executable")
								(help @copyfiles-help)
								(source "PointerEyes")
								(dest installdir)
								(infos)
					 )

					 ; Install the library
					 (copylib
								(prompt "Copying screennotify.library")
								(help @copylib-help)
								(source "/libs/screennotify.library")
								(dest "libs:")
								(confirm)
					 )

					 ; install AmigaGuide file
					 (copyfiles
								(prompt "Copying AmigaGuide file")
								(help @copyfiles-help)
								(source "/Docs/PointerEyesV4.2.guide")
								(dest "AmigaGuide:")
								(confirm)
					 )

		  )
)

(set @default-dest installdir)
