; Epic Encyclopedia Installer Script V1.0.3

(complete 0)
(Welcome)

(Complete 1)

(set install_dir
   (askdir
      (prompt "Select a path to install to, a\n directory \"Epic\" will be created.")
      (help "Select a path to install to...")
      (default "Work:")
   )
)

(set @default-dest install_dir)

(complete 10)

(set install_path (tackon install_dir "Epic"))
(makedir install_path (infos))
(copyfiles 
	(prompt "Creating directory")
	(help "")
	(source "Epic_Encyclopedia:Menufiles/Bin.info")
	(dest install_dir)
	(newname "Epic.info")
)

(makeassign "EpicInstallPath" install_path)
(makeassign "EpicData" install_path)

(complete 12)

(makedir "EpicInstallPath:0")
(makedir "EpicInstallPath:A")
(makedir "EpicInstallPath:B")
(makedir "EpicInstallPath:C")
(makedir "EpicInstallPath:D")
(makedir "EpicInstallPath:E")
(makedir "EpicInstallPath:F")
(makedir "EpicInstallPath:G")
(makedir "EpicInstallPath:H")
(makedir "EpicInstallPath:I")
(makedir "EpicInstallPath:J")
(makedir "EpicInstallPath:K")
(makedir "EpicInstallPath:L")
(makedir "EpicInstallPath:M")
(makedir "EpicInstallPath:N")
(makedir "EpicInstallPath:O")
(makedir "EpicInstallPath:P")
(makedir "EpicInstallPath:Q")
(makedir "EpicInstallPath:R")
(makedir "EpicInstallPath:S")
(makedir "EpicInstallPath:T")
(makedir "EpicInstallPath:U")
(makedir "EpicInstallPath:V")
(makedir "EpicInstallPath:W")
(makedir "EpicInstallPath:X")
(makedir "EpicInstallPath:Y")
(makedir "EpicInstallPath:Z")
(makedir "EpicInstallPath:Hotlists")
(makedir "EpicInstallPath:Indexfiles")
(makedir "EpicInstallPath:Saved"(infos))
(makedir "EpicInstallPath:Temp")
(makedir "EpicInstallPath:Tools")
(makedir "EpicInstallPath:Userfiles")

;Copy files into relevent pigeon holes in HDD infa structure...

(complete 17)

(copyfiles
   (prompt "Copying nessecary files...\n")
   (source "Epic_Encyclopedia:Menufiles/Tools")
   (dest "EpicInstallPath:Tools/")
   (pattern "#?")
   (files)
)

;do the speach pack install

;Devs:
(copyfiles
   (prompt "Copying Speech pack files...")
   (source "Epic_Encyclopedia:Menufiles/Speech/Devs/")
   (dest "Devs:")
   (pattern "#?")
   (files)
)
;l
(copyfiles
   (prompt "Copying Speech pack files...")
   (source "Epic_Encyclopedia:Menufiles/Speech/l/")
   (dest "l:")
   (pattern "#?")
   (files)
)
(copylib
   (prompt "Copying Speech pack files...")
   (source "Epic_Encyclopedia:Menufiles/Speech/libs/translator.library")
   (dest "Libs:")
)

(complete 20)

(startup "Epic Encyclopedia"
        (prompt "About to update system files...")
        (help "Just hit proceed!")
   (command "IF EXISTS "install_path"\n\tAssign EpicData: "install_path"\n\tPATH EpicData:Tools ADD\nENDIF")
)

(complete 23)

(copyfiles
   (prompt "Copying system fonts...")
   (source "Epic_Encyclopedia:Menufiles/System/Fonts")
   (dest "FONTS:")
        (all)
   (fonts)
)

(complete 38)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/Cando.library")
   (dest "Libs:")
   (confirm)
)
(complete 43)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/Candogfx.library")
   (dest "Libs:")
   (confirm)
)
(complete 48)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/inovamusic.library")
   (dest "Libs:")
   (confirm)
)
(complete 53)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/req.library")
   (dest "Libs:")
   (confirm)
)
(complete 58)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/reqtools.library")
   (dest "Libs:")
   (confirm)
)
(complete 63)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/rexxreqtools.library")
   (dest "Libs:")
   (confirm)
)
(complete 68)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/rexxsupport.library")
   (dest "Libs:")
   (confirm)
)
(complete 73)
(copylib
   (prompt "Copying libraries...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/System/Libs/rexxsyslib.library")
   (dest "Libs:")
   (confirm)
)

;Get the user details (name & co. name)
(complete 78)

(set user_name
(askstring
   (prompt "\nPlease enter your FULL name")
   (help "Type in your FULL name, then press proceed")
        (default "")
)
)

(complete 81)

(set user_co
(askstring
   (prompt "\nPlease enter the name of your company.")
   (help "Type in the name of your company, if for\npersonal use then enter \"Personal Use\".")
   (default "Personal Use")
)
)

(complete 84)

(textfile
   (prompt "Creating Userfiles...")
   (help "")
   (dest "EpicInstallPath:Userfiles/RegistrationDetails.txt")
   (append user_name"\n")
   (append user_co)
)

(complete 87)

(set @messy "The installer is now about to copy the\nmain program files.  Then it will proceed\nto test your system, if it appears to hang\nat this point just wait for it to finish,\nit should take no more than 1 minute.")
(Message @messy)

(copyfiles
   (prompt "Copying main program files...")
   (help "")
   (source "Epic_Encyclopedia:Menufiles/Bin/")
   (Dest "EpicInstallPath:")
   (all)
   (infos)
)

(complete 95)

(execute "Epic_Encyclopedia:Menufiles/Scripts/Install2.script"
	(prompt "")
	(help "")
)

(complete 99)

(run "Epic_Encyclopedia:Menufiles/Installfiles/Tools/SavReset"
   (prompt "We will now have to reboot your computer, before\npressing Proceed please make sure that\nyou have no unsaved files and that\nall drive lights are out.")
   (help "We will now have to reboot your computer, before\npressing Proceed please make sure that\nyou have no unsaved files and that\nall drive lights are out.")
   (confirm)
)
