;; $Id: Install,v 7.609 94/08/02 22:41:01 Jack Exp $

(set #codage-help (cat
    "Codage.library is my collection of useful routines.  Scatterbrain will "
    "not run if it's not installed.  Don't worry; it's small. (~4K)\n\n"
))

(set #exe1-help (cat
    "Install the executable wherever you want it.  If you want it to run "
    "every time you start your Amiga, put it in your SYS:WBStartup/ drawer.\n\n"
))

(set #guide-help (cat
    "The on-line help file needs to installed where they can be found by MUI "
    "and AmigaGuide.  The Help:" @language " drawer is one such place.\n\n"
))

(set #assign-help (cat
    "Here you may add an assign to your s:User-Startup or s:Startup-Sequence "
    "file.  The SB: assign is the initial directory Scatterbrain chooses for "
    "storing its data in, unless you specify otherwise.  So, this assign is "
    "not necessary, but does make things slightly more convenient.\n\n"
))

(welcome)

;;
;; libs
;;
(copylib
 (source "libs/codage.library")
 (help #codage-help @copylib-help)
 (prompt "Installing codage.library in libs:")
 (dest "libs:")
 (confirm)
)

(complete 20)

;;
;; Executable
;;
(set chosen-dest (askdir
    (prompt "Where shall I install the executable?")
    (help #exe1-help @askdir-help)
    (default "SYS:WBStartup")
))

(copyfiles
    (prompt "Executables to install")
    (source "")
    (dest chosen-dest)
    (help #exe1-help @copyfiles-help)
    (choices "SB")
    (infos)
    (confirm)
)

(complete 50)

;;
;; On-line help
;;
(copyfiles
    (prompt "Help files to install")
    (source "")
    (dest (cat "Help:" @language))
    (choices "SB.guide")
    (infos)
    (confirm)
    (help #guide-help @copyfiles-help)
)

(complete 80)

;;
;; Assign SB:
;;		
(startup @app-name
    (prompt "Shall I add an assign for SB: to your startup?")
    (help #assign-help @startup-help)
    (command (cat "ASSIGN SB: " chosen-dest))
)

(complete 100)

(set @default-dest chosen-dest)