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

(if (= @language "deutsch")
; Deutsche Installation
(
 (set default-lang 1)
 (set #lpath "deutsch")
 (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 ...")
 (set #copyonlinehelp "Kopiere Online-Hilfe ...")
))
(if (= @language "english")
; English installation
(
 (set default-lang 2)
 (set #lpath "english")
 (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 ...")
 (set #copyonlinehelp "Copy Online help ...")
))
(if (= @language "français")
; France installation
(
 (set default-lang 3)
 (set #lpath "français")
 (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 ...")
 (set #copyonlinehelp "Copy Online help ...")
))

;get workbench version
(set vernum (getversion "libs:version.library"))
(set wbver (/ vernum 65536))

(complete 0)

(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

(complete 10)

;copy hothelp needed files ...
(copyfiles
    (prompt #copyhothelplib_nc)
    (help "")
    (all)
    (source (cat "hothelp/" #lpath))
    (dest @default-dest)
)
;copy catalogs ...
(if (> wbver 37)
  (copylib
    (prompt #copyhothelplib_catalog)
    (help "")
;    (all)
    (source (cat "locale/catalogs/" #lpath))
    (dest (cat "locale:catalogs/" #lpath))
    (confirm)
  )
)

(complete 20)

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

(complete 80)

;Online-Help
(copyfiles
 (prompt #copyonlinehelp)
 (help "")
 (all)
 (source (cat "dokumentation/" #lpath))
 (dest (cat @default-dest "/Projekte"))
)

(complete 90)

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

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

(complete 100)

(exit)

