; *** EGSA2410Driver Installation Script ***

(transcript "Installing the EGSA2410Driver...")

(set #About
    (cat "EGSA2410Driver installation\n\n"
         "EGS Driver for the A2410 U.Lowell TIGA Board\n"
         "This is a Pre-Release !\n\n"
         "©1994/1995 Jürgen Schober\nGraz - Austria\n"
         "e-mail : point@sbox.tu-graz.ac.at")
)

(set #AskDriverDirMsg  
    (cat "Select the directory where the A2410 driver\n"
	     "should be stored (EGS:Startup/)")
)

(set #AskPrefsDirMsg  
    (cat "Select the directory where the Prefs program\n"
	     "should be stored (EGS:EGS-Prefs/)")
)

(set #AskEGSIconMsg  
    (cat "Select the directory where the EGS-Icon for\n"
	 	 "the Prefs Program should be stored (EGS:EGS-Icons/)")
)

(set #EndMsg 
    (cat "\nBefore the Driver could be use the default setup must be set !\n"
         "\n Press Proceed to run the A2410Prefs !\n"
         "\nWhich version should I run ?\n")
)

(message #About)

(set @dest "egs:startup")
(set @dest (expandpath @dest))
(set destination 
    (askdir
        (prompt #AskDriverDirMsg)
        (help @askdir-help)
        (default @dest)
    )
)

(set @driverdir destination)
(copyfiles
	(prompt "Installing Driver...")
	(source "EGSA2410Driver")
	(dest destination)
	(infos)
	(help @copyfiles-help)
)

(complete 25)

(set @dest "egs:egs-prefs/")
(set @dest (expandpath @dest))
(set destination 
    (askdir
        (prompt #AskPrefsDirMsg)
        (help @askdir-help)
        (default @dest)
    )
)

(complete 50)

(copyfiles
	(prompt "Installing Prefs file...")
	(source "EGSA2410Prefs")
	(dest destination)
	(infos)
	(help @copyfiles-help)
)

(set @dest "egs:egs-icons/")
(set @dest (expandpath @dest))
(set destination 
    (askdir
        (prompt #AskEGSIconMsg)
        (help @askdir-help)
        (default @dest)
    )
)
(copyfiles
	(prompt "Installing EGSIcon file...")
	(source "EGS-Icons/EGSA2410Prefs")
	(dest destination)
	(help @copyfiles-help)
)

(complete 75)

(set name
    (askchoice
        (prompt #EndMsg)
        (help @askchoice-help)
        (choices "EGS Version" "MUI Version (requires MUI 2.3)")
        (default 0)
    )
)

(if (= name 0)
    (run (cat "stack 20000\nEGSA2410Prefs egs"))
    (run (cat "stack 20000\nEGSA2410Prefs mui"))
)

(message (cat "\n\nPlease add \n\n\"Wait 4 secs\"\n\n"
              "after the line \"Execute T:Startup\"\n"
              "to your file devs:monitors/EGS !")
)

(complete 100)

(set @default-dest @driverdir)
(exit)
