; $VER: HD_Install(Communicator) 2.01 (22.8.94)
; Communicator Hard Disk Installation Script
; Version 2.01
; 22 August 1994
; Copyright 1994 by Eureka
;
; Written for use with Commodore's Installer tool
;
; The HD_Install icon should include these tooltypes:
;   APPNAME=Communicator
;   MINUSER=AVERAGE
;   PRETEND=FALSE

(set ARCPROGRAM "Communicator:lhex")
(set ARCWINDOW  "NIL:")
(set ARCEXTRACT "x")
(set ARCPATH    "-w=")
(set ARCFORCE   "-f")

(procedure unpackarchive
  (working ("Decompressing archive \"%s\"\n\nPlease Wait" CurrentLabel))
  (set @execute-dir CurrentPath)
  (run
    ("%s %s %s %s"
      ARCPROGRAM ARCFORCE ARCEXTRACT CurrentArchive)
    (help RUNHELP)
    (prompt "Decompressing archive \"" CurrentLabel "\"")
  )
)

(procedure confirmdisk
	(askdisk
		(prompt ("Please insert the disk labeled \"%s\"." CurrentDisk))
		(help @askdisk-help)
		(dest CurrentDisk)
        )
)



(complete 0)


(set helm_dest
	(askdir
		(prompt "In which disk or drawer should the Communicator be installed?")
		(help "The installation utility will create a drawer named "
			"\"Communicator\" in this directory.  All \"Communicator\" "
			"files will be placed inside that directory.\n")
		(default @default-dest)
	)
)


(if (= helm_dest "COMMUNICATOR:")
(
  (abort "You tried to install Communicator software to the installation disk.")
)
)



(set helm_dest (tackon helm_dest "Communicator"))
(set @default-dest helm_dest)
(makedir helm_dest (infos))



; get the program disk
(askdisk
	(prompt "Please insert the disk labeled \"COMMUNICATOR\"" )
	(help	"The Communicator will be copied "
			"from the \"COMMUNICATOR\" Disk to your system." )
	(dest "COMMUNICATOR" )
)


(complete 5)
;----------------------------------------------------------------------
; Install Communicator and data files
;----------------------------------------------------------------------
(copyfiles
     (source "COMMUNICATOR:HelmPresenter")
     (dest helm_dest)
)

(complete 35)

(copyfiles
     (source "COMMUNICATOR:CommBook")
     (dest helm_dest)
     (infos)
)

(complete 42)

(copyfiles
     (source "COMMUNICATOR:CommSmallBook")
     (dest helm_dest)
     (infos)
)



(complete 48)

(copyfiles
     (source "COMMUNICATOR:comzmodem.library")
     (dest helm_dest)
)


(if (exists (tackon helm_dest "Shareware") (noreq))
  (run (cat "delete \"" (tackon helm_dest "Shareware#?") "\" all"))
)

(complete 50)

(set CurrentDisk "Public_Domain") (confirmdisk)
(set PD (tackon helm_dest "Public_Domain"))
(makedir PD (infos))
(copyfiles
     (source "Public_Domain:")
     (dest PD)
     (pattern "#?")
     (infos)
)

(copyfiles
     (source "Public_Domain:dnet/dnet.config")
     (dest "s:")
)


(complete 98)
;----------------------------------------------------------------------
; Add assignment to startup-sequence
;----------------------------------------------------------------------

(if (exists "s:user-startup" (noreq))
  (startup "Communicator"
    (prompt
     "Adding Communicator assignment to \"S:user-startup\" so that your system will be properly configured to use Helm.")
    (help @startup-help)
    (command (cat "assign COMMUNICATOR: " helm_dest))
  )
)


(complete 100)


(exit)
