; This is the installer script for my Easy patching package
;

(
(welcome "About ot install\n" "The easy E patches object\n\n" "Copyright  1997 Dobes Vandermeer\nAll Rights reserved.\n")
(set @app-name "Easy E Patches")
(set @default-dest "E:")

(if (askbool 
		(prompt "Is it okay if I copy\n" "EMods/\n" "to emodules:\n" "?")
		(help   "Please press Yes if you want\n to continue with installation, \notherwise select No.\n")
		(default 1)
		)
	(   ; Install
	; Copy the module
	(copyfiles (source "EMods") (dest "EModules:") (all))
	(complete 33.3)

	; Copy the documentation
	(set #docdir (askdir 
					(prompt "Select the directory to\n" "copy the amigaguide\n" "documentation") 
					(help "Find a directory where \nyou wish to install\n the documentation.\nNo directory will be created.\n")
					(default 
						(if (exists "E:docs/tools" (noreq)) ("E:docs/tools") ("E:docs")))
					)
		)
	(copyfiles 
		(source "patching.guide") 
		(dest #docdir) 
		(newname "EZPatch.guide")
		)
	(complete 66.6)

	; Copy the example sources
	(set #srcdir 
		(askdir 
			(prompt "Select the directory to\n" "copy the example sources\n" "A directory WILL be created") (default (if (exists "SRC:E" (noreq)) ("SRC:E") ("E:src")))
			(help "If you don't get it,\nyou probably don't\nneed this software.\n")
			))
	(set #srcdir (tackon #srcdir "EZPatch"))
	(makedir #srcdir)
	(copyfiles (source "Examples") (dest (#srcdir) (all)))
	(complete 99.9)
	
	; We're done!
	(complete 100)
	(exit "Installation Complete!\n" "\n" "This installation does not\n" "require a reboot.\n" (quiet))
	)
	(	; Don't Install
	(exit (quiet))
	)
))
