home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 13 / amigaformatcd13.iso / -seriously_amiga- / shareware / misc / ezcron / ezcron.install < prev    next >
Text File  |  1997-03-06  |  4KB  |  210 lines

  1. ; Installer Script for EZCron
  2. ; 02/14/97  Jim Hines
  3.  
  4. ; set up an error cleanup routine
  5. (onerror
  6.     (makeassign "EZsrc" (safe))
  7.     (makeassign "EZdest" (safe))
  8. )
  9.  
  10. ;started
  11. (complete 0)
  12.  
  13. ;cancel the assign in case of installation restart
  14. (makeassign "EZsrc" (safe))
  15. (makeassign "EZdest" (safe))
  16.  
  17. ; get the dest dir for EZCron (create it if it does not exist)
  18. (set ez_dest
  19.     (tackon
  20.         (askdir
  21.             (prompt "Where should EZCron be installed? A drawer named `EZCron' will be created.")
  22.             (help @askdir-help)
  23.             (default @default-dest)
  24.         )
  25.         "EZCron"
  26.     )
  27. )
  28. (makeassign "EZdest"
  29.     (pathonly ez_dest)
  30.     (safe)
  31. )
  32. (if (exists "EZdest:EZCron")
  33.     (+ 1 1)
  34.     (makedir
  35.         "EZdest:EZCron"
  36.         (infos)
  37.         (safe)
  38.     )
  39. )
  40.  
  41. (if (exists "EZdest:EZCron/Prefs")
  42.     (+ 1 1)
  43.     (makedir
  44.         "EZdest:EZCron/Prefs"
  45.         (safe)
  46.     )
  47. )
  48.  
  49. (if (exists "EZdest:EZCron/Doc")
  50.     (+ 1 1)
  51.     (makedir
  52.         "EZdest:EZCron/Doc"
  53.         (safe)
  54.         (infos)
  55.     )
  56. )
  57.  
  58.  
  59. (if (exists "EZdest:EZCron/rexx")
  60.     (+ 1 1)
  61.     (makedir
  62.         "EZdest:EZCron/rexx"
  63.         (safe)
  64.     )
  65. )
  66.  
  67. ;We now have a valid destination, so tell Installer where EZCron will end up
  68. ;so the exit page will be correct.
  69. (set @default-dest ez_dest)
  70.  
  71. ;copy program files from source to dest
  72.         (copyfiles
  73.             (source "EZCrond")
  74.             (dest "EZdest:EZCron")
  75.             (infos)
  76.         )
  77.  
  78. (copyfiles
  79.     (source "EZCron")
  80.     (dest "EZdest:EZCron")
  81.     (infos)
  82. )
  83.  
  84.  
  85. ;copy program files from source to dest
  86. (copyfiles
  87.     (source "EZCron.info")
  88.     (dest "EZdest:EZCron")
  89.     (infos)
  90. )
  91.  
  92. (copyfiles
  93.     (source "ezc.gui")
  94.     (dest "EZdest:EZCron")
  95. )
  96.  
  97.  
  98. ;copy program files from source to dest
  99.         (copyfiles
  100.             (source "readme")
  101.             (dest "EZdest:EZCron")
  102.             (infos)
  103.         )
  104.  
  105. ;copy program files from source to dest
  106.         (copyfiles
  107.             (source "README.FIRST!")
  108.             (dest "EZdest:EZCron")
  109.             (infos)
  110.         )
  111.  
  112.  
  113. ;copy program files from source to dest
  114.         (copyfiles
  115.             (source "Doc")
  116.             (dest "EZdest:EZCron/Doc")
  117.         (all)
  118.         )
  119.  
  120.  
  121. (working "Copying the rexx scripts.")
  122. ;copy rexx files from source to dest
  123.         (copyfiles
  124.             (source "rexx")
  125.             (dest "EZdest:EZCron/rexx")
  126.         (all)
  127.         )
  128.  
  129. (working "Copying the prefs files.")
  130. ;copy prefs files from source to dest
  131.         (copyfiles
  132.             (source "prefs")
  133.             (dest "EZdest:EZCron/prefs")
  134.         (all)
  135.         )
  136.  
  137.  
  138.  
  139. ;copy program files from source to dest
  140.         (copyfiles
  141.             (source "s/cron.config")
  142.             (dest "s:")
  143.             (infos)
  144.         )
  145.  
  146.  
  147. ;copy library files from source to dest with version checking
  148.         (copylib
  149.             (source "Libs/arexxport.library")
  150.             (dest "libs:")
  151.         )
  152.  
  153. ;copy library files from source to dest with version checking
  154.         (copylib
  155.             (source "Libs/rexxreqtools.library")
  156.             (dest "libs:")
  157.         )
  158.  
  159. ;copy library files from source to dest with version checking
  160.         (copylib
  161.             (source "rexxc/Varexx")
  162.             (dest "sys:rexxc")
  163.         )
  164.  
  165. ;copy library files from source to dest with version checking
  166.         (copylib
  167.             (source "rexxc/VXC")
  168.             (dest "sys:rexxc")
  169.         )
  170.  
  171.  
  172. ;add the assign for EZCron: to user-startup
  173. (set ezassign ("Assign EZCron: \"%s\"\n" ez_dest))
  174.  
  175. ;add program startup to s:user-startup sequence
  176. (set ezrexxstart ("run <>NIL: rx EZCron:EZCrond start \n"))
  177. (startup
  178.         "EZCron"
  179.         (prompt "EZCron requires that an AmigaDOS assign be created. It WILL NOT work properly without it! The following will be added to your s:user-startup file:\n\n"
  180.             ezassign
  181.             "\nIs it okay to add this now?"
  182.             "\n\nIMPORTANT: REBOOT YOUR COMPUTER BEFORE EZCRON FOR THE FIRST TIME.")
  183.         (help @startup-help)
  184.         (command ezassign)
  185.         (command ezrexxstart)
  186. )
  187.  
  188. (complete 95)
  189.  
  190. ;un-snapshot the EZCron drawer icon
  191. (tooltype
  192.     (dest ez_dest)
  193.     (noposition)
  194. )
  195.  
  196.  
  197. ;finished with install
  198. (complete 100)
  199.  
  200. ;cleanup
  201. (makeassign "EZsrc" (safe))
  202. (makeassign "EZdest" (safe))
  203.  
  204. ;display the readme file
  205. (run "run more EZCron.readme" (safe))
  206.  
  207. ;leave
  208. (exit)
  209.  
  210.