;
; $VER: Installation de BGUI-Exchange v1.1 (25.7.1995)
;
;
;

        (set UserLevel.old @user-level)

; Initialisation des messages.

        (set Language 16)

        (set #WrongKickStart "\nBGUI-Exchange braucht OS2.04+")



; S'assurer que l'on utilise un KickStart >= à 2.04.

        (if (< (/ (getversion) 65536) 37)
          (abort #WrongKickStart)
        )


(set LangueHelp "Wähle die Sprache aus, in der Du die Dokumentation willst.")

(set IconHelp "Welche Art von Piktogramm wilst Du:\n\n- 4 farbig:          Standard Piktogramme\n- 8 farbig MagicWB : Standard MagicWB\n- NewIcon :          Standard NewIcon")

(set bguiHelp "Die bgui.library erleichtert es, hübsche graphische Oberflächen zu erstellen.\n\nbgui.library   (C) 1993-1995 Jan van den Baard")

(set Refresh  "Wähle einen Refreshmodus für das Fenster")
(set Aspect   "Wähle die Art der Umrahmung:\n\n- AutoAspect:  Behalte das Seitenverhältnis bei\n- Thin:        Dünne Linien\n- Standard:    Wie auf der Workbench")
(set Frame    "Wähle das Aussehen der Buttons")
(set WindowPos  "Wo soll das Fenster geöffnet werden ?")
(set NewLook    "NewLook-Modus verwendet einen weißen Schieberegler für die Liste")


;
; Répertoire de destination
; *************************
;

(set Path.source (pathonly @icon) )

(set  Path.dest
        (askdir
                (prompt "\nWähle oder erstelle ein Verzeichnis, in dem BGUI-Exchange installiert werden soll.\n")
                (help @askdir-help)
                (default "Sys:Tools/Commodities")
        )
)


; Copie de l'executable
; **********************
(copyfiles
        (prompt "Kopiere BGUI-Exchange")
        (help @copyfiles-help)
        (source Path.source)
        (dest Path.dest)
        (choices "BGUI-Exchange" "BGUI-Exchange.info")
)

; Copie du catalogs Allemand
; **************************
(set CatPath (tackon Path.dest "catalogs"))
(makedir CatPath)
(set CatPath (tackon Path.dest "catalogs/deutsch"))
(makedir CatPath)

(copyfiles
    (prompt "Kopiere 'catalog'")
    (source Path.source)
    (dest CatPath)
    (choices "catalogs/deutsch/BGUI-Exchange.catalog")
)

; Copie de la documentation
; *************************
(set Doc (askchoice
            (prompt "Dokumentation zu BGUI-Exchange")
            (choices "French" "English" "Deutsch")
            (help LangueHelp)
            (default 2)

    )
)


    (if (= Doc 0)
        (copyfiles
            (source "BGUI-Exchange_FR.guide")
            (dest Path.dest)
            (newname "BGUI-Exchange.guide")
            (infos)
        )
    )

    (if (= Doc 1)
        (copyfiles
            (source "BGUI-Exchange_ENG.guide")
            (dest Path.dest)
            (newname "BGUI-Exchange.guide")
            (infos)
        )
    )

    (if (= Doc 2)
        (copyfiles
            (source "BGUI-Exchange_D.guide")
            (dest Path.dest)
            (newname "BGUI-Exchange.guide")
            (infos)
        )
    )




; On copie les icônes
; *******************
(set Icon (askchoice
            (prompt "Welche Piktogramme sollen installiert werden ?")
            (choices "4-farbig" "MagicWB" "NewIcon")
            (help IconHelp)
    )
)

    ; MagicWB ?
    ; *********
    (if (= Icon 1)
        (
        (copyfiles
            (source "Icons/EXE_MagicWb.info")
            (dest Path.dest)
            (newname "BGUI-Exchange.info")
        )

        (copyfiles
            (source "Icons/Guide_MagicWb.info")
            (dest Path.dest)
            (newname "BGUI-Exchange.guide.info")
        )
        )
    )

    ; NewIcon ?
    ; *********
    (if (= Icon 2)
        (
        (copyfiles
            (source "Icons/EXE_NewIcon.info")
            (dest Path.dest)
            (newname "BGUI-Exchange.info")
        )

        (copyfiles
            (source "Icons/Guide_NewIcon.info")
            (dest Path.dest)
            (newname "BGUI-Exchange.guide.info")
        )
        )
    )


; Copie de la bgui.library
; ************************
(copylib
    (prompt "Kopiere die bgui.library")
    (source "libs/bgui.library")
    (dest "Libs:")
    (help bguiHelp)
    (confirm)
)




; Parametrage du programme
; ************************

; On prend le chemin de destination et le nom
(set DestName (tackon Path.dest "BGUI-Exchange"))


; ***********
; * REFRESH *
; ***********
(set Icon (askchoice
            (prompt "Welcher Refeshmodus soll verwendet werden ?")
            (choices "SmartRefresh" "SimpleRefresh")
            (help Refresh)
    )
)

    (if (= Icon 0)
        (tooltype
            (settooltype "SMARTREFRESH" "YES")
            (dest DestName)
        )
    )

    (if (= Icon 1)
        (tooltype
            (settooltype "SMARTREFRESH" "NO" )
            (dest DestName)
        )
    )

; **********
; * ASPECT *
; **********
(Set Icon (askchoice
            (prompt "Wie soll das Seitenverhältnis für das Fenster sein ?")
            (choices "Automatisch (wie beim Bildschirm)" "Thin" "Standard")
            (help Aspect)
        )
)
    (if (= Icon 0)
        (tooltype
            (settooltype "ASPECT" "AUTO")
            (dest DestName)
        )
    )

    (if (= Icon 1)
        (tooltype
            (settooltype "ASPECT" "THIN")
            (dest DestName)
        )
    )

    (if (= Icon 2)
        (tooltype
            (settooltype "ASPECT" "STANDARD")
            (dest DestName)
        )
    )

; *********
; * FRAME *
; *********
(Set Icon (askchoice
            (prompt "Welche Umrahmung willst Du ?")
            (choices "Standard" "XEN")
            (help Frame)
        )
)
    (if (= Icon 0)
        (tooltype
            (settooltype "FRAME" "STANDARD")
            (dest DestName)
        )
    )

    (if (= Icon 1)
        (tooltype
            (settooltype "FRAME" "XEN")
            (dest DestName)
        )
    )


; *******************
; * NEWLOOKSCROLLER *
; *******************
(Set Icon (askchoice
            (prompt "Willst Du 'NewLook' für den Schieberegler der Liste ?")
            (choices "Ja" "Nein")
            (default 1)
            (help NewLook)
        )
)
    (if (= Icon 0)
        (tooltype
            (settooltype "NEWLOOKSCROLLER" "YES")
            (dest DestName)
        )
    )

    (if (= Icon 1)
        (tooltype
            (settooltype "NEWLOOKSCROLLER" "NO")
            (dest DestName)
        )
    )


; ******************
; * WINDOWPOSITION *
; ******************
(Set Icon (askchoice
            (prompt "Wo soll das Programm sein Fenster öffnen ?")
            (choices "Bildschirmmitte" "Bei der Maus" "Links oben")
            (help WindowPos)
        )
)
    (if (= Icon 0)
        (tooltype
            (settooltype "WINDOWPOSITION" "CENTERSCREEN")
            (dest DestName)
        )
    )

    (if (= Icon 1)
        (tooltype
            (settooltype "WINDOWPOSITION" "CENTERMOUSE")
            (dest DestName)
        )
    )

    (if (= Icon 2)
        (tooltype
            (settooltype "WINDOWPOSITION" "TOPLEFT")
            (dest DestName)
        )
    )

(message "\nLies bitte die Dokumentation,\num alle Optionen kennenzulernen")


(set @default-dest Path.dest )
        (exit)

