home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1997 #5 / AmigaPlus_Extra-CD_5-97.iso / online-tools / mail / mailwatch / install_mailwatch next >
Text File  |  1997-05-11  |  6KB  |  213 lines

  1. ;
  2. ;   $VER: MailWatch_Install 4.1e (11.5.97)
  3. ;
  4.  
  5. (complete 0)
  6.  
  7. (if (= (askchoice (prompt  "Which installation method should I use?")
  8.                   (help    (cat "This installation script supports two types of installation.\n\n"
  9.                                 "You can install into a single, newly created directory, "
  10.                                 "or you can start MailWatch every time your Amiga is booted."))
  11.                   (choices "Own directory" "Onto SYS:")
  12.                   (default 0)
  13.         ) 0)
  14.  
  15.     (
  16.  
  17.         (set #DEST_MAIN
  18.           (askdir (prompt  "Choose the path where the new drawer 'MailWatch' should be created.")
  19.                   (help    "In the chosen path, a new drawer named 'MailWatch' will be created, in which MailWatch and its files will be copied.")
  20.                   (default @default-dest)
  21.           )
  22.         )
  23.  
  24.         (set #DEST_MAIN (tackon #DEST_MAIN "MailWatch"))
  25.         (set #DEST_PREFS #DEST_MAIN)
  26.         (set #DEST_DOCS (tackon #DEST_MAIN "docs"))
  27.         (set #DEST_ICONS (tackon #DEST_MAIN "icons"))
  28.         (set #DEST_MODS (tackon #DEST_MAIN "modules"))
  29.  
  30.         (set @default-dest #DEST_MAIN)
  31.  
  32.         (makedir #DEST_MAIN
  33.           (help @makedir-help)
  34.           (infos)
  35.         )
  36.  
  37.      )
  38.  
  39.      (
  40.  
  41.         ;
  42.         ; This installs MailWatch etc. across the system disk
  43.         ;
  44.  
  45.         (set #DEST_MAIN  "SYS:WbStartup")
  46.         (set #DEST_PREFS "SYS:Prefs")
  47.         (set #DEST_MODS  "LIBS:mwModules")
  48.         (set #DEST_DOCS  "HELP:English/MailWatch")
  49.         (set #DEST_ICONS "ENVARC:MailWatch/Icons")
  50.  
  51.         (set @default-dest #DEST_MAIN)
  52.  
  53.      )
  54. )
  55.  
  56. (complete 10)
  57.  
  58. (copyfiles (prompt "Install the main program, MailWatch?")
  59.            (source "")
  60.            (choices "MailWatch")
  61.            (dest #DEST_MAIN)
  62.            (infos)
  63.            (confirm)
  64.            (help "I guess you want to install this, otherwise you wouldn't be running the install script :)")
  65. )
  66.  
  67. (complete 15)
  68.  
  69. (copyfiles (prompt "Install the preferences program, MailWatchPrefs?")
  70.            (source "")
  71.            (choices "MailWatchPrefs")
  72.            (dest #DEST_PREFS)
  73.            (infos)
  74.            (confirm)
  75.            (help "The preferences program is the only supported way of configuring MailWatch's behaviour. I recommend that you install it.")
  76. )
  77.  
  78. (complete 20)
  79.  
  80. (set #CHECKCA_HELP (cat "ClassAct programs will not work properly with the CBM "
  81.                         "'button.gadget', but programs expecting to find the "
  82.                         "CBM 'button.gadget' will work properly with the ClassAct "
  83.                         "version."))
  84.  
  85. (message (cat "MailWatchPrefs requires that 'button.gadget' be installed."
  86.               "\n\nIf you have ClassAct installed on your system, DO NOT "
  87.               "install the 'button.gadget' included with this release."
  88.               "\n\nThis script will check for the presence of an installed "
  89.               "ClassAct setup, and will not install the included 'button.gadget'"
  90.               "(which is ©CBM) over the top of it.")
  91.          (help #CHECKCA_HELP)
  92.          (all)
  93. )
  94.  
  95. (set #os_ver (getversion))
  96. (set #os_version (/ #os_ver 65536))
  97.  
  98. (if (< #os_version 39)
  99.     (set #DEST_BUTTONGAD
  100.         (askdir (prompt  "AmigaOS 2.x system - where are '#?.gadget' files normally installed?")
  101.                 (help    @askdir-help)
  102.                 (default "LIBS:Gadgets")
  103.         )
  104.     )
  105.     (set #DEST_BUTTONGAD "SYS:Classes/Gadgets/")
  106. )
  107.  
  108. (set #BG_NAME (tackon #DEST_BUTTONGAD "button.gadget"))
  109.  
  110. (set #bg_ver (getversion #BG_NAME))
  111. (set #bg_version (/ #bg_ver 65536))
  112.  
  113. (if (<> #bg_version 41)
  114.     (
  115.         (set #INSTALL_BG
  116.             (askchoice (prompt  "You don't seem to have ClassAct installed on your system. Therefore, you should install the included 'button.gadget'.")
  117.                        (help    #CHECKCA_HELP)
  118.                        (choices "Install CBM 'button.gadget'" "Do not install")
  119.                        (default 0)
  120.             )
  121.         )
  122.     )
  123.     (
  124.         (set #INSTALL_BG 1)
  125.         (message "You seem to have ClassAct installed on your system. Therefore, I will not overwrite the ClassAct 'button.gadget'." (all))
  126.     )
  127. )
  128.  
  129. (if (= #INSTALL_BG 0)
  130.     (copylib (prompt "Installing 'button.gadget'....")
  131.              (help   @copylib-help)
  132.              (source "classes/gadgets/button.gadget")
  133.              (dest   #DEST_BUTTONGAD)
  134.              (confirm)
  135.     )
  136. )
  137.  
  138. (complete 30)
  139.  
  140. (copyfiles (prompt "Install the external modules for MailWatch?")
  141.            (source "")
  142.            (choices "modules/")
  143.            (dest #DEST_MODS)
  144.            (confirm)
  145.            (help "You also need to install the external modules that MailWatch uses.")
  146. )
  147.  
  148. (complete 36)
  149.  
  150. (set #MAKEPREFDIRS
  151.     (askbool (prompt "MailWatch stores its preferences, by default, in ENVARC:MailWatch/ and ENV:MailWatch/. Create these directories now?")
  152.              (default 1)
  153.              (help   "The preferences program will create these directories if they are needed.")
  154.     )
  155. )
  156.  
  157. (if (= #MAKEPREFDIRS 1)
  158.     (
  159.         (makedir "ENVARC:MailWatch")
  160.         (makedir "ENV:MailWatch")
  161.     )
  162. )
  163.  
  164. (complete 40)
  165.  
  166. (copyfiles (prompt "Install the documentation?")
  167.            (source "")
  168.            (choices "docs/")
  169.            (dest #DEST_DOCS)
  170.            (confirm)
  171.            (help "The documentation is in HTML form; you will need a HTML browser to read it.")
  172. )
  173.  
  174. (complete 80)
  175.  
  176. (set #MSG_DOICONS "Install the icons?")
  177.  
  178. (set #ICONS
  179.     (askchoice (prompt  "Which icons do you want to install to be used by MailWatch?")
  180.                (help    "There are MagicWB and NewIcons icons provided.\n\nThese are suggestions only; any icons can be used in the program.\n")
  181.                (choices "MagicWB" "NewIcons" "None")
  182.                (default 2)
  183.     )
  184. )
  185.  
  186. (if (= #ICONS 0)
  187.     (copyfiles (prompt  #MSG_DOICONS)
  188.                (source  "Icons/MagicWB/")
  189.                (dest #DEST_ICONS)
  190.                (pattern "#?")
  191.     )
  192. )
  193.  
  194. (if (= #ICONS 1)
  195.     (copyfiles (prompt  #MSG_DOICONS)
  196.                (source  "Icons/NewIcons/")
  197.                (dest #DEST_ICONS)
  198.                (pattern "#?")
  199.     )
  200. )
  201.  
  202. (message (cat "\n\n\nYou will need to run MailWatchPrefs, to save a "
  203.               "valid preferences file,\nbefore starting MailWatch. "
  204.               "Look at the documentation for more details.\n\n"
  205.               "Enjoy using MailWatch, and don't forget:\n\n\n"
  206.               "MailWatch is MAILWARE!\n\n")
  207.          (all)
  208. )
  209.  
  210. (complete 100)
  211. (exit)
  212.  
  213.