;
; Script di installazione per EasyPrint 2.27 (14.01.97)
;

; Stringhe

(set @default-dest  "")
(set @default-message "")
(set lib-def-dest   "LIBS:")
(set eprint-dest    "SYS:Tools")

; E' un Amiga 3.0?
(if (= @language "italiano")
(
        (if (< (/ (getversion) 65536) 39) (abort "Devi avere il Kickstart 3.0 (o superiore) per usare\nEasyPrint."))

        (message
                (cat      "\n\n\nEasyPrint, script di installazione.\n"
                          "Questa procedura installa EasyPrint sul vostro Amiga.\n\n"
                          "(C) Copyright 1995-1997 Andrea Latina."
                ))

        (set lib-dest
                (askdir
                        (prompt  "Dove desideri venga copiata la libreria 'reqtools.library' (sarą copiata solo se pił recente di quella gią installata)?")
                        (help    "    Se usi una directory per le librerie create da terzi, adesso puoi specificarla.")
                        (default lib-def-dest)
                )
        )

        (copylib
                (prompt (cat "Copio la reqtools.library in " (tackon lib-dest "reqtools.library")))
                (help   @copylib-help)
                (source "libs/reqtools.library")
                (dest   lib-dest)
                (confirm)
        )

        (set eprint-dest
                (askdir
                        (prompt  "Dove desideri installare EasyPrint (sarą creato un nuovo cassetto chiamato 'EasyPrint')?")
                        (help    "    Seleziona il cassetto in cui installare EastPrint.")
                        (default eprint-dest)
                        (disk)
                )
        )

        (if (NOT (exists (tackon eprint-dest "EasyPrint")))
            (makedir (tackon eprint-dest "EasyPrint")
                     (infos)))

        (copyfiles
            (prompt "Copio 'EasyPrint' in " eprint-dest "EasyPrint/...")
            (source "EasyPrint/")
            (dest   (tackon eprint-dest "EasyPrint"))
            (all)
        )

        (copyfiles
            (prompt "Copio 'EasyPrint' in " eprint-dest "EasyPrint/...")
            (source "EasyPrint.guide")
            (dest   (tackon eprint-dest "EasyPrint"))
        )

        (copyfiles
            (prompt "Copio 'EasyPrint' in " eprint-dest "EasyPrint/...")
            (source "EasyPrint_ITA.guide")
            (dest   (tackon eprint-dest "EasyPrint"))
        )
)
(
        (if (< (/ (getversion) 65536) 39) (abort "EasyPrint need at least OS 3.0"))

        (message
                (cat      "\n\n\nEasyPrint, installation script.\n\n"
                          "This script installs EasyPrint on your Amiga.\n\n"
                          "(C) Copyright 1995-1997 by Andrea Latina\nAll rights reserved."
                )
        )

        ; Ask where to copy the library.

        (set lib-dest
                (askdir
                        (prompt  "Select directory where to install the library 'reqtools.library' (copy the library using version checking).")
                        (help    "    Copy the library using version checking; i.e., it only overwrites an existing library if the new library has a higher version/revision number.")
                        (default lib-def-dest)
                )
        )

        ; Copy the library.

        (copylib
                (prompt (cat "Copying reqtools.library to " lib-dest))
                (help   @copylib-help)
                (source "libs/reqtools.library")
                (dest   lib-dest)
                (confirm)
        )

        (set eprint-dest
                (askdir
                        (prompt  "Select directory where to install EasyPrint (a directory called `EasyPrint` will be created here).")
                        (help    "    If you specify a path, a new directory called `EasyPrint` will be created in it. The program will be copied in this directory.")
                        (default eprint-dest)                                                                                
                        (disk)
                )
        )

        (if (NOT (exists (tackon eprint-dest "EasyPrint")))
            (makedir (tackon eprint-dest "EasyPrint")
                     (infos)))

        (copyfiles
            (prompt "Copying 'EasyPrint' to " eprint-dest "EasyPrint/...")
            (source "EasyPrint/")
            (dest   (tackon eprint-dest "EasyPrint"))
            (all)
        )

        (copyfiles
            (prompt "Copying 'EasyPrint' to " eprint-dest "EasyPrint/...")
            (source "EasyPrint.guide")
            (dest   (tackon eprint-dest "EasyPrint"))
        )

        (copyfiles
            (prompt "Copying 'EasyPrint' to " eprint-dest "EasyPrint/...")
            (source "EasyPrint_ITA.guide")
            (dest   (tackon eprint-dest "EasyPrint"))
        )
)
) ; if
