;
;$VER: 1.0 SerialPrefs Installer (C) 1997 by Lorenzo Succi.
;

(welcome "Welcome to the SerialPrefs Installer v1.0")
(set @app-name "SPInstall")
(set #DESTDIR "SYS:Prefs")

(set #DESTLIB "Libs:")
(set #DEFICON 0)
(set #GETICON 0)
(set #DEFLIB 0)


(message "\n\nWelcome to the SerialPrefs Installer\n"
		 "(c) 1996-97 Lorenzo Succi.\n\n"
		 "This program install the SerialPrefs"
		 " in your computer.\n"
		 "SerialPrefs enhance the control and the power\n"
		 "of your serial.device.\n"
                 "Read the documentation for more informations.\n\n"

)

(set #DESTDIR
	(askdir
		(prompt "Select the drawer where do you want to install SerialPrefs\n"
		)
		(help @askdir-help)
		(default #DESTDIR)
	)
)
(set @default-dest #DESTDIR)

(set #GETICON
	(askchoice
		(prompt "Select the icon type for SerialPrefs.\n"
				
		)
		(help @askchoice-help)
		(choices "Normal"
			 "Magic Wb"
			 "Newicon"
		(default #DEFICON)
	)
)

)



(copyfiles
	(prompt "Copying Gui.library")
	(help @copyfiles-help)
	(source "libs/Gui.library")
	(dest #DESTLIB)
	(noposition)
	(optional fail force)
)


(copyfiles
	(prompt "Copying SerialPrefs")
	(help @copyfiles-help)
	(source "bin/SerialPrefs")
	(dest #DESTDIR)
	(noposition)
	(optional fail force)
)



(if (= #GETICON 0)
(copyfiles
	(prompt "Copying default icon")
	(help @copyfiles-help)
	(source "icons/NN")
	(newname "SerialPrefs.info")
	(dest #DESTDIR)
	(noposition)
	(optional fail force)
)

endif)

(if (= #GETICON 1)
(copyfiles
	(prompt "Copying MagicWb icon")
	(help @copyfiles-help)
	(source "icons/MWB")
	(newname "SerialPrefs.info")
	(dest #DESTDIR)
	(noposition)
	(optional fail force)
)

endif)

(if (= #GETICON 2)
(copyfiles
	(prompt "Copying Newicon icon")
	(help @copyfiles-help)
	(source "icons/NI")
	(newname "SerialPrefs.info")
	(dest #DESTDIR)
	(noposition)
	(optional fail force)
)

endif)

