;This is the installation script for EDS V40.x


(transcript "Installing EDS V40.64 ...")

(set @default-dest
	(askdir
		(prompt "Where would you like to install EDS?")
		(help @askdir-help)
		(default @default-dest)
		(newpath)
		(disk)
	)
)

(copyfiles
	(prompt "Copying files to destination")
	(help @copyfiles-help)
	(source "")
	(dest @default-dest)
	(choices "EDS" "Eds_docs.guide" "Registration.form")
	(infos)
	(confirm)
)

(makedir "ENVARC:EDS"
	(prompt "I will now create the directory \"Envarc:eds\"")
	(help @makedir-help)
	(infos)
	(confirm)
)

(copyfiles
	(prompt "Copying preferences files to Envarc:eds.")
	(help @copyfiles-help)
	(source "envarc/eds/")
	(dest "Envarc:Eds/")
	(pattern "#?.prefs")
	(files)
	(confirm)
)

(set author-string
	(askstring 
		(prompt "What is your name?\n" "Will be used for Revision Control System.")
		(default (getenv "author"))
		(help @askstring-help)
	)
)

(set company-string
	(askstring 
		(prompt "What is the name of your programming company?\n" "Will be used for Revision Control System.")
		(default (getenv "company"))
		(help @askstring-help)
	)
)

(textfile
	(prompt "Creating a environmental varibles...\n Writing AUTHOR env-var")
	(help "EDS uses two env-variables in its revision control system.  These are AUTHOR and COMPANY. ")
	(dest "Envarc:Author")
	(append author-string)
	(confirm)
)

(textfile
	(prompt "Creating a environmental varibles...\n Writing COMPANY env-var")
	(help "EDS uses two env-variables in its revision control system.  These are AUTHOR and COMPANY. ")
	(dest "Envarc:company")
	(append company-string)
	(confirm)
)

(copylib
	(prompt "Copying ReqTools.library to LIBS:")
	(help @copylib-help)
	(source "libs/reqtools.library")
	(dest "libs:")
	(confirm)
)

(copyfiles
	(prompt "Copying Fonts to FONTS:")
	(help @copyfiles-help)
	(source "fonts/")
	(dest "fonts:")
	(confirm)
	(all)	
)

(message "Installation of EDS is complete. \n"
	"You may want to install EPP and the patch to EPP (which means you must install the ptool.library and Patch'em - see readme file).\n"
	"Please reboot the system now to make installation take effect.\n " 
	"Make sure you set up the icon tooltypes of EDS before running."
)	