; $VER: ProRen V1.3 Installer
; Script to install Release 1.3 of ProRen

(complete 0)

;*** Strings festlegen ***
(set #main-query-text
(cat "Please select a place for ProRen 1.3\n"
     "(A directory called ProRen will be created.)"
))

(set #main-query-help
(cat "You are asked to select the directory, in which ProRen will be installed. "
     "There a directory called ProRen will be created, in which the files will be copied."
))

(set #docs-query-text
(cat "Where do you want to place the documentation of ProRen?"
))

(set #docs-query-help
(cat "You are asked to select the directory, where the documentation of ProRen should be copied to."
))

(set #Registration
(cat "The installation of ProRen in now finished\n"
     "ProRen is EMailWare! If you aren't registered (this is for free), you will "
     "be annoyed by a requester. How to register? Ask the documentation!"
))

(set #bool-help "Yes for yes, no for no :-)")

(welcome "\nWelcome to the installaion of "@app-name"")

;*** nach Ziel für Hauptdateien fragen ***

(set #maindir (askdir (prompt #main-query-text) (help #main-query-help) (default @default-dest)))

(set #maindir (tackon #maindir "ProRen"))
(makedir #maindir)

;*** Hauptdateien kopieren ***
(complete 20)
(if (= @user-level 2)
  (
    (if (= (askbool 1 (prompt "\nNow the mainfiles will be copied to "#maindir".")
                      (help #bool-help)
                      (choices "Proceed" "Skip")))
      (
        (complete 40)
        (copyfiles (source "ProRen") (dest #maindir) (infos) (noposition))
      ))
  )(
    (complete 40)
    (copyfiles (source "ProRen") (dest #maindir) (infos) (noposition))
  )
)

(complete 60)

;*** Doku kopieren ***

(set #thedir (askdir (prompt #docs-query-text) (help #docs-query-help) (default #maindir)))
(complete 70)
(copyfiles (source "docs/ProRenEnglish.guide") (dest #thedir) (newname "ProRen.guide") (infos))
(complete 80)

;*** Catalog kopieren (englischen gibts keinen) ***
(complete 70)


;*** Fertig ***
(complete 100)
(message #Registration (all))

(set @default-dest #maindir)

