home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 95 / af095sub.adf / MBlank.LZX / MBlank / MBlank.install < prev    next >
Text File  |  2014-03-01  |  4KB  |  169 lines

  1. ;$VER: MBlank.install 1.06 (14-01-1997) damian@cybercomm.nl
  2.  
  3. ;-copy files to destinations
  4. ;    (if (<> #mbpath "RAM:")
  5.  
  6. (procedure P_Copy
  7.     (if (<> (getdevice #mbpath) "RAM:")
  8.         (tooltype
  9.             (dest "MBlank")
  10.             (settooltype "MODPATH" #mbpathmods)
  11.         )
  12.     )
  13.     (copyfiles    (source "MBlank")
  14.             (dest #exepath)
  15.             (infos)
  16.     )
  17.     (copyfiles    (source "")
  18.             (dest #mbpath)
  19.             (pattern "MBlank.(guide|readme)")
  20.             (infos)
  21.     )
  22.     (copyfiles    (source "")
  23.             (dest #mbpathmods)
  24.             (pattern "#?.blm")
  25.             (infos)
  26.     )
  27.     (copyfiles    (source "")
  28.             (dest #mbpathdev)
  29.             (pattern "(Test.blm.asm|module.i)")
  30.             (infos)
  31.     )
  32.     (copyfiles    (source "")
  33.             (dest #mbpathdocs)
  34.             (pattern "#?.blm.guide")
  35.     )
  36. )
  37.  
  38. ;-welcome message
  39.  
  40. (welcome "\nThis script will install MBlank 1.06,\n14-Jan-1997, damian@cybercomm.nl")
  41.  
  42. ;-choose destination path
  43.  
  44. (set MBlankDir
  45.     (askdir
  46.         (prompt "Where do you want to install MBlank?\nA new drawer called MBlank will be created there.")
  47.         (help "\n Choose a path.")
  48.         (default "WORK:")
  49.     )  
  50. )
  51. (set @default-dest MBlankDir)
  52.  
  53. ;-make new drawer: MBlank in chosen path or RAM:
  54.  
  55. (set #mbpath (tackon MBlankDir "MBlank/"))
  56. (makedir #mbpath (infos))
  57. (set #mbpathmods (tackon #mbpath "MB_Modules/"))
  58. (makedir #mbpathmods (infos))
  59. (set #mbpathdocs (tackon #mbpath "MB_Docs/"))
  60. (makedir #mbpathdocs)
  61. (set #mbpathdev (tackon #mbpath "MB_Develop/"))
  62. (makedir #mbpathdev)
  63.  
  64. ;-ask whether executable should be installed in WBStartup or not
  65.  
  66. (if (exists "SYS:WBStartup")
  67.     (set #exeinwbs (askbool
  68.                 (prompt "\nDo you want to install the MBlank executable\nin your 'WBStartup' drawer?\n\n(WBStartup+ users no worries, see HELP...)")
  69.                 (help "YES:\nThe installer will copy the executable to your 'WBStartup' drawer. If 'WBStartup (Enabled)' is present, MBlank will be copied there.\n\nNO:\nMBlank executable will be copied to '"#mbpath"'.")
  70.             )
  71.     )
  72. )
  73.  
  74. ;-if previous answered with YES, set executable path to WBStartup,
  75. ;-but if 'WBStartup/WBStartup (Enabled)' exists, adapt
  76.  
  77. (if (= #exeinwbs 1)
  78.     (if (= (exists "SYS:WBStartup/WBStartup (Enabled)" (noreq) ) 2)
  79.         (set #exepath "SYS:WBStartup/WBStartup (Enabled)")
  80.         (set #exepath "SYS:WBStartup")
  81.     )
  82.     (set #exepath #mbpath)
  83. )
  84.  
  85. ;-alter tooltypes to suit user's needs, experts only
  86.  
  87. (if    (= @user-level 2)
  88.     ((if (=    (askbool
  89.                 (prompt "\nDo you want the MBlank window\nto popup at program-startup?")
  90.                 (help "\n  No help for experts!") ) 1)
  91.         (tooltype
  92.             (dest "MBlank")
  93.             (settooltype "CX_POPUP" "YES")
  94.         )
  95.         (tooltype
  96.             (dest "MBlank")
  97.             (settooltype "CX_POPUP" "NO")
  98.         )
  99.     )
  100.     (if (=    (askbool
  101.                 (prompt "\nDo you want blanking to be reset\nby a mouse-event? (move/press)")
  102.                 (help "\n  No help for experts!") ) 1)
  103.         (tooltype
  104.             (dest "MBlank")
  105.             (settooltype "MOUSETRIG" "YES")
  106.         )
  107.         (tooltype
  108.             (dest "MBlank")
  109.             (settooltype "MOUSETRIG" "NO")
  110.         )
  111.     )
  112.     (if (=    (askbool
  113.                 (prompt "\nDo you want blanking to be reset\nby a disk-insert/removal?")
  114.                 (help "\n  No help for experts!") ) 1)
  115.         (tooltype
  116.             (dest "MBlank")
  117.             (settooltype "DISKTRIG" "YES")
  118.         )
  119.         (tooltype
  120.             (dest "MBlank")
  121.             (settooltype "DISKTRIG" "NO")
  122.         )
  123.     )
  124.     (if (=    (askbool
  125.                 (prompt "\nDo you want MBlank to add a menu-item\nto WorkBench's Tools menu?\n\nPicking this item will activate blanking\nafter a short 'release mouse first' delay.")
  126.                 (help "\n  No help for experts!") ) 1)
  127.         (tooltype
  128.             (dest "MBlank")
  129.             (settooltype "MENU" "YES")
  130.         )
  131.         (tooltype
  132.             (dest "MBlank")
  133.             (settooltype "MENU" "NO")
  134.         )
  135.     )
  136.     (if (=    (askbool
  137.                 (prompt "\nDo you want multiple modules\nto alternate at random?")
  138.                 (help "\n  No help for experts!") ) 1)
  139.         (tooltype
  140.             (dest "MBlank")
  141.             (settooltype "RANDOM" "YES")
  142.         )
  143.         (tooltype
  144.             (dest "MBlank")
  145.             (settooltype "RANDOM" "NO")
  146.         )
  147.     ))
  148. )
  149.  
  150. ;-show the statistics and ask for approval
  151.  
  152. (if    (=    (askbool
  153.             (prompt "\n* The destinations *\n\nFiles: "#mbpath"\nExecutable: "#exepath)
  154.             (help "Proceed:\nThis is like it is.\n\nCancel:\nAbort installer now.")
  155.             (choices "Proceed" "Cancel") ) 1)
  156.     (P_Copy)
  157.     (exit "\nReport any problems with this script to:\n\ndamian@cybercomm.nl (subject: MBlank)" (quiet))
  158. )
  159.  
  160. ;-clean up terrible mess left behind
  161.  
  162. (delete    "MBlank" (infos))
  163. (delete "MBlank.(guide|readme)" (infos))
  164. (delete "#?.blm" (infos))
  165. (delete "(Test.blm.asm|module.i)")
  166. (delete "#?.blm.guide")
  167.  
  168. ;-done
  169.