; Installer-Script of xInstall v1.3c
; The xInstall package (the executable, the source, the guide, the
; install-script and the catalog) is copyright 1994 by Jens Tröger

; $VER xInstall v1.3c (23.09.94)

(COMPLETE 0)

(IF (= @language "deutsch")
   (
      (SET no_v37 (CAT "Es wird mindestens OS2 (v37) oder besser benötigt"))
      (SET msg_0 (CAT "\nxInstall Installer script.\n\n"
                      "Hiermit können Sie xInstall auf Ihrem AMIGA installieren\n\n"
                      "Hinweis: lesen Sie bitte das Guide, bevor Sie xInstall starten !"
                      "\n\nDas xInstall-Packet ist © 1994 by Jens Tröger\n"
                      "Alle Rechte vorbehalten."
                      "\n\nNotiz: das Guide wird nicht installiert !"))
      (SET msg_1 (CAT "Zeilverzeichnis auswählen..."))
      (SET done (CAT "OK, das wär`s - Installation abgeschlossen"
                     "\n\nViel Spaß mit xInstall !"))
   )
   (
      (SET no_v37 (CAT "You need OS2 (v37) or better to run"))
      (SET msg_0 (CAT "\nxInstall Installer script.\n\n"
                      "This will install xInstall on your AMIGA\n\n"
                      "Indication: read the guide before you run xInstall !"
                      "\n\nThe xInstall-package is © 1994 by Jens Tröger\n"
                      "All rights reserved."
                      "\n\nNote: the guide won`t be installed !"))
      (SET msg_1 (CAT "Select destination drawer..."))
      (SET done (CAT "OK, that`s all - installation complete"
                     "\n\nHave fun with xInstall !"))
   )
)

(IF (< (/ (GETVERSION) 65536) 37)
   (
      (ABORT no_v37)
   )
)

(MESSAGE msg_0)

(SET destdir
   (ASKDIR
      (PROMPT "\n" msg_1)
      (HELP @askdir-help)
      (DEFAULT "WORK:")
   )
)

(COPYFILES
   (SOURCE "xInstall")
   (DEST destdir)
   (INFOS)
)

(COMPLETE 25)

(COPYFILES
   (SOURCE "xInstall.info")
   (DEST destdir)
   (INFOS)
)

(IF (< (/ (GETVERSION "libs:reqtools.library") 65536) 37)
   (
      (COMPLETE 75)
   )
   (
      (COPYFILES
         (SOURCE "libs/reqtools.library")
         (DEST "libs:")
         (INFOS)
      )
      (COMPLETE 75)
   )
)

(IF (= @language "deutsch")
   (
      (COMPLETE 75)
      (COPYFILES
         (SOURCE "catalogs/deutsch/xinstall.catalog")
         (DEST "locale:catalogs/deutsch/")
         (INFOS)
      )
      (COMPLETE 100)
   )
   (
      (COMPLETE 100)
   )
)

(EXIT done)
