;
; Installer Script for dRE!WAll v2.0
; using Installer (C) by COMMODORE
;

(transcript "Installing dRE!WAll v2.0...")

(complete 0)

(message "\n\n\ndRE!WAll v2.0 for Amiexpress 4.XX Professional\n\n This program will atomaticaly install dRE!WALL for, including all needed modifications to get the Door running")

(set doors_dir
	(askdir
 		(prompt "Select DOORS: Directory")
			(help @askdir-help)
			(default 
				(expandpath"BBS:DOORS")
			)
	)
)

(set dre_dir
	(tackon doors_dir "DRE")
)

(copyfiles
	(source "DOORS/DRE")
		(dest dre_dir)
			(infos)
				(all)
)

(complete 10)

(if 
	(askbool 
		(prompt "\n\n\nDo you want install dRE!WAll to your BBSCMD ?")
			(help @askbool-help)
	)
	(		
(set wallname (askstring (prompt "\n\nUnder wich Name should the Wall used in your BBS?")
 (help @askstring-help)
	 (default "WAll")
							)
)

(set acc_lvl (asknumber (prompt "\n\nSecurity Level to access the Wall")
	(help @asknumber-help)
		(range 1 255)
					 	)
)

(complete 20)

(copyfiles 
	(source "COMMANDS/BBSCMD/WAll.INFO") 
	(dest "BBS:COMMANDS/BBSCmd") 
		(newname ("%s.info" wallname)
		)
)

(tooltype 
			(settooltype "ACCESS" (cat acc_lvl))
			(dest	("BBS:Commands/BBSCmd/%s" wallname))
			(noposition)
)
	)
)

(complete 30)

(message "\n\n\n\nNow we configure in dRE!WAll v2.0 the following things\n\n1. COLOR MODE (YES/NO)\n\n2.ANONYMOUS LEVEL (NUMMERIC)\n\n")

(set color
	(askchoice
		(prompt "Colour Mode (YES / NO)")
			(help @askoptions-help)
			(choices
				"COLOR MODE ON"
				"COLOR MODE OFF"
			)
		(default 0)
		)
)

(complete 50)

(set anonym (asknumber (prompt "\n\nEnter Level to write Anonym to the Wall")
	(help @asknumber-help)
		(default 100)
		(range 1 255)
					 	)
)

(complete 60)

(tooltype 
		(if (= color 1)
				(settooltype "COLORS" "")
		)
	 			(settooltype "ANONYMOUS" (cat anonym))
			(noposition)
		(dest	(tackon doors_dir"DRE/DRE!WALL/dRE!WALL"))
)

(complete 70)

(set guide	
	(askoptions
		(prompt "Select Language for the Guide File")
			(help @askoptions-help)
			(choices
				"GERMAN"
				"ENGLISH"
			)
		(default 1)
	)
)

(complete 80)

(set help_dir
	(askdir
 		(prompt "Select Destination Directory for the Guidefile")
			(help @askdir-help)
			(default 
				(expandpath
					(tackon doors_dir "DRE/dRE!WAll"))
			)
	)
)

(if (= guide 1)
 (set guide "GERMAN")
		(set	guide_dir
			("GUIDES/%s" guide))
(copyfiles 
	(source guide_dir) 
		(dest help_dir) 
			(infos)
			(all))
)

(complete 90)

(if (= guide 2)
 (set guide "ENGLISH")
		(set	guide_dir
			("GUIDES/%s" guide))
(copyfiles 
	(source guide_dir) 
		(dest help_dir) 
			(infos)
			(all))
)

(copyfiles 
	(source guide_dir) 
		(dest help_dir) 
			(infos)
			(all)
)

 (message
  "Thank you for installing dRE!WAll v2.0\n"
  "Copyright © by dR.dRE! Of (tRSi /X·iNNOVAtiON)\n"
  "This Program can may be freely distributed for\n"
  "non-commercial purposes, as long as all the files\n"
  "in the original archive are present and have not\n"
  "been modified in any way.\n"
  "If you want to register all my Doors/Tools so get\n"
  "in touch with me on any TRSI Board in the World\n"
	"Or simply send the Money to:\n"
  "B. HOFFMANN\n"
  "KAPITELSTRASSE 1\n"
  "41460 NEUSS\n"
  "GERMANY\n"
  "The Register Few is 20$ or 30,- DM\n"
 )

(complete 100)
