(complete 0)
(set default_lang 4)

(set #bad-kick
(cat "You must be using Kickstart 3.0 to install this game"
))

(set #which-disk
(cat "In which partition should the game be installed?"
))

(set #which-disk-help
(cat "\nThis section lets you choose on which hard drive partition the "
     "Game files will be installed. "
     @askdir-help
))

;=============================================================================
; make sure we are running under V39

(if (< (/ (getversion) 65536) 39)
(
    (abort #bad-kick)
))

(user 0)
(welcome)
(set old_level @user-level)

;=============================================================================
; get the version from medplayer.library currently installed

	(if (= (exists "Libs:medplayer.library") 1)
		(
		(protect "Libs:medplayer.library" "+rwed")
		)
	)
	(copylib
		(prompt	("Copying %s to %s" "REKO01:libs/medplayer.library" "Libs:"))
		(help	copyLibFileHelp
			"\n"
			"If you already have a copy of this library in the selected destination directory, the library "
			"included on the distribution disk will be compared to the one you "
			"already have. If your current library is an old version, the newer "
			"version will be installed.\n"
			"\n"
			@copylib-help
		)
		(source "REKO01:libs/medplayer.library")
		(dest "Libs:")
		(confirm)
	)

(complete 5)

;=============================================================================
; get target directory where game is to be installed

(set old_wb ("SYS:"))
(user 2)
(set target (askdir (prompt #which-disk)
				(help #which-disk-help)
				(default "")
				(disk)
		))
(user old_level)

(makedir (tackon target "REKO-Productions"))
(set wtarget target)

(copyfiles (source "REKO01:REKO.infa")
	   (dest wtarget)
)
(rename (tackon wtarget "REKO.infa") (tackon wtarget "REKO-Productions.info"))

(set target (tackon target "REKO-Productions"))
(set @default-dest target)
(set wtarget target)

;=============================================================================
; Put REKOCHARS in Fonts: directory

(copyfiles (source "REKO01:FONTS")
	   (dest "FONTS:")
	   (pattern "REKO#?")
)

;=============================================================================
; Put REKO command in C: directory

(copyfiles (source "REKO01:C/REKO")
	   (dest "C:")
)

;=============================================================================
; make some new drawers

(makedir (tackon wtarget "PICS"))
(makedir (tackon wtarget "MUSIC"))
(makedir (tackon wtarget "CARDS"))


(copyfiles (source "REKO01:REKO.infa")
	   (dest wtarget)
)
(rename (tackon wtarget "REKO.infa") (tackon wtarget "MAKE-CARDS.info"))

(copyfiles (source "REKO01:Klondike-Deluxe-AGA.info")
	   (dest wtarget)
)

(copyfiles (source "REKO01:Klondike-Deluxe-AGA.HD")
	   (dest wtarget)
)
(rename (tackon wtarget "Klondike-Deluxe-AGA.HD") (tackon wtarget "Klondike-Deluxe-AGA"))

(copyfiles (source "REKO01:REKO.Prefs.HD")
	   (dest wtarget)
)
(rename (tackon wtarget "REKO.Prefs.HD") (tackon wtarget "REKO.Prefs"))

(complete 10)

(copyfiles (source "REKO01:Intro.MUSX")
	   (dest (tackon wtarget "MUSIC"))
)

(complete 20)

(copyfiles (source "REKO01:Intro.REKO")
	   (dest (tackon wtarget "PICS"))
)

(complete 30)

(copyfiles (source "REKO01:")
	   (dest wtarget)
	   (pattern "REKO.Docs#?")
)

(complete 31)

(copyfiles (source "REKO01:FullView")
	   (dest wtarget)
)

(complete 32)

(copyfiles (source "REKO01:")
	   (dest wtarget)
	   (pattern "REKO.QRCard#?")
)

(complete 33)

(copyfiles (source "REKO02:Default.REKO")
	   (dest (tackon wtarget "CARDS"))
)

(complete 66)

(copyfiles (source "REKO03:")
	   (dest wtarget)
	   (pattern "MAKE#?")
)

(complete 70)

(copyfiles (source "REKO03:Default.MUSX")
	   (dest (tackon wtarget "MUSIC"))
)

(complete 80)

(copyfiles (source "REKO03:Default.WINM")
	   (dest (tackon wtarget "MUSIC"))
)

(complete 90)

(copyfiles (source "REKO03:Default.WINP")
	   (dest (tackon wtarget "PICS"))
)

(complete 100)
