; script to install StereoScopic


	; set up a error cleanup routine

(onerror
	(makeassign "StereoScopic_Disk" (safe))	
)

(complete 0)

	; just in case the installation was restarted

(makeassign "StereoScopic_Disk" (safe))		; start fresh



	; get a location for program
; 
	(set StereoScopic_dest
		(tackon
			(askdir
				(prompt "In which disk or drawer should StereoScopic be installed?")
				(help @askdir-help)
				(default @default-dest)
			)
			"StereoScopic"
		)
	)


	; now lock on to volume 'StereoScopic_Install'

(askdisk
	(prompt "Please insert \n the master program disk \n labeled \"StereoScopic\".")
	(help	"The StereoScopic program and other options will be copied "
			"from the \"StereoScopic\" into your system.")
	(dest  "StereoScopic_Install")
	(newname "StereoScopic_Disk")
)

	; make StereoScopic drawers & icons

(makedir StereoScopic_dest (infos))

(makedir (tackon StereoScopic_dest "Images"))

	; at this point we have a valid destination, so we tell installer where
	; the application will end up so the exit page will be correct -- also,
	; the installation log file (if any) will be copied to the destination

(set @default-dest StereoScopic_dest)


(copyfiles
	(source "StereoScopic_Disk:libs/arp.library")
	(dest "LIBS:")
)

(copyfiles
	(source "StereoScopic_Disk:libs/hisoftbasic.library")
	(dest "LIBS:")
)

(copyfiles
	(source "StereoScopic_Disk:StereoScopic")
	(dest StereoScopic_dest)
)

(copyfiles
	(source "StereoScopic_Disk:StereoScopic.info")
	(dest StereoScopic_dest)
)


(copyfiles
	(source "StereoScopic_Disk:StereoScopic.doc")
	(dest StereoScopic_dest)
)

(copyfiles
	(source "StereoScopic_Disk:StereoScopic.doc.info")
	(dest StereoScopic_dest)
)

(copyfiles
	(source "StereoScopic_Disk:more")
	(dest StereoScopic_dest)
)

(copyfiles
	(source "StereoScopic_Disk:ShowIFF")
	(dest StereoScopic_dest)
)

(copyfiles
	(source "StereoScopic_Disk:Images")
	(dest (tackon StereoScopic_dest "Images"))
	(all)
)

(copyfiles
	(source "StereoScopic_Disk:S/StereoScopic.cfg")
	(dest "S:")
)


	; reinitialize assigns

(if (not @pretend)
	(makeassign "StereoScopic" StereoScopic_dest)
	
)

	; decompress files

(run
	"StereoScopic_Install:C/LHA e StereoScopic:Images/Samples.LHA StereoScopic:Images/"
)

(run
	"StereoScopic_Install:C/LHA e StereoScopic:Images/Source.LHA StereoScopic:Images/"
)

(run
	"StereoScopic_Install:C/LHA e StereoScopic:Images/StereoScopic.LHA StereoScopic:Images/"
)

	; reset icons

(tooltype
	(dest "StereoScopic:StereoScopic")
	(noposition)
)
(tooltype
	(dest "StereoScopic:StereoScopic.doc")
	(noposition)
)

	; cleanup

(delete "StereoScopic:Images/Samples.LHA")
(delete "StereoScopic:Images/Source.LHA")
(delete "StereoScopic:Images/StereoScopic.LHA")
(makeassign "StereoScopic_Disk" (safe))

	; this is not strictly necessary, but doesn't hurt -- there is always
	; a default (exit) at the end of any script

(exit)

