;; Movieguide Pro V1.0 Installer
;; (C) Simon Ravn 1995
;; Revision 1.0

(welcome "Welcome to the MovieGuide Pro 1.0 installation.")

(set is_update 0)
(set @app-name "MovieGuide Pro")
(set app-name "MovieGuide Pro")
;(set tmp @user-level)
(set @user-level 2)
(user 2)
;(user tmp)

(set instdir
	(askdir
		(prompt "Please select a destination path for MovieGuide Pro "
                        "State full pathname, e.g. DH0:Tools/MovieGuide")
		(help @askdir-help)
		(default "SYS:MovieGuide")
		(newpath)
		(disk)
	)
)
	(
		(if ( = (exists instdir (noreq)) 0)   ;if selected path doesn't exist...
			;then create dir
			(makedir instdir
				(prompt ("creating directory \"%s\"" instdir))
				(help @makedir-help)
				(infos)
				(confirm)
			)
			;else directory is already there - use it.
			;()
		)
	)
(set install_options
	(askoptions
		(prompt "Please select the items to install with MovieGuide Pro.")
		(help @askoptions-help)
		(choices 
                        "Main Files"
                        "Movie Data Files"
			"Extended Movie Data Files"
                        "Biographies"                        
			"Plot Summaries"
			"Trivia/Goofs/Quotes Data"
                        "Biography Pictures"
			"Movie Pictures")
		(default 255)
	)
)
(
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 1\" in any drive.")
		(help @askdisk-help)
		(dest "MG_Pro1")
		(assigns)
	)
	(copyfiles
	(source "MG_Pro1:c/Lharc")
	(dest instdir)
	)
        (copyfiles
        (source "MG_Pro1:libs/Medplayer.library")
        (dest "libs:")
	)
)
(set DeArcher (tackon instdir "lharc"))
(if (IN install_options 0)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Main Files...")
					(run 
	                        	("%s\ -f x \MG_Pro1:bin.lha \ >nil:" DeArcher)
				)
					(run 
	                        	("%s\ -f x \MG_Pro1:misc.lha \ >nil:" DeArcher)
				)
					(run 
	                        	("%s\ -f x \MG_Pro1:fonts.lha \ >nil:" DeArcher)
				)

			)
		)
	)

(if (IN install_options 5)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 1\" in any drive.")
		(help @askdisk-help)
		(dest "MG_Pro1")
		(assigns)
	)
)

(if (IN install_options 5)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Trivia/Goofs/Quotes...")
					(run 
	                        	("%s\ -f x \MG_Pro1:DATAMISC.lha \ >nil:" DeArcher)
				)
			)
		)
	)

(if (IN install_options 3)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 2\" in any drive.")
		(help @askdisk-help)
		(dest "MG_Pro2")
		(assigns)
	)
)
(if (IN install_options 3)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biographies...")
					(run 
	                        	("%s\ -f x \MG_Pro2:bio.lha \ >nil:" DeArcher)
				)
			)
		)
	)

(if (IN install_options 4)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 2\" in any drive.")
		(help @askdisk-help)
		(dest "MG_Pro2")
		(assigns)
	)
)
(if (IN install_options 4)
	(
		(set @execute-dir instdir)

			(
		                (working "Installing MovieGuide Pro Plot Summaries...")
					(run 
	                        	("%s\ -f x \MG_Pro2:Plot.lha \ >nil:" DeArcher)
				)
			)
		)
	)

(if (IN install_options 1)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 3\" in any drive.")
		(help @askdisk-help)
		(dest "MG_Pro3")
		(assigns)
	)
)
(if (IN install_options 1)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Data Files (1/2)...")
					(run 
	                        	("%s\ -f x \MG_Pro3:MGDAT1.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 1)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 4\" in any drive.")
		(help @askdisk-help)
		(dest "MG_Pro4")
		(assigns)
	)
)
(if (IN install_options 1)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Data Files (2/2)...")
					(run 
	                        	("%s\ -f x \MG_Pro4:MGDAT2.lha \ >nil:" DeArcher)
				)
			)
		)
	)

(if (IN install_options 2)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 5\" in any drive.")
		(help @askdisk-help)
		(dest "MG_Pro5")
		(assigns)
	)
)
(if (IN install_options 2)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Extended Data Files...")
					(run 
	                        	("%s\ -f x \MG_Pro5:MGEXTDAT.lha \ >nil:" DeArcher)
				)
			)
		)
	)

(if (IN install_options 6)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 6\" in any drive.")
		(help @askdisk-help)
		(dest "Persons_1")
		(assigns)
	)
)
(if (IN install_options 6)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biography Pics...")
					(run 
	                        	("%s\ -f x \Persons_1:Persons1.lha \ >nil:" DeArcher)
				)
			)
		)
	)

(if (IN install_options 6)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 7\" in any drive.")
		(help @askdisk-help)
		(dest "Persons_2")
		(assigns)
	)
)
(if (IN install_options 6)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biography Pics...")
					(run 
	                        	("%s\ -f x \Persons_2:Persons2.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 6)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 8\" in any drive.")
		(help @askdisk-help)
		(dest "Persons_3")
		(assigns)
	)
)
(if (IN install_options 6)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biography Pics...")
					(run 
	                        	("%s\ -f x \Persons_3:Persons3.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 6)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 9\" in any drive.")
		(help @askdisk-help)
		(dest "Persons_4")
		(assigns)
	)
)
(if (IN install_options 6)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biography Pics...")
					(run 
	                        	("%s\ -f x \Persons_4:Persons4.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 6)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 10\" in any drive.")
		(help @askdisk-help)
		(dest "Persons_5")
		(assigns)
	)
)
(if (IN install_options 6)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biography Pics...")
					(run 
	                        	("%s\ -f x \Persons_5:Persons5.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 6)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 11\" in any drive.")
		(help @askdisk-help)
		(dest "Persons_6")
		(assigns)
	)
)
(if (IN install_options 6)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biography Pics...")
					(run 
	                        	("%s\ -f x \Persons_6:Persons6.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 6)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 12\" in any drive.")
		(help @askdisk-help)
		(dest "Persons_7")
		(assigns)
	)
)
(if (IN install_options 6)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Biography Pics...")
					(run 
	                        	("%s\ -f x \Persons_7:Persons7.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 7)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 13\" in any drive.")
		(help @askdisk-help)
		(dest "Movie_1")
		(assigns)
	)
)
(if (IN install_options 7)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Movie Pics...")
					(run 
	                        	("%s\ -f x \Movie_1:Movie1.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 7)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 14\" in any drive.")
		(help @askdisk-help)
		(dest "Movie_2")
		(assigns)
	)
)
(if (IN install_options 7)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Movie Pics...")
					(run 
	                        	("%s\ -f x \Movie_2:Movie2.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 7)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 15\" in any drive.")
		(help @askdisk-help)
		(dest "Movie_3")
		(assigns)
	)
)
(if (IN install_options 7)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Movie Pics...")
					(run 
	                        	("%s\ -f x \Movie_3:Movie3.lha \ >nil:" DeArcher)
				)
			)
		)
	)
(if (IN install_options 7)
	(askdisk sourcedisk
		(prompt "\nPlease insert disk \"MovieGuide Pro Disk 16\" in any drive.")
		(help @askdisk-help)
		(dest "Movie_4")
		(assigns)
	)
)
(if (IN install_options 7)
	(
		(set @execute-dir instdir)
			(
		                (working "Installing MovieGuide Pro Movie Pics...")
					(run 
	                        	("%s\ -f x \Movie_4:Movie4.lha \ >nil:" DeArcher)
				)
			)
		)
	)

(delete DeArcher)

(exit)

;(set @default-dest instdir)
