;HOME&OFFICE FORMS INSTALLATION SCRIPT
;COPYRIGHT ©1995 SOFT-LOGIK PUBLISHING CORPORATION

;GET DEST AND CREATE DIRECTORY
(set TEMdest
	(askdir
		(prompt
			"Select the directory in which you would like the Home&OfficeForms drawer created. You need to have at least 615K of free hard drive space to install Home & Office Forms.")
		(help
			"A drawer named Home&OfficeForms will be created here to store the forms.\n\n")
		(default @default-dest)
	)
)

;CREATE DRAWER
(set TEMdest (tackon TEMdest "Home&OfficeForms"))
(if (<> (exists TEMdest) 2) (makedir TEMdest (infos)))

;Make an assign to use
(makeassign "DirTem" (safe))
(makeassign "DirTem" TEMdest (safe))

;We now have a valid destination, so tell Installer so the exit page will be correct
(set @default-dest TEMdest)

;DOES THE MACROS DIRECTORY EXIST?
(if (<> (exists "PageStream3:Macros") 2)
	(makedir "PageStream3:Macros" (infos))
)



;COPY LHEX TO RAM:
(copyfiles (source "Home&OfficeForms:lhex") (dest "ram:") (nogauge))

;INSTALL FORMS
(copyfiles (source "Home&OfficeForms:FORMS.LHA") (dest "ram:"))
(complete 40)
(working "Decompressing Forms...\n\n\n")
(run "ram:lhex >NIL: <NIL: -qfw=DirTem: x ram:FORMS.LHA")
(complete 95)
(delete "ram:FORMS.LHA" (safe))
(copyfiles (source "Home&OfficeForms:ConvertA4.rexx") (dest "PageStream3:Macros"))
(complete 100)


;* CLEAN UP *

;REMOVE THE LHARC PROGRAM
(delete "ram:lhex" (safe))

;DONE WITH THE INSTALL
(makeassign "DirTem" (safe))

(exit "\n\nYou are now ready to use the Home & Office Forms with PageStream3.")
