;
;	Install Script for dre!dupe v1.o
; 1996 Bodo Hoffmann
; 
; $VER: dRE!dupe.install v1.0 (20-Oct-96)
;

(complete 0)

(set	#welcome	(cat	"\nWelcome to the Installation of\n"
											"dRE!dUPE v1.o\n"
											"This program will install dRE!dUPE\n"
											"on your AMIGA, so it is ready to use after\n"
											"this procedure\n\n\n"
											"This program is REGISTERWARE\n"
											"To become a full version you should register\n"
											"my programs, please refer to the AmigaGuide\n"
											"Document for more informations how and where\n"
											"you can do this...\n"
								)
)

(complete 0)

(message	#welcome)

(set doors		(askdir		(prompt "Please select the drawer where dRE!dUPE should be installed, a drawer will be created")
												(help @askdir-help)
												(default	"DOORS:")
							)
)

(set	destdir		(tackon doors		"dRE!dUPE"))
(set	guidedir	(tackon destdir	"Guides"))

(makedir	destdir		(infos))
(makedir	guidedir	(infos))

(copyfiles		(prompt "copying door checker.")
							(source	"/mainfiles/dRE!dUPE.FIM")
							(dest		destdir)
							(optional nofail askuser)
							(confirm)
							(help @copyfiles-help)
)

(copyfiles		(prompt "copying background checker.")
							(source	"/mainfiles/dRE!dUPE.EXE")
							(dest		"FAME:FILECHECKERS/DUPECHECK/")
							(optional nofail askuser)
							(confirm)
							(help @copyfiles-help)
)

(copyfiles		(prompt "copying icons...")
							(source	"/Icons/dRE!dUPE.FIM.info")
							(dest		destdir)
							(optional nofail askuser)
							(confirm)
							(infos)
							(help @copyfiles-help)
)

(copyfiles		(prompt "copying icons...")
							(source	"/Icons/dRE!dUPE.EXE.info")
							(dest		"FAME:FILECHECKERS/DUPECHECK/")
							(optional nofail askuser)
							(confirm)
							(help @copyfiles-help)
)

(copyfiles		(prompt "copying documentation...")
							(source	"/guides")
							(dest		guidedir)
							(infos)
							(all)
							(optional nofail askuser)
							(confirm)
							(help @copyfiles-help)
)

(copylib			(prompt "copying DRE.library")
			        (source "/Libs/DRE.library")
			        (dest   "LIBS:")
       				(confirm)
							(help @copylib-help)
)

(set override
	(asknumber	(prompt		"\n Now enter Override-level for the dupe-checker")
							(help			@asknumber-help)
							(range		10 255)
							(default	253)
	)
)

(set displaytext
	(askstring	(prompt		"Enter the text to display after\n"	"the dupecheck")
							(help     @askstring-help)
							(default	"[36mthank you for the support of this fine bbs[0m")
	)
)

(set failtext
	(askstring	(prompt		"Enter the text to display if a dupefile was found")
							(help     @askstring-help)
							(default	"[35mFound duplicate upload[33m... [35mbetter using the [34m'[33mz[34m' [35mkey next time[33m![0m")
	)
)

(set okaytext
	(askstring	(prompt		"Enter the text to display if no dupefile was found")
							(help     @askstring-help)
							(default	"[36mNone found [0m- [36mposting file to upload directory[0m!")
	)
)

(tooltype
	(prompt	"Setting tooltypes to the door-checker")
	(dest (tackon destdir "dre!dupe.FIM"))
		(settooltype	"OVERRIDE_LEVEL" (cat override))
		(settooltype	"(NAME.1"	"<NAME>)")
		(settooltype	"(FREEDL.1" "<GROUP EXTENSION>)")
		(settooltype	"SHOWDUPEFILE"	"YES")
		(settooltype	"FILES_FREEDL"	"NO")
		(settooltype	"GLOBALCHECK"	"NO")
		(settooltype	"(GLOBAL_DIR"	"<PATH TO YOU GLOBAL DRAWER>)")
		(settooltype	"DISPLAYTEXT"	displaytext)
		(settooltype	"FAIL_MSG"	failtext)
		(settooltype	"PASS_MSG"	okaytext)
)


(tooltype
	(prompt	"Setting tooltypes to the background-checker")
	(dest "FAME:FILECHECKERS/DUPECHECK/dre!dupe.EXE")
		(settooltype	"(NAME.1"	"<NAME>)")
		(settooltype	"(FREEDL.1" "<GROUP EXTENSION>)")
		(settooltype	"FILES_FREEDL"	"NO")
		(settooltype	"GLOBALCHECK"	"NO")
		(settooltype	"(GLOBAL_DIR"	"<PATH TO YOU GLOBAL DRAWER>)")
)

	(set cmd (tackon destdir "dre!dupe.fim"))
	(set make ("/c/MakeCMD NAME=DUPECHECK PATH=\"%s\" SERVERNAME=\"dRE!dUPE v1.o\" STACK=4096 ACSLEVEL=10 CMDTYPE=-2 MULTINODE PRI=0 DOORTYPE=0 NR NC CF SR SC AR AC RD" cmd))
	(run make)

(complete 100)

(run	"SYS:Utilities/MultiView /Guides/dUPECheck.guide")
