; 
; $VER: Installation script for EGS-Dock config files (06-18-94)
;
; written by Brian C. Wright
;
; 
;	Installer and Installer project icon
;	(c) Copyright 1991-93 Commodore-Amiga, Inc.  All Rights Reserved.
;	Reproduced and distributed under license from Commodore.
;
;	INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
;	NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
;	OR RESPONSIBILITY IS ASSUMED. 
;
;

(welcome "EGS-Dock Config Installation")

(set confbits   %0000000000)
(set confchoice 0)

(set configf1 "Integrated (A) Blue Prefs")	; %0000000001
(set configf2 "Integrated (A) No Prefs")	; %0000000010
(set configf3 "Integrated (A) icons only")	; %0000000100
(set configf4 "Integrated (A) Rainbow Prefs")	; %0000001000
(set configf5 "Integrated (S) Rainbow Prefs")	; %0000010000
(set configf6 "Integrated (S) with Apps")	; %0000100000
(set configf7 "Non-Integrated with Apps")	; %0001000000
(set configf8 "Non-Integrated icons only")	; %0010000000
(set configf9 "Non-Integrated Orange Prefs")	; %0100000000
(set configf10 "Text only")			; %1000000000

(set config1 "s/IntegratedABluePrefs")
(set config2 "s/IntegratedANoPrefs")
(set config3 "s/IntegratedANoPrefsNoApps")
(set config4 "s/IntegratedARainbowPrefs")
(set config5 "s/IntegratedSRainbowPrefs")
(set config6 "s/IntegratedSAppsNoPrefs")
(set config7 "s/NonIntegratedAppsNoPrefs")
(set config8 "s/NonIntegratedNoPrefsNoApps")
(set config9 "s/NonIntegratedOrangePrefs")
(set config10 "s/TextOnly")

(set configdest "EGS:s/EGSDock.config")

(procedure copyconfig
  (
    (set configsource (tackon egs-dest configsource))
    (copyfiles
         (help @copyfiles-help)
         (source configsource)
         (dest "EGS:s")
         (newname configdest)
    )
  )
)

(set egs-assign
        (getassign "EGS")
)

(if (= egs-assign "")
        (
             (abort "\n\nNo EGS: assign available.\n\n" 
                    "Please assign EGS and restart the installation.")
        )
)

(if (exists "EGS:EGS-Sorcery" (noreq))
    (set egs-dest "EGS:EGS-Sorcery")
    (set egs-dest 
             (askdir
		(prompt "I can't find your EGS-Sorcery installation? "
                        "Where is EGS-Sorcery located?")
                (help @askdir-help)
                (default "EGS:")
             )
    )
)

(set @default-dest "EGS:s")
	
(message "Please note that what you are about to do is install "
         "an EGSDock.config file.  It will not overwrite the old "
         "one if it exists, but will move it to EGSDock.config.bak. "
         "\n\nIf you are unfamiliar with this, you may abort now."
)

(set which-conf-file
        (askchoice
              (prompt "Which configuration file would you like installed?")
              (help @askchoice-help)
              (choices configf1 configf2 configf3 configf4 configf5
                       configf6 configf7 configf8 configf9 configf10
              )
              (default 0)
        )
)

(if (> (exists configdest (noreq)) 0)
        (rename "EGS:s/EGSDock.config" "EGS:s/EGSDock.config.bak")
)



(if (= which-conf-file 0)
    (
	(set configsource config1)
        (copyconfig)
    )
)

(if (= which-conf-file 1)
    (
	(set configsource config2)
        (copyconfig)
    )
)

(if (= which-conf-file 2)
    (
	(set configsource config3)
        (copyconfig)
    )
)

(if (= which-conf-file 3)
    (
	(set configsource config4)
        (copyconfig)
    )
)

(if (= which-conf-file 4)
    (
	(set configsource config5)
        (copyconfig)
    )
)

(if (= which-conf-file 5)
    (
	(set configsource config6)
        (copyconfig)
    )
)

(if (= which-conf-file 6)
    (
	(set configsource config7)
        (copyconfig)
    )
)
(if (= which-conf-file 7)
    (
	(set configsource config8)
        (copyconfig)
    )
)

(if (= which-conf-file 8)
    (
	(set configsource config9)
        (copyconfig)
    )
)

(if (= which-conf-file 9)
    (
	(set configsource config10)
        (copyconfig)
    )
)

(complete 100)
