home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / util / blank / gblanker / install < prev    next >
Text File  |  1994-10-19  |  7KB  |  224 lines

  1. ;
  2. ; Garshneblanker Installation Script $VER:Garshneblanker 38.4 (18.10.94)
  3. ;
  4.  
  5. (set oldUserLevel (user 3))
  6. (message
  7.  "\nWelcome to the Garshneblanker 3.5 installer script.\n\n"
  8.  "Follow the installer script's instructions to install Garshneblanker on your"
  9.  "system. Once Garshneblanker is running, you can simply press the popup "
  10.  "hotkey (which you'll specify later) to bring up its user interface. The "
  11.  "rest will come naturally. :)\nIf you are already using Garshneblanker 3.0 "
  12.  "or greater, this script will simply install the updated files."
  13.  )
  14. (user oldUserLevel)
  15.  
  16. (set @default-dest "SYS:WBStartup")
  17. (set @default-popkey "Alt Help")
  18. (set @default-blankkey "Alt Delete")
  19. (set @default-timeout 180)
  20.  
  21. (set @default-dest
  22.      (askdir
  23.       (prompt "Where would you like Garshneblanker installed?")
  24.       (help "The WBStartup directory on your boot disk is likely the best "
  25.             "place to put blanker. This will insure that Garshneblanker is "
  26.             "run automatically when you boot your computer.")
  27.       (default @default-dest)
  28.       )
  29.      )
  30.  
  31. (working "Checking for previously installed version of Garshneblanker.")
  32.  
  33. (set newBlanker "Garshneblanker")
  34. (if (exists (tackon @default-dest "Blanker"))
  35.     (set oldBlanker (tackon @default-dest "Blanker"))
  36.     (set oldBlanker (tackon @default-dest "Garshneblanker")))
  37.  
  38. (set newBlankerVersion (getversion newBlanker))
  39. (if (exists oldBlanker)
  40.     (set oldBlankerVersion (getversion oldBlanker))
  41.     (set oldBlankerVersion (+ (* 65536 37) 0)))
  42.  
  43. (set oldVer (/ oldBlankerVersion 65536))
  44. (set oldRev (- oldBlankerVersion (* oldVer 65536)))
  45.  
  46. (set newVer (/ newBlankerVersion 65536))
  47. (set newRev (- newBlankerVersion (* newVer 65536)))
  48.  
  49. (if (<= newBlankerVersion oldBlankerVersion)
  50.     (if (NOT
  51.          (askbool
  52.           (prompt ("Version %ld.%ld of Garshneblanker already installed. Install version %ld.%ld?" oldVer oldRev newVer newRev))
  53.           (default 0)
  54.           (help "An equal or newer version of Garshneblanker is already "
  55.                 "installed. If you would like to install Garshneblanker "
  56.                 "anyhow, click 'Yes'. If you don't want to install "
  57.                 "Garshneblanker, click 'No'.")
  58.           )
  59.          )
  60.         (abort "Equal or newer version of Garshneblanker already installed. "
  61.                "Aborting.")
  62.         )
  63.     )
  64.  
  65. (delete oldBlanker)
  66. (if (< oldVer 38) (delete (tackon oldBlanker ".info")))
  67.  
  68. (copylib (source "Libs/reqtools.library") (dest "LIBS:"))
  69.  
  70. (if (< (/ (getversion) 65536) 39)
  71.  (copylib (source "Libs/V37/Garshnelib.library") (dest "LIBS:"))
  72.  (copylib (source "Libs/V39/Garshnelib.library") (dest "LIBS:"))
  73.  )
  74.  
  75. (copyfiles
  76.  (prompt ("Copying Garshneblanker to %s" @default-dest))
  77.  (help @copyfiles-help)
  78.  (source "Garshneblanker")
  79.  (dest @default-dest)
  80.  )
  81.  
  82. (if
  83.  (< oldVer 38)
  84.  ((select
  85.    (askchoice
  86.     (prompt "Which icon would you like to have installed for Garshneblanker?")
  87.     (choices "Standard Workbench Icon" "Magic Workbench Icon")
  88.     (help "The magic workbench icon is simply a larger, 8 color icon. The "
  89.           "standard icon follows Commodore's 4 color and size standard.")
  90.     )
  91.    (set @icon-choice "Garshneblanker_Std")
  92.    (set @icon-choice "Garshneblanker.info")
  93.    )
  94.   
  95.   (copyfiles
  96.    (prompt ("Copying icon for %s" @default-dest))
  97.    (help @copyfiles-help)
  98.    (source @icon-choice)
  99.    (dest @default-dest)
  100.    )
  101.   
  102.   (if (= @icon-choice "Garshneblanker_Std")
  103.       ((rename (tackon @default-dest @icon-choice)
  104.               (tackon @default-dest "Garshneblanker.info"))
  105.        (delete (tackon @default-dest @icon-choice))))
  106.   )
  107.  )
  108.  
  109. (set @module-dest @default-dest)
  110.  
  111. (set @module-dest
  112.      (askdir
  113.       (prompt "Where would you like the Garshneblanker modules installed? (A "
  114.               "directory named Blankers will be created in the directory you "
  115.               "specify and the modules will be put there.)")
  116.       (help "You can put the blankers anywhere and Garshneblanker will look "
  117.             "for them there.")
  118.       (default @module-dest)
  119.       )
  120.      )
  121.  
  122. (set blankersDir (tackon @module-dest "Blankers"))
  123.  
  124. (run ("Delete %s" (tackon blankersDir "~(#?.prefs)")))
  125.  
  126. (copyfiles
  127.  (prompt ("Copying Garshneblanker modules to %s" @module-dest))
  128.  (help @copyfiles-help)
  129.  (source "")
  130.  (choices "Blankers")
  131.  (dest @module-dest)
  132.  )
  133.  
  134. (tooltype
  135.  (dest (tackon @default-dest "Garshneblanker"))
  136.  (settooltype "BLANKERDIR" (tackon @module-dest "Blankers"))
  137.  (noposition)
  138.  )
  139.  
  140. (set BlankKey
  141.      (askstring
  142.       (prompt "What key-combination would you like to use to tell "
  143.               "Garshneblanker to immediately blank the screen? (This key "
  144.               "combination can be used after Garshneblanker is running to "
  145.               "blank the screen.)")
  146.       (help "When you press this combination of keys, Garshneblanker will "
  147.             "tell the current module to blank the screen. This is a standard "
  148.             "Commodities key-combination. This key-combination should be a "
  149.             "text string.\n\nExamples:\nAlt Help, Shift F1, Ctrl a")
  150.       (default "Alt Delete")
  151.       )
  152.      )
  153.  
  154. (tooltype
  155.  (dest (tackon @default-dest "Garshneblanker"))
  156.  (settooltype "BLANKKEY" BlankKey)
  157.  )
  158.  
  159. (set TimeOut
  160.      (asknumber
  161.       (prompt "How long should Garshneblanker wait before automatically "
  162.               "blanking the screen. (This value is in seconds.)")
  163.       (help "Garshneblanker will blank the screen if the number of seconds "
  164.             "you specify pass without any user input occurring on your "
  165.             "computer.")
  166.       (default 180)
  167.       )
  168.      )
  169.  
  170. (tooltype
  171.  (dest (tackon @default-dest "Garshneblanker"))
  172.  (settooltype "TIMEOUT" ("%ld" TimeOut))
  173.  )
  174.  
  175. (set cxPopKey
  176.      (askstring
  177.       (prompt "What key-combination shall Garshneblanker use to pop up it's "
  178.               "interface? (This key combination can be used after "
  179.               "Garshneblanker is running to bring it's window to front.)")
  180.       (help "This is a standard Commodities key-combination. When you press "
  181.             "this combination of keys, Garshneblanker will open up its "
  182.             "preferences window so that you can modify its settings. This "
  183.             "key-combination should be a text string.\n\nExamples:\nAlt Help, "
  184.             "Shift F1, Ctrl a")
  185.       (default "Alt Help")
  186.       )
  187.      )
  188.  
  189. (tooltype
  190.  (dest (tackon @default-dest "Garshneblanker"))
  191.  (settooltype "CX_POPKEY" cxPopKey)
  192.  )
  193.  
  194. (if
  195.  (askbool
  196.   (prompt "Would you like Garshneblanker to open its window on startup?")
  197.   (help "This will set the CX_POPUP tooltype to YES or NO depending on your "
  198.         "response. This tooltype dictates whether or not Garshneblanker opens "
  199.         "it's window when it first runs.")
  200.   (default 1)
  201.   )
  202.  (
  203.   (set cxPopUp "YES")
  204.   (set popUpMsg "Garshneblanker will automatically bring up its interface after you have run it.")
  205.   )
  206.  (
  207.   (set cxPopUp "NO")
  208.   (set popUpMsg ("Garshneblanker will not automatically bring up its interface after you have run it. You will have to press the %s key-combination to make the interface come up." cxPopKey))
  209.   )
  210.  )
  211.  
  212. (tooltype
  213.  (dest (tackon @default-dest "Garshneblanker"))
  214.  (settooltype "CX_POPUP" cxPopUp)
  215.  )
  216.  
  217. (set oldUserLevel (user 3))
  218. (message
  219.  ("\nGarshneblanker is now installed in your %s directory. You can run it by double clicking on its icon. %s\n\nIf you have any questions at all, feel free to contact me via e-mail at:\n\nmbayne@qualcomm.com" @default-dest popUpMsg)
  220.  )
  221. (user oldUserLevel)
  222.  
  223. (exit (quiet))
  224.