;
; $VER: PopupMenuInstaller V1.1 (23.3.97)
; Copyright 1996-1997 Henrik Isaksson
;

(complete 0)

(welcome "Welcome to the PopupMenu Library Developer Package Installer!")

(copylib
	(prompt		"Installing the popupmenu.library...")
	(help		@copylib-help)
	(source		"/Libs/popupmenu.library")
	(dest		"LIBS:")
	(optional	force askuser)
	(confirm)
)

(complete 10)

(if	(askbool
		(prompt "Do you want to install the C include-files?")
		(help "You will only need theese files if you are a C-programmer.")
		(default 0)
	)
	(
		(set #incdest (askdir
			(prompt "In wich directory or assign do you keep your include-files?")
			(help "This will install the needed C-headers if you are going to develop your own menus.")
			(newpath)
			(default "INCLUDE:")
		))

		(copyfiles
			(prompt "Copying Include files.")
			(help @copyfiles-help)
			(source "/Include")
			(dest #incdest)
			(pattern "~(#?.info)")
		)
	)
)

(complete 20)

(if	(askbool
		(prompt "Do you want to install the beta release of the preferences program?")
		(help " ")
		(default 0)
	)
	(
		(set #prefsdest (askdir
			(prompt "Where do you keep your preferences programs?\nBoth the MUI and BGUI version will be copied.")
			(help @askdir-help)
			(newpath)
			(default @prefsdest)
		))

		(complete 30)

		(copyfiles
			(prompt "Copying preferences programs.")
			(help @copyfiles-help)
			(source "/prefs")
			(dest #prefsdest)
			(pattern "#?")
		)
	)
)

(complete 50)

(if	(askbool
		(prompt "Do you want to install the Demo programs and Developer Documentation?")
		(help "You will only need theese files if you are a programmer or want to see what popupmenu.library does.")
		(default 0)
	)
	(

		(set #pmdest (askdir
			(prompt "Where do you want to install the demos and documentation?\nA new directory will be created.")
			(help @askdir-help)
			(newpath)
			(default @default-dest)
		))

		(makedir (tackon #pmdest "PopupMenu/"))
	
		(complete 70)

		(copyfiles
			(prompt "Copying demo apps and docs.")
			(help @copyfiles-help)
			(source "/")
			(dest (tackon #pmdest "PopupMenu/"))
			(pattern "(demos#?|#?.guide#?)")
		)

		(set @default-dest (tackon #pmdest "PopupMenu/"))
	)
)

(complete 99)

(exit)
