; Install KLS 13.762 -- The Best Screen Clearing Utility Ever Made
; (c) 1990,1991,1992,1993,1994 Martin Mares, MJSoft System Software

(set @abort-button "Go Away!")

(complete 60)

(message "\n\nHello, world!" (help "If you are helpless, try again!"))

(complete 70)

(message "\nThis is an installation program for the Best Screen Clearing Utility "
"Ever Made, version 13.762. This beautiful program has been written during the "
"years 1990, 1991, 1992, 1993 and 1994 by Martin Mares and the MJSoft System Software "
"Development Team. For other information, see the documentation. If you press the "
"Proceed button, Kls will be installed on your system."
(help "Help pages are for wimps only..."))

(if (< (getversion "exec.library" (resident)) (* 37 65536))
  (abort "\nThis program requires Kickstart 2.04 or higher to run.")
  )

(set @default-dest (askdir
  (prompt "Please select the directory you wish to install Kls to:")
  (help @askdir-help)
  (default "Work:")
  ))

(complete 98)

(copylib
  (prompt "Do you wish to install the ss.library on your system?")
  (help @copylib-help)
  (source "ss.library")
  (dest "LIBS:")
  (confirm)
  )

(complete 99)

(copyfiles
  (prompt "Do you wish to install the following files?")
  (help @copyfiles-help)
  (source "")
  (dest @default-dest)
  (choices "Kls" "Kls.doc" "Kls.guide" "Kls.dvi")
  (infos)
  (confirm)
  )

(if
  (askchoice
    (prompt "Do you wish to install the registered version of Kls? "
            "In this case, a keyfile in your L: directory will be created."
    (help @askchoice-help)
    (choices "No" "Yes")
    )
    )
  (
    (set username
      (askstring
        (prompt "Please enter your name. This name will be stored in the key file "
                "to allow easy identification of the person this program is "
                "registered to.")
        (help @askstring-help)
        (default "N. O. Body")
        )
      )
    (set password
      (askstring
        (prompt "Please enter a secret password.")
        (help "This password can consist of any characters you wish to use "
              "and is not required to be identical with the password which "
              "has been preset during manufacturing.")
        (default "A Secret Password")
        )
      )
    (makedir "L:KlsKeys")
    (makedir "L:KlsKeys/Version 13.762")
    (makedir "L:KlsKeys/Version 13.762/Defaults")
    (run 'MakeKlsKey "' username '"')
    )
  )

(complete 203)
