(complete 0)

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

(if (< version 37)
 (
  (abort "You need at least OS 2.0 to use MultiIndicator.")
 )
)
 
(set programdir
 (askdir
  (prompt  "Select the directory you want to install the program MultiIndicator.")
  (help    "")
  (default "SYS:")
  (newpath)
 )
)

(set @default-dest programdir)

(copyfiles
 (prompt "Copying MultiIndicator-mainprogram...")
 (source "/MI")
 (infos)
 (dest programdir)
)

(complete 62)

(copyfiles
 (prompt  "Copying help to ENVARC:MIndicator/...")
 (source  "/MI_GB.help")
 (dest    "ENVARC:MIndicator")
 (newname "MI.help")
)
(copyfiles
 (prompt  "Copying help to ENV:MIndicator/...")
 (source  "/MI_GB.help")
 (dest    "ENV:MIndicator")
 (newname "MI.help")
)

(complete 69)

(if (askbool
     (prompt "\n\nDo you want to install the document?")
     (help   "")
    )
    (
     (set documentdir
      (askdir
       (prompt  "Select the directory you want to install the document for MultiIndicator.")
       (help    "")
       (default "SYS:")
       (newpath)
      )
     )

     (set @default-dest documentdir)

     (copyfiles
      (prompt  "Copying document...")
      (source  "/MIndicator_GB.guide")
      (infos)
      (dest documentdir)
      (newname "MIndicator.guide")
     )
    )
)

(set @default-dest programdir)

(complete 97)

(if (exists "Locale:Catalogs/Français")
 (if (askbool
      (prompt "\n\nDo you want to install the french catalog file?")
      (help   "")
     )
     (
      (copyfiles
       (prompt "Installing french catalog for MultiIndicator...")
       (source "/Catalogs/Français/MI.catalog")
       (dest   "Locale:Catalogs/Français")
      )
     )
 )
)

(complete 99)

(exit)
