; $VER: Indiana Jones and the Last Crusade HD Install-Script V1.0 (03/1998) by Jeroen Borgmeyer

(set GameDir @app-name)

;try to figure out a place where the user usually installs his games
(if (exists "Games:" (noreq) )
    (set @default-dest "Games:")
    (if (exists "SYS:Games" (noreq) )
        (set @default-dest "SYS:Games")
        (if (exists "Work:Games" (noreq) )
            (set @default-dest "Work:Games")
            (if (exists "JEUX:" (noreq) )
               (set @default-dest "JEUX:")
               (set @default-dest "SYS:")
            )
        )
    )
)


;ask the user to select a directory to install the game into
(set default-dest
     (tackon (askdir (prompt "Where would you like " @app-name " installed?\n"
                             "A drawer called " GameDir " will be created.")
                     (help @askdir-help)
                     (default @default-dest)
                     (newpath)
             )
     GameDir
     )
)
(set @default-dest default-dest)

;create the selected directory
(makedir @default-dest
         (infos)
)

;copy all extra files to the destination directory
(copyfiles (source "LastCrusadeHD.readme")
           (dest @default-dest)
           (all)
           (infos) 
)


(askdisk
	(prompt "\n\n\n\n\n\nPlease insert Indiana Jones and the Last Crusade Disk 1 in any drive")
	(dest	"Indy 1")
	(help	"Insert Indiana Jones and the Last Crusade disk 1 please!")
)

(copyfiles (source "Indy 1:")
           (dest @default-dest)
	   (files)
           (infos)
	   (pattern "#?")
)

;Making the Rooms directory and copying the contents form the 3 disks

(makedir ("%s/Rooms" @default-dest))


(copyfiles (source "Indy 1:Rooms")
                   (dest ("%s/Rooms" @default-dest))
		   (all)
                   (infos)
)

(askdisk
	(prompt "\n\n\n\n\n\nPlease insert Indiana Jones and the Last Crusade Disk 2 in any drive")
	(dest	"Indy2")
	(help	"Insert Indiana Jones and the Last Crusade disk 2 please!")
)

(copyfiles (source "Indy2:")
           (dest @default-dest)
	   (files)
	   (pattern "#?")
)

(copyfiles (source "Indy2:Rooms")
                   (dest ("%s/Rooms" @default-dest))
		   (all)
                   (infos)
)

(askdisk
	(prompt "\n\n\n\n\n\nPlease insert Indiana Jones and the Last Crusade Disk 3 in any drive")
	(dest	"Indy3")
	(help	"Insert Indiana Jones and the Last Crusade disk 3 please!")
)

(copyfiles (source "Indy3:")
           (dest @default-dest)
	   (files)
	   (pattern "#?")
)

(copyfiles (source "Indy3:Rooms")
                   (dest ("%s/Rooms" @default-dest))
		   (all)
                   (infos)
)

(delete (tackon @default-dest "disk.info")
)