; $VER: Install_Ilona 1.0 (10.04.97) by Tristan Greaves
; Based on Install_Installer_Guide by G. Cornu.
;  
;-- Language specific string definitions --------------------------------------

; ENGLISH -----------------------------
(procedure english (
    (set MSG_SPACE "\n\n\nInstalling this application will use about\n%ld Kilobytes of your hard disk space.")
    (set MSG_DESTINATION "Where would you like %s to be installed?\n(%s will be directly copied there)")
    (set MSG_COPYING "Going to copy %s to %s.")
    (set @abort-button "Abort Installation")
    (set MSG_THANKS "Thank you for installing %s!\n\nNow please read the documentation so that Ilona can be configured to suit your needs.")
))

(if (= @language "english")  (english))
(if (= @language "français") (français))

; Choose default tool for guide, depending on user's OS version
(set osversion  (/ (getversion) 65536))
(if (>= osversion 39)
   (set guide_reader "MultiView") 
   (set guide_reader "AmigaGuide")
)
(set installed "")

(message (MSG_SPACE (/ (getsize "ilona/ilona") 1024)))

(set dest_dir
   (askdir (prompt (MSG_DESTINATION @app-name @app-name))
           (help @askdir-help)
           (default @default-dest)
           (newpath))
)

(set @default-dest dest_dir)

(copyfiles  (prompt (MSG_COPYING @app-name @default-dest))
            (help @copyfiles-help)
            (all)
            (source "Ilona/")
            (dest dest_dir)
            (infos)
)

(if (exists (tackon @default-dest "Ilona.guide.info") (noreq))
   (
      (tooltype   (dest (tackon @default-dest "Ilona.guide.info"))
                  (noposition) (setdefaulttool guide_reader))
      (set installed "YES")         
   )
)

(if (exists (tackon @default-dest "Ilona.registration.info") (noreq))
   (
      (tooltype   (dest (tackon @default-dest "Ilona.registration.info"))
                  (noposition) (setdefaulttool guide_reader))
      (set installed "YES")         
   )
)

(if (= installed "YES") 
   (exit (MSG_THANKS @app-name))
   (exit)
)   
