;;;;
;;;;
;;;; Install_RB - RunBar installation script for Installer
;;;;
;;;; Copyright © 1996 Sergej Kravchenko
;;;;                  All Right reserved.
;;;;                  email dlife@pub.osf.lt
;;;;
;;;;     Installer and Installer project icon
;;;;     (c) Copyright 1991-93 Commodore-Amiga, Inc.  All Rights Reserved.
;;;;     Reproduced and distributed under license from Commodore.
;;;;
;;;;     INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
;;;;     NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
;;;;     OR RESPONSIBILITY IS ASSUMED.
;;;;
(complete 0)


(set #welcome           (cat "Welcome to the RunBar 3.0 installation\n\nThis program is shareware\nPlease register\n\n\n\n© 1996 Sergej Kravchenko\nemail: dlife@pub.osf.lt"))
(set #dir-choice        (cat "Select the directory where copy guide and Images." ))
(set #dir-choic         (cat "Select the directory where Guide files will be copyed." ))
(set #dir-ch            (cat "Select WBStartup directory."))
(set #copy              (cat "Copying RunBar "))
(set #copy-guide        (cat "Copying Guide"))
(set #copy-u            (cat "Copying Utils"))
(set #copy-unin         (cat "Copying Images"))
(set #copy-p            (cat "Copying Prefs"))
(set #copy-key          (cat "Copying Library"))
(set #msg  (cat "!!!!!!!!!ATTENTION!!!!!!!!!\n\nWhen program run, no window appears\non screen.To activate window\nmove mouse pointer to bottom of\nworkbench screen or\npress HotKey (default F1).\n\nReboot computer now to run program."))
(set #msg1 (cat "!!!!!!!!!ATTENTION!!!!!!!!!\n\nInfo for all coders and programmers\nyou can find in guide.\n\nPlease READ this!!!!!!!"))
;=============================================================================
(message #welcome)
(welcome)


;========================================================================
;
; Select the RunBar directory
;
(complete 0)

(if (> (exists ("SYS:WBStartup/RunBar")) 0)
    (delete "SYS:WBStartup/RunBar")
)

(if (> (exists ("SYS:WBStartup/RunBar.info")) 0)
    (delete "SYS:WBStartup/RunBar.info")
)

(procedure towbs
(copyfiles
   (prompt #copy)
   (source "RunBar")
   (help   @copyfiles-help)
   (infos)
   (dest "SYS:WBStartup")
)
)

(procedure toother
(set NTdir
   ( askdir
      ( prompt #dir-ch )
      (help "")
      (default "SYS:WBStartup")
      (newpath)
   )
)
(copyfiles
   (prompt #copy)
   (source "RunBar")
   (help   @copyfiles-help)
   (infos)
   (dest NTdir)
)
)
(complete 10)
(set choice
     (askchoice
      (prompt "Slect one of following:")
      (help "")
      (choices
      "Standard WBStartup" ; 0
      "WBStartup+ or other" ; 1)
      (default 0))))
(select choice
        (towbs)
        (toother))

(complete 20)
(set NTdir
   ( askdir
      ( prompt #dir-choic )
      (help "")
      (default "s:")
      (newpath)
   )
)
(complete 30)
(copyfiles
   (prompt #copy-guide)
   (source "RunBar.guide")
   (help   @copyfiles-help)
   (infos)
   (dest NTdir)
)

(complete 30)
(copyfiles
   (prompt #copy-unin)
   (source "Images.iff")
   (help   @copyfiles-help)
   (infos)
   (dest NTdir)
)

(complete 40)
(copylib
   (prompt "Updating wbstart.library")
   (help "This action will install wbstart.library on your HD.")
   (source "Libs/wbstart.library")
   (dest "Libs:")
   (confirm)
)

(complete 50)
(copylib
   (prompt #copy-key)
   (source "L/WBStart-Handler")
   (help   @copyfiles-help)
   (dest "L:")
   (confirm)
)
(complete 60)
(copyfiles
   (prompt #copy-u)
   (source "Utils")
   (help   @copyfiles-help)
   (infos)
   (dest "SYS:Utilities")
   (all)
)
(complete 70)
(copyfiles
   (prompt #copy-p)
   (source "RunBarPrefs")
   (help   @copyfiles-help)
   (infos)
   (dest "SYS:Prefs")
)
(complete 80)
(copyfiles
   (prompt #copy-unin)
   (source "Images/")
   (help   @copyfiles-help)
   (infos)
   (all)
   (dest "SYS:Prefs/Env-Archive/RunBar")
)

(complete 85)
(message #msg)
(message #msg1)
(complete 90)
(run "SYS:Prefs/RunBarPrefs"
) 
(complete 100)

(exit)

