
; Install-script for MiniPlay

(set libsdest "LIBS:")
(set def-dir "SYS:")

(set triton "LIBS/triton.library")
(set ptreplay "LIBS/ptreplay.library")
(set program "MiniPlay")
(set doc "MiniPlay.guide")

;=============================================================================

(set #bad-kick
	(cat "You must be using at least Kickstart 2.04 to be able to run MiniPlay!")
)

(set #copying-triton "Copying triton.library to LIBS:...")
(set #copying-ptreplay "Copying ptreplay.library to LIBS:...")
(set #copying-program "Copying MiniPlay program...")
(set #copying-doc "Copying MiniPlay document...")

(set #install-msg
	(cat "\n\nMiniPlay installation script.\n\n"
	     "This script installs MiniPlay and\n"
	     "required libraries onto your Amiga."
	)
)

;=============================================================================

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

(message #install-msg)

(copylib
	(prompt "\n" #copying-triton)
	(help @copylib-help)
	(source triton)
	(dest libsdest)
	(confirm)
)

(copylib
	(prompt "\n" #copying-ptreplay)
	(help @copylib-help)
	(source ptreplay)
	(dest libsdest)
	(confirm)
)

(set progdest
	(askdir
		(prompt "Choose where you want MiniPlay to be installed")
      		(help "Here you choose a destination for MiniPlay program")
		(default def-dir)
	)
)

(set docdest
	(askdir
		(prompt "Choose where you want the document to be installed")
      		(help "Here you choose a destination for MiniPlay docs")
		(default progdest)
	)
)

(set modpath
	(askdir
		(prompt "Choose MiniPlay's default module-directory")
      		(help "Here you choose the directory in which MiniPlays\n"
		      "filerequestor will open by default.")
		(default def-dir)
	)
)

(copyfiles
	(prompt "\n" #copying-program)
	(help @copyfiles-help)
	(source "")
	(dest progdest)
	(choices program)
	(infos)
)

(copyfiles
	(prompt #copying-doc)
	(help @copyfiles-help)
	(source "")
	(dest docdest)
	(choices doc)
	(infos)
)

(run ("Setenv MiniPlay.prefs \"%s\"" modpath))
(run ("Copy ENV:MiniPlay.prefs ENVARC:"))
