; $VER: Install_DRAFU.script V1.00 (28.12.95)
;  1993-95 by Andreas R. Kleinert.

(set selectlang (askchoice
                   (prompt "")
                   (help @askchoice-help)
                   (choices "Deutsche Installation" "English Installation")
                   (default 1)
                 )
)

(if (= selectlang 0) (set @language "deutsch")  )
(if (= selectlang 1) (set @language "english")  )

(if (= @language "deutsch")
  (
    (set MSG_wrong_OS       (cat "Sie bentigen mindestens OS V2.04 fr DRAFU !\n\n"
                                 "DRAFU wird auf Ihrem System nicht laufen !"))
    (set MSG_InstallingDRAFU "Installiere jetzt DRAFU. Die Libraries mssen separat installiert werden !")
    (set MSG_SelectPath          "Whlen Sie das Zielverzeichnis fr DRAFU")
    (set MSG_InstallingCatalogs  "Installiere jetzt die Katalog-Dateien fr die\nOS V2.1+ Sprach-Untersttzung.")
    (set MSG_SelectCatalogPath   "Whlen Sie den Pfad fr die Katalog-Dateien")
    (set MSG_DoInstallDRAFU  "DRAFU wurde installiert.")
    (set MSG_DRAFUPath       "Modifiziere jetzt S:User-Startup fr einen Suchpfad...")
  )
)

(if (= @language "english")
  (
    (set MSG_wrong_OS       (cat "You need at least OS V2.04 to run DRAFU !\n\n"
                                 "DRAFU will not run with your system configuration !"))
    (set MSG_InstallingDRAFU "Installing DRAFU now. Libraries have to be installed separately !")
    (set MSG_SelectPath          "Select path to install DRAFU to")
    (set MSG_InstallingCatalogs  "Installing Catalog-Files for OS V2.1+\nCode localization.")
    (set MSG_SelectCatalogPath   "Select path to install Catalogs to")
    (set MSG_DoInstallDRAFU  "DRAFU has been installed.")
    (set MSG_DRAFUPath       "Now modifying your S:User-Startup for a search path...")
  )
)

(set OS_VER (/ (getversion) 65536) )

(if(< OS_VER 37)
  (abort MSG_wrong_OS)
)

(complete 0)

(copyfiles
  (prompt MSG_Installing)
  (help @copyfiles-help)
  (source "")
  (set svcomdir
              (askdir
                     (prompt MSG_SelectPath)
                     (help @askdir-help)
                     (newpath)
                     (default "SYS:DRAFU")
              )
  )
  (dest svcomdir)
  (all)
  (confirm)
)

(complete 70)

(copyfiles
  (prompt MSG_InstallingCatalogs)
  (help @copyfiles-help)
  (source "locale/catalogs")
  (set svcomdir
              (askdir
                     (prompt MSG_SelectCatalogPath)
                     (help @askdir-help)
                     (newpath)
                     (default "SYS:locale/Catalogs")
              )
  )
  (dest svcomdir)
  (all)
  (confirm)
)

(startup "DRAFU"
  (prompt MSG_DRAFUPath)
  (help @startup-help)
  (command "Path "svcomdir" ADD\n")
)

(complete 99)

(exit MSG_DoInstallDRAFU)
