; script to install "Minskies-Furballs"

(user 2) 
(welcome)


; ---------------------------------------------------------------------------
; Get destination pathname for where to install
; ---------------------------------------------------------------------------

(set minskie_dest		; if user wants in different place
	(tackon
		(askdir
			(prompt "In which disk or drawer should Minskies Furballs be installed?")
			(help @askdir-help)
			(default @default-dest)
		)
	"Minskie"
	)
)
(makedir minskie_dest (infos))
(set @default-dest minskie_dest)

; ---------------------------------------------------------------------------
; Copy files from disk 1 to destination
; ---------------------------------------------------------------------------

(askdisk
	(prompt "Please insert \"Minskie - Disk 1\".")
	(help @askdisk-help)
	(dest "Minskie-1")
)

(copyfiles
	(source "minskie-1:")
	(dest minskie_dest)
	(infos)
	(all)
)

; ---------------------------------------------------------------------------
; Copy files from disk 2 to destination
; ---------------------------------------------------------------------------

(askdisk
	(prompt "Please insert \"Minskie - Disk 2\".")
	(help @askdisk-help)
	(dest "Minskie-2")
)

(copyfiles
	(source "minskie-2:")
	(dest minskie_dest)
	(all)
	(infos)
)


; ---------------------------------------------------------------------------
; Copy files from disk 3 to destination
; ---------------------------------------------------------------------------

(askdisk
	(prompt "Please insert \"Minskie - Disk 3\".")
	(help @askdisk-help)
	(dest "Minskie-3")
)

(copyfiles
	(source "minskie-3:")
	(dest minskie_dest)
	(all)
	(infos)
)


; ---------------------------------------------------------------------------
; Copy files from disk 4 to destination
; ---------------------------------------------------------------------------

(askdisk
	(prompt "Please insert \"Minskie - Disk 4\".")
	(help @askdisk-help)
	(dest "Minskie-4")
)

(copyfiles
	(source "minskie-4:")
	(dest minskie_dest)
	(all)
	(infos)
)

; --------------------------------------------------------------------------- 
; Add assigns to S:User-Startup
; ---------------------------------------------------------------------------

 (startup "Minskie"
	(prompt
		"Some instructions need to be added to the \"S:user-startup\" "
		"so that your system will be properly configured to use Minskies Furballs."
	)
	(help @startup-help)
	(command
		"ASSIGN Minskie-1: \"" minskie_dest "\"\n"
		"ASSIGN Minskie-2: \"" minskie_dest "\"\n"
		"ASSIGN Minskie-3: \"" minskie_dest "\"\n"
		"ASSIGN Minskie-4: \"" minskie_dest "\"\n"
		"ASSIGN Minskie: Remove\n"
		"ASSIGN Minskie: Minskie-1:\n"			
	)
)

; ---------------------------------------------------------------------------
; Make script file so that game can run by booting with no startup
; ---------------------------------------------------------------------------------------------------------------------------------------------------

(textfile
	(prompt 
		"Attempting to create an executable script file so game can be "
		"run when booting with no startup-sequence. The file will be "
		"stored in the root directory of the boot drive and will be "
		"called `RunMinskie'."
	)
	(confirm)
	(help @textfile-help)
	(dest (cat "Sys:RunMinskie"))
	(append (cat "Assign Minskie-1: " minskie_dest))
	(append "\n")
	(append (cat "Assign Minskie-2: " minskie_dest))
	(append "\n")
	(append (cat "Assign Minskie-3: " minskie_dest))
	(append "\n")
	(append (cat "Assign Minskie-4: " minskie_dest))
	(append "\n")
	(append (cat "Assign Minskie: Remove"))
	(append "\n")
	(append (cat "Assign Minskie: Minskie-1:"))
	(append "\n")
	(append (cat "Minskie:Minskie.exe"))
	(append "\n")
)
(protect (cat "Sys:RunMinskie") "+s")

; ----------------------------------------------------------
; Set up assigns so game can be run after quitting installer 
; ----------------------------------------------------------
(makeassign "Minskie-1" minskie_dest)
(makeassign "Minskie-2" minskie_dest)
(makeassign "Minskie-3" minskie_dest)
(makeassign "Minskie-4" minskie_dest)

