(complete 0)

(set versionnumber (getversion "exec.library" (resident)))
(set version (/ versionnumber 65536))

(if (< version 37)
 (
  (abort "Sie benötigen mindestens OS 2.0, um das Programm MultiIndicator zu nutzen.")
 )
)
 
(set programdir
 (askdir
  (prompt  "Wählen Sie das Verzeichnis aus, in welches dann das Programm MultiIndicator installiert wird.")
  (help    "")
  (default "SYS:")
  (newpath)
 )
)

(set @default-dest programdir)

(copyfiles
 (prompt "Kopiere MultiIndicator-Hauptprogramm...")
 (source "/MI")
 (infos)
 (dest programdir)
)

(complete 62)

(copyfiles
 (prompt  "Kopiere MultiIndicator-Hilfedatei nach ENVARC:MIndicator/...")
 (source  "/MI_D.help")
 (dest    "ENVARC:MIndicator")
 (newname "MI.help")
)
(copyfiles
 (prompt  "Kopiere MultiIndicator-Hilfedatei nach ENV:MIndicator/...")
 (source  "/MI_D.help")
 (dest    "ENV:MIndicator")
 (newname "MI.help")
)

(complete 69)

(if (askbool
     (prompt "\n\nSoll die Anleitung zu MultiIndicator kopiert werden?")
     (help   "")
    )
    (
     (set documentdir
      (askdir
       (prompt  "Wählen Sie das Verzeichnis aus, in welches dann die MultiIndicator-Anleitung installiert wird.")
       (help    "")
       (default "SYS:")
       (newpath)
      )
     )

     (set @default-dest documentdir)

     (copyfiles
      (prompt  "Kopiere Anleitung zu MultiIndicator...")
      (source  "/MIndicator_D.guide")
      (infos)
      (dest documentdir)
      (newname "MIndicator.guide")
     )
    )
)

(set @default-dest programdir)

(complete 97)

(if (exists "Locale:Catalogs/Deutsch")
 (if (askbool
      (prompt "\n\nSoll der deutsche Catalog installiert werden?")
      (help   "")
     )
     (
      (copyfiles
       (prompt "Installiere deutschen Catalog für MultiIndicator...")
       (source "/Catalogs/Deutsch/MI.catalog")
       (dest   "Locale:Catalogs/Deutsch")
      )
     )
 )
)

(complete 99)

(exit)
