(SET @default-dest "Work:")
(SET default_lang 0)

(SET #needKick (CAT "\n'PicView' need Kickstart Version 39 at least." ) )

(SET #startMsg (CAT "\nWelcom to 'PicView' !\n\n"
                     "This script installs 'PicView' on your AMIGA.\n\n") )

(SET #destPrompt "Please choose the destination directory for 'PicView'.")

(SET #copyPFiles "Copying program files")

(SET #langPrompt "Select the languages you wish to use with 'PicView'.")

(SET #DocPrompt "Select the directory for the documentation file.")

(SET #exitMsg (CAT "Much fun with 'PicView' wish you\n\n"
                   "Holger Papajewski" ) )


; ******************* deutsche Texte *****************************

(IF (= @language "deutsch")
(
(SET default_lang 1)

(SET #needKick ( CAT "\n'PicView' bentigt mindestens die Kickstart-Version 39." ) )

(SET #startMsg (CAT "\nWillkommen bei 'PicView' !\n\n"
                     "Diese Datei installiert 'PicView' auf ihrem AMIGA.\n\n") )

(SET #destPrompt "Whlen Sie bitte das Zielverzeichnis fr 'PicView'" )

(SET #copyPFiles "Kopiere Programmdateien")

(SET #langPrompt "Whlen Sie die Sprachen, die Sie mit 'PicView' benutzen wollen.")

(SET #DocPrompt "Whlen Sie ein Verzeichnis, in welches die Dokumentation kopiert werden soll.")

(SET #exitMsg (CAT "Viel Spa mit 'PicView' wnscht\n\n"
                   "Holger Papajewski" ) )
))


; *************** Hier beginnt die Installation ******************

(if (< (/ (GETVERSION) 65536) 39)
    (ABORT #needKick)
)

(MESSAGE #startMsg)

(SET @default-dest
    (ASKDIR (PROMPT  #destPrompt)
            (HELP    askdir-help)
            (DEFAULT @default-dest )))

(COPYFILES (SOURCE "PicView")
           (HELP copyfiles-help)
           (DEST @default-dest )
           (INFOS)
)


(SET sprachen (ASKOPTIONS (PROMPT #langPrompt)
                          (HELP   askoptions-help)
                          (CHOICES "english"
                                   "deutsch" )
                          (DEFAULT (+ default_lang 1) )
              )
)

(if (IN sprachen 1)
    (COPYFILES (SOURCE "Locale/deutsch/PicView.catalog")
               (DEST "Locale:Catalogs/deutsch") )
)

(SET @DocDir
    (ASKDIR (PROMPT  #DocPrompt)
            (HELP    askdir-help)
            (DEFAULT @default-dest)
            (NEWPATH)
    )
)

(if (= @language "english")  
  (SET SDocDir "Docs/english")
)
  
(if (= @language "deutsch")
  (SET SDocDir "Docs/deutsch")
)

(COPYFILES (SOURCE SDocDir)
           (DEST   @DocDir)
           (ALL)
)

(EXIT #exitMsg )
