home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / disk / backup_utils / mrbackup1.5 / install-mrbackup < prev    next >
Text File  |  1995-02-27  |  7KB  |  278 lines

  1. ; Installer script for installing MRBackup Professional
  2.  
  3. (set @default_dest "SYS:MRBackup")
  4.  
  5. ; Establish an error cleanup routine.
  6.  
  7. (onerror
  8.     (makeassign "MRBackup" (safe))
  9. )
  10.  
  11. ; See if this is really an update.
  12.  
  13. (set is_update 0)
  14. (set MRBackup_dest (getassign "MRBackup" "a"))
  15.  
  16. ; If it's an update, be sure user wants to use the same target directory.
  17.  
  18. (if MRBackup_dest
  19.     ; then
  20.     (if (askbool
  21.         (prompt "Your current copy of MRBackup Professional appears to be located in the drawer named \""
  22.                     MRBackup_dest
  23.                     "\". Do you want the update installed in that drawer?"
  24.             )
  25.             (help
  26. "The installer has determined that you may already have a "
  27. "copy of MRBackup installed on your system. If this is wrong or "
  28. "you want the update installed elsewhere, select NO as an "
  29. "answer. Otherwise, select YES."
  30.             )
  31.             (default 1)
  32.         )
  33.  
  34.         (set is_update 1)        ; if user wants in same place
  35.  
  36.         (set MRBackup_dest            ; if user wants in different place
  37.             (askdir
  38.                 (prompt "In which disk or drawer should MRBackup Professional be installed?")
  39.                 (help @askdir-help)
  40.                 (default "SYS:MRBackup")
  41.             )
  42.         )
  43.     )
  44.     ; else
  45.     (
  46.         (set MRBackup_dest
  47.             (askdir
  48.                 (prompt "In which disk or drawer should MRBackup Professional be installed?")
  49.                 (help @askdir-help)
  50.                 (default "SYS:MRBackup")
  51.             )
  52.         )
  53.     )
  54. )
  55.  
  56. (if (not (exists MRBackup_dest) )
  57.     (makedir MRBackup_dest (infos) (confirm) (help) )
  58. )
  59.  
  60. (makeassign "MRBackup" MRBackup_dest (safe))
  61.  
  62. ; Now lock on to volume 'MRBackup'.
  63.  
  64. (askdisk
  65.     (prompt "Please insert the disk labeled \"MRBackup Professional\".")
  66.     (help    "The MRBackup Professional program and support files will be copied "
  67.             "from this disk onto your system.")
  68.     (dest  "MRBackup Professional")
  69.     (newname "MRBackupInstallDisk")
  70. )
  71.  
  72. ; Make MRBackup drawer & icon if not there
  73.  
  74. (if (not is_update)
  75.     (makedir MRBackup_dest (infos))
  76. )
  77.  
  78. (makedir (tackon MRBackup_dest "Work"))
  79. (makedir (tackon MRBackup_dest "Catalogs"))
  80. (makedir (tackon MRBackup_Dest "Lists_and_Logs"))
  81.  
  82. ; At this point we have a valid destination, so we tell installer where
  83. ; the application will end up so the exit page will be correct -- also,
  84. ; the installation log file (if any) will be copied to the destination
  85. (set @default-dest MRBackup_dest)
  86.  
  87. (set cpu_prompt (cat 
  88.     "If you have an accelerated Amiga with a 68020/68030/68040 CPU, you "
  89.     "can elect to install a special version of the software configured "
  90.     "for your accelerated CPU. DO NOT SELECT \"Accelerated CPU\" if you have "
  91.     "a stock 68000 CPU or your machine will crash when you attempt to run "
  92.     "the accelerated version of the software."
  93.     )
  94. )
  95.  
  96. (set cpu_type
  97.     (askchoice 
  98.         (prompt cpu_prompt) 
  99.         (choices "Stock CPU" "Accelerated CPU")
  100.         (help 
  101. "This prompt allows you to select a special version of the software "
  102. "which takes advantage of an accelerated CPU, should you have one "
  103. "installed in your Amiga."
  104.         )
  105.         (default 0) 
  106.     )
  107. )
  108.  
  109. (if (= cpu_type 0)
  110.     (set cpu_type "")
  111.     (set cpu_type "_020")
  112. )
  113.  
  114. (copyfiles
  115.     (source "MRBackupInstallDisk:")
  116.     (pattern "#?.info")
  117.     (dest MRBackup_dest)
  118. )
  119.  
  120. (copyfiles
  121.     (source "MRBackupInstallDisk:ARexx_Scripts")
  122.     (dest (tackon MRBackup_dest "ARexx_Scripts") )
  123.     (all)
  124.     (infos)
  125. )
  126.  
  127. (copyfiles
  128.     (source "MRBackupInstallDisk:Help")
  129.     (dest (tackon MRBackup_dest "Help") )
  130.     (all)
  131.     (infos)
  132. )
  133.  
  134. (copyfiles
  135.     (source "MRBackupInstallDisk:Help.info")
  136.     (dest MRBackup_dest)
  137. )
  138.  
  139. ( if is_update 
  140.   (set copy_prefs 
  141.         (askbool (prompt "Overwrite preferences files?")
  142.                  (help "If you answer Yes, your existing preferences "
  143.                        "files will be overwritten. "
  144.                  )
  145.         )
  146.   )
  147.   ( set copy_prefs 1 )
  148. )
  149.   
  150.  
  151. ( if copy_prefs
  152.     ( copyfiles
  153.         (source "MRBackupInstallDisk:Prefs")
  154.         (dest (tackon MRBackup_dest "Prefs") )
  155.         (all)
  156.         (infos)
  157.     )
  158.     ( transcript "Preferences files were not copied." )
  159. )
  160.  
  161. (copyfiles
  162.     (source "MRBackupInstallDisk:Prefs.info")
  163.     (dest MRBackup_dest)
  164. )
  165.  
  166. (copyfiles
  167.     (source "MRBackupInstallDisk:Docs")
  168.     (dest (tackon MRBackup_dest "Docs") )
  169.     (all)
  170.     (infos)
  171. )
  172.  
  173. (copyfiles
  174.     (source "MRBackupInstallDisk:Docs.info")
  175.     (dest MRBackup_Dest)
  176. )
  177.  
  178. ; The shareware diskette has a special document at the top level.
  179.  
  180. (if (exists "MRBackupInstallDisk:ShareWare")
  181.     (copyfiles
  182.         (source "MRBackupInstallDisk:")
  183.         (pattern "(ShareWare|ShareWare.info)")
  184.         (dest MRBackup_dest)
  185.     )
  186. )
  187.  
  188. (copyfiles
  189.     (source "MRBackupInstallDisk:")
  190.     (pattern    "(MRBackup|MRBackup.info|Compressor.info|FormatDisk|FormatDisk.info)")
  191.     (dest MRBackup_dest)
  192. )
  193.  
  194. (set compressor_name (cat "Compressor" cpu_type))
  195. (copyfiles
  196.     (source (tackon "MRBackupInstallDisk:" compressor_name) )
  197.     (dest MRBackup_dest)
  198.     (newname (tackon MRBackup_dest "Compressor" ) )
  199. )
  200.  
  201. (working "Updating MRBackup icon...")
  202. (tooltype
  203.     (dest MRBackup_dest)
  204.     (noposition)
  205. )
  206.  
  207. ; Copy the AmigaGuide library.
  208. (working "Installing AmigaGuide...")
  209. (copylib
  210.     (source "MRBackupInstallDisk:libs/amigaguide.library")
  211.     (dest "LIBS:")
  212. )
  213.  
  214. (copylib
  215.     (source "MRBackupInstallDisk:s/help.guide")
  216.     (dest "S:")
  217. )
  218.  
  219. ; Copy MRBackup's tape handler to the L: directory.
  220.  
  221. (working "Copying MRTape-Handler...")
  222. (copylib 
  223.     (source "MRBackupInstallDisk:L/mrtape-handler")
  224.     (dest "L:")
  225. )
  226.  
  227. (working "")
  228.  
  229. ; modify S:User-Startup
  230.  
  231. (startup "MRBackup"
  232.     (prompt
  233.         "Some instructions need to be added to the \"S:user-startup\" "
  234.         "so that your system will be properly configured to use MRBackup.")
  235.     (help "Do this or MRBackup won't work!!")
  236.     (command
  237.         "ASSIGN MRBackup: \"" MRBackup_dest "\"\n"
  238.         the_cache
  239.     )
  240. )
  241.  
  242. ; reinitialize assigns
  243.  
  244. (if (not @pretend)
  245.     (    
  246.         (makeassign "MRBackup" MRBackup_dest)
  247.     )
  248. )
  249.  
  250.  
  251. ; Force the user-level to 2 so that the following message will appear
  252. ; for all user levels.
  253.  
  254. (user 2)
  255.  
  256. (message
  257.     "If you are going to be using the included\n"
  258.     "MRTape-Handler, you will need to manually\n"
  259.     "copy the appropriate mountlist entries from\n"
  260.     "the installation diskette to your hard disk.\n"
  261.     "For AmigaDOS version 2.04, do this: \n\n"
  262.     "COPY CLONE df0:Devs/mountlist.mrtape DEVS: \n\n"
  263.     "and for AmigaDOS version 2.1 or higher, do this: \n\n"
  264.     "COPY CLONE df0:Devs/DosDrivers Devs:DosDrivers ALL \n\n"
  265.     "Be sure to edit the mountlists so that they\n"
  266.     "match your requirements. \n"
  267. )
  268.  
  269. (complete 100)
  270.  
  271.     ; cleanup
  272.  
  273. (makeassign "MRBackupInstallDisk" (safe))
  274.  
  275. ; this is not strictly necessary, but doesn't hurt -- there is always
  276. ; a default (exit) at the end of any script
  277. (exit)
  278.