;Install-Script für FLM-Shareware-Version (noDisk) (c) 1995 Denis Unger

(complete 0)

(if (= @language "deutsch")
; Deutsche Installation
(
 (set default-lang 1)

 (set #flmdestination
   (cat "Bitte Zielverzeichnis von FLM auswählen.\n"
         "Ein Verzeichnis FLM wird automatisch erstellt."
   )
 )
 (set #copyhothelplib_nc "Copy hothelplib.deutsch ...")
 (set #copyhothelp3prefs "Kopiere Prefs-Datei für Hothelp ...")
 (set #copyflm_catalog "Kopiere flm.catalog ...")
 (set #copyhothelplib_catalog "Kopiere hothelplib.catalog ...")
 (set #copyhothelp_lib "Kopiere hothelp.library ...")
 (set #copyhothelp_handler "Kopiere HothelpHandler ...")
 (set #copyflmfiles "Kopiere FLM-Dateien ...")
))
(if (= @language "english")
; English installation
(
 (set default-lang 2)
 (set #flmdestination
   (cat "Please choose destination directory for FLM.\n"
        "A directory FLM will be created."
   )
 )
 (set #copyhothelplib_nc "Copy hothelplib.english ...")
 (set #copyhothelp3prefs "Copy prefs-file for Hothelp ...")
 (set #copyflm_catalog "Copy flm.catalog ...")
 (set #copyhothelplib_catalog "Copy hothelplib.catalog ...")
 (set #copyhothelp_lib "Copy hothelp.library ...")
 (set #copyhothelphandler "Copy HothelpHandler ...")
 (set #copyflmfiles "Copy FLM-files ...")
;...
;...
;...
))
(if (= @language "français")
; France installation
(
 (set default-lang 3)
 (set #flmdestination
   (cat "Please choose destination directory for FLM.\n"
        "A directory FLM will be created."
   )
 )
 (set #copyhothelplib_nc "Copy hothelplib.english ...")
 (set #copyhothelp3prefs "Copy prefs-file for Hothelp ...")
 (set #copyflm_catalog "Copy flm.catalog ...")
 (set #copyhothelplib_catalog "Copy hothelplib.catalog ...")
 (set #copyhothelp_lib "Copy hothelp.library ...")
 (set #copyhothelphandler "Copy HothelpHandler ...")
 (set #copyflmfiles "Copy FLM-files ...")
;...
;...
;...
))

;get workbench version
(set vernum (getversion))
(set wbver (/ vernum 65536))

(set flm-path
    (askdir
        (prompt #flmdestination)
        (help "")
        (default @default-dest)
    )
)
(set @default-dest (tackon flm-path "FLM"))

(makedir
    (@default-dest)
    (infos)
)
;now a directory FLM exists

(if (= default-lang 1)
; German
 (if (< wbver 38)
       (copyfiles
            (prompt #copyhothelplib_nc)
            (help "")
            (source "hothelp/deutsch/hothelplib.deutsch")
            (dest @default-dest)
       )
       (
        (copylib
            (prompt #copyhothelplib_catalog)
            (help "")
            (source "locale/catalogs/deutsch/hothelplib.catalog")
            (dest "locale:catalogs/deutsch")
                (confirm)
        )
        (copyfiles
           (prompt #copyhothelp3prefs)
           (help "")
           (source "hothelp/deutsch/hothelp3.pref")
           (dest @default-dest)
        )
       )
 )
)
(if (= default-lang 2)
;English
 (if (< wbver 38)
       (copyfiles
            (prompt #copyhothelp_nc)
            (help "")
            (source "hothelp/english/hothelplib.english")
            (dest @default-dest)
       )
       (
        (copylib
            (prompt #copyflm_catalog)
            (help "")
            (source "locale/catalogs/english/flm.catalog")
            (dest "locale:catalogs/english")
                (confirm)
        )
        (copyfiles
           (prompt #copyhothelp3prefs)
           (help "")
           (source "hothelp/english/hothelp3.pref")
           (dest @default-dest)
        )
       )
 )
)
(if (= default-lang 3)
;France
 (if (< wbver 38)
       (copyfiles
            (prompt #copyhothelplib_nc)
            (help "")
            (source "hothelp/français/hothelplib.english")
            (dest @default-dest)
       )
       (
        (copylib
            (prompt #copyflm_catalog)
            (help "")
            (source "locale/catalogs/français/flm.catalog")
            (dest "locale:catalogs/français")
                (confirm)
        )
        (copyfiles
           (prompt #copyhothelp3prefs)
           (help "")
           (source "hothelp/français/hothelp3.pref")
           (dest @default-dest)
        )
       )
 )
)

(complete 10)

(copylib
    (prompt #copyhothelp_lib)
    (help "")
    (source "libs/hothelp.library")
    (dest "libs:")
    (confirm)
)

(complete 20)

(copylib
    (prompt #copyhothelphandler)
    (help "")
    (source "l/HotHelpHandler")
    (dest "l:")
    (confirm)
)

(complete 25)

(copyfiles
    (prompt #copyflmfiles)
    (help "")
    (all)
    (source "FLM")
    (dest @default-dest)
)

(complete 100)

(exit)

