;VMBIS Voice-Mailbox Installer V1.0
;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

(complete 0)
(set @default-dest "SYS:")

; »»» Text «««

(set #Intro-Txt
(cat "\n\nWelcome to \n\n"
"Voice Mailbox V1.0\n\n"
"Installer"
))(set #Warning-Txt
(cat "Warning !\n\n\n"
"If you don`t have installed ZVT then install it first!\n\n"
"Voice Mailbox V1.0 requires 1 MB free on your disk \n\n"
))(set #Path-Txt
(cat "Select your ZVT directory. A directory called VMB will "
"be created there."
))(set #Path-Help
(cat "\nThis section lets you choose the "
"ZVT directory to install Voice Mailbox V1.0. \n\n"
"A directory VMB will be created there.\n\n"
"Default is SYS:\n\n\n"
@askdir-help
))
(set Assign-Help-Txt
(cat "\nA script located in the ZVT directory wil make "
"the Assigns. The User-Startup will be patched in order "
"to call this script.\n\n\n"
@startup-help
))

; »»» Main ««« 

(message #Intro-Txt)
(message #Warning-Txt)
(set desti 
(askdir (prompt #Path-Txt) (help #Path-Help) (default @default-dest) (newpath)
))

(set @default-dest desti)
(makedir (tackon desti "VMB"))
(copyfiles
(prompt "Copying to " #desti)
(help @copy-files-help)
(source "")
(dest (tackon desti "VMB"))
(pattern "#?")
)
(run (cat "copy " "Libs/#? " "LIBS:"))
(run (cat "copy " "VMBDAT/VMBd \"" desti "/VMB.info""\""))
(run (cat "copy " "VMBDAT/ZVT.set \"" desti "/ZVT.Settings""\""))
(run (cat "copy " "VMBDAT/Sound " "C:"))

; »»» StartupSequence «««

(complete 95)

(startup "VMB"
	(prompt "Some required commands will be added to your \"s:user-startup\" file.")
	(help @startup-help)
	(command "if exists \"" desti "/VMB""\"\n")
	(command "   assign VMB: \"" desti "/VMB""\"\n")
	(command "endif""\n")
	(command "RXLIB >NIL: rexxreqtools.library 0 -30""\n")
	(command "RXLIB >NIL: rexxsupport.library 0 -30""\n")
)

; »»» Finished «««

(complete 100)

(exit "Thank you for using the VMB Installer.\n"
	"We appreciate your business.\n\n"                  
        "No Carrier...\n"                                 
	"CLICK.\n\n\n"                                          
	"Please reboot your computer before trying to start VMB.")
