;
;	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"
													)
)

(set	#regdir-prompt			(cat	"Please select now the the drawer, where the registered mainfiles are located"))

(set	#getinstdir-prompt	(cat	"Please select the drawer where dRE!dUPE should be installed, a drawer will be created"))

(set	#doorname-prompt		(cat "\n\nPlease choose now the name for the door"))
(set	#cfgdoorname-prompt	(cat "\n\nPlease choose now the name for the config-door"))
(set	#level-prompt				(cat "\n\nPlease choose now the access-level for the door"))
(set	#cfglevel-prompt		(cat "\n\nPlease choose now the access-level for the config-door"))
(set	#config-prompt			(cat "Please choose now the supplied confogfiles you like to install"))
(set	#doorfiles					(cat	"\n\n\n\nNow the needed door-files are created\n"
															  "This means you don`t need to create it by\n"
																"your System-Editor to run dRE!dUPE\n"
																"successfull...\n\n"
																"Have phun while creating own configfiles"
													))
(complete 0)

(message	#welcome)

(set regdir (askdir (prompt #regdir-prompt)
										(help @askdir-help)
										(default  "SYS:")
						)
)

(set doors		(askdir		(prompt #getinstdir-prompt)
												(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	(tackon regdir "dRE!dUPE.FIM"))
							(dest		destdir)
							(optional nofail askuser)
							(confirm)
							(help @copyfiles-help)
)

(copyfiles		(prompt "copying background checker.")
							(source	(tackon regdir "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)
)

(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")
