; $VER: InstallSokomond 1.0 (12-Sep-94)

;-- Language specific string definitions --------------------------------------

; DEUTSCH -----------------------------
(procedure deutsch (
    (set BLA.DEST "Wohin soll \"Sokomond\" installiert werden?\n(Ein neuer Ordner mit dem Namen \"Sokomond\" wird erzeugt)")
    (set BLA.CPY "Kopiere %s nach %s.")
    (set BLA.OWR "%s existiert bereits. Überschreiben?")
    (set BLA.FNT "Der 2001-Font existiert schon. Solange \"Sokomond\" gespielt werden möchte [das wäre dann für immer :-)] diesen bitte nicht löschen!")
    (set BLA.JOU "Ja")
    (set BLA.NIX "Nein")
))

; ENGLISH -----------------------------
(procedure english (
    (set BLA.DEST "Where would you like \"Sokomond\" to be installed?\n(A new drawer named \"Sokomond\" will be created)")
    (set BLA.CPY "Copying %s to %s.")
    (set BLA.OWR "%s already exists. Overwrite?")
    (set BLA.FNT "The 2001-Font already exists. Please do never overwrite it because \"Sokomond\" still needs this one!")
    (set BLA.JOU "Yes")
    (set BLA.NIX "No")
))


(if (= @language "deutsch") (deutsch))
(if (= @language "english") (english))

(set @default-dest
 (tackon
  (askdir
   (prompt BLA.DEST)
   (help @askdir-help)
   (default @default-dest)
   (newpath))
  "Sokomond"
 )
)

(copyfiles  (prompt (BLA.CPY "Sokomond" @default-dest))
            (help @copyfiles-help)
            (source "/")
            (dest @default-dest)
            (pattern "~(#?s|install#?)")
            (infos)
)

(if (exists "/libs/amos.library" (noreq))
 (
  (if (exists "LIBS:amos.library" (noreq))
   (
    (if (askbool (prompt (BLA.OWR "LIBS:amos.library"))
                 (help @askbool-help)
                 (default 0)
                 (choices BLA.JOU BLA.NIX))
     (
      (copyfiles  (help @copyfiles-help)
                  (source "/Libs/amos.library")
                  (dest "LIBS:")
                  (optional "nofail"))
      )
     )
    )
   (
    (copyfiles  (prompt (BLA.CPY "\"amos.library\"" "LIBS:"))
                (help @copyfiles-help)
                (source "/Libs/amos.library")
                (dest "LIBS:")
                (confirm)
    )
   )
  )
 )
)

(if (exists "/fonts/2001.font"  (noreq))
 (
  (if (exists "FONTS:2001.font" (noreq))
   (message BLA.FNT)
   (
    (copyfiles (prompt (BLA.CPY "2001.font" "FONTS:") )
               (help @copyfiles-help)
               (source "/fonts/")
               (dest "FONTS:")
               (all)
               (confirm)
    )
   )
  )
 )
)

(exit)
