;
; Legacy of Sorasil Install Script - Kevin Dudley
;


; Find Destination for Install
;

(set @default-dest
	(askdir
		(prompt "Please specify the drawer (or partition) where you wish to install \"Legacy of Sorasil\" to.")
		(help @askdir-help)
		(default @default-dest)
		(disk)
	)
)


; Is there enough disk space to complete the installation?
;

(set diskspace
	(getdiskspace @default-dest)
)


(if (< diskspace 1900000)
	(abort "Legacy of Sorasil needs approximately 1900000 bytes of disk space to install and you only have " diskspace " bytes free.")

)

(set user-dir
	(askstring
		(prompt "Enter the name you wish to call the drawer where \"Legacy of Sorasil\" will be installed.")
		(help @askstring-help)
		(default "Sorasil")
	)
)

(set default-dir
	(cat @default-dest user-dir)
)

(makedir default-dir
	(prompt "A drawer called \"" user-dir "\" will now be created in your \"" @default-dest "\" drawer (or partition).")
	(help @makedir-help)
	(infos)

)


(complete 2)


; Disk One
;


(copyfiles
	(prompt "Copying files from \"Legacy of Sorasil DISK 2\"...")
	(help @copyfiles-help)
	(source "Legacy of Sorasil DISK 2:")
	(dest default-dir)
	(choices "LegacyOfSorasil" "FastG.Bin" "GameG.Bin" "ReadMe" "ReadMe.info" "Bits" "Charts" "Glued" "Sketch")
)

(complete 30)


(copyfiles
	(prompt "Copying files from \"Legacy of Sorasil DISK 2\"...")
	(help @copyfiles-help)
	(source "Legacy of Sorasil DISK 2:LegacyOfSorasil.inf")
	(dest default-dir)
	(newname "LegacyOfSorasil.info")
)


(complete 32)


(copyfiles
	(prompt "Copying files from \"Legacy of Sorasil DISK 2\"...")
	(help @copyfiles-help)
	(source "Legacy of Sorasil DISK 2:SaveGame")
	(dest default-dir)
	(newname "FrogAndParrot")
)


(complete 34)

; Disk Two
;


(askdisk
	(prompt "DISK 2 Complete.\n Please insert your \"Legacy of Sorasil DISK 1\".")
	(help @askdisk-help)
	(dest "Legacy of Sorasil DISK 1")
)

(copyfiles
	(prompt "Copying files from \"Legacy of Sorasil DISK 1\"...")
	(help @copyfiles-help)
	(source "Legacy of Sorasil DISK 1:")
	(dest default-dir)
	(all)
)

(complete 80)

; Disk Three
;

(askdisk
	(prompt "DISK 1 Complete.\n Please insert your \"Legacy of Sorasil DISK 3\".")
	(help @copyfiles-help)
	(dest "Legacy of Sorasil DISK 3")
)

(copyfiles
	(prompt "Copying files from \"Legacy of Sorasil DISK 3\"...")
	(help @copyfiles-help)
	(source "Legacy of Sorasil DISK 3:")
	(dest default-dir)
	(all)
)

(complete 100)

; Installation Complete
;

(exit "Now put your \"Legacy of Sorasil\" Disks\nin a safe place.")

