home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / scheduler1.20 / install_scheduler next >
Text File  |  1994-05-26  |  3KB  |  169 lines

  1. ; Scheduler Install Utility
  2. ;
  3. ; (4/7/94)
  4.  
  5. ; *********************
  6. ; * Globals           *
  7. ; *********************
  8. ;
  9. (set ProgName "Scheduler1.20")
  10.  
  11. (set OSVersion        (/ (getversion) 65536))
  12.  
  13. (if (< OSVersion 36)
  14.     (
  15.     (abort "This Program requires 2.0 and above.")
  16.     (exit)
  17.     )
  18. )
  19.  
  20. (
  21.     (set dest_dir
  22.         (askdir
  23.             (prompt "Select where you would like to install Scheduler.")
  24.             (help "This is where Scheduler will be located. You might "
  25.                   "want to put this in your Utility directory, or if "
  26.                   "run as a commodity, place it in your WBStartup drawer")
  27.             (default (expandpath "SYS:WBStartup"))
  28.         )
  29.     )
  30.     
  31.     (set @default-dest dest_dir)
  32.     (makeassign "SCHEDINSTALL" @default-dest)
  33.     
  34.     (working "Installing Scheduler Program...")
  35.     
  36.     (copyfiles
  37.         (prompt "")
  38.         (help @copyfiles-help)
  39.         (dest @default-dest)
  40.         (source ProgName)
  41.         (infos)
  42.     )
  43.  
  44.     (copyfiles
  45.         (prompt "")
  46.         (help @copyfiles-help)
  47.         (dest @default-dest)
  48.         (source "scheduler.prefs")
  49.         (infos)
  50.     )
  51.  
  52.     (set samfiles
  53.         (askbool
  54.             (prompt "Do you want to install the sample files?")
  55.             (help "This will install the sample files.")
  56.             (choices "Yes" "No")
  57.             (default 0)
  58.         )
  59.     )
  60.     
  61.     (if (<> samfiles 0)
  62.         (
  63.         (copyfiles
  64.             (prompt "")
  65.             (source "sample.sch")
  66.             (help @copyfiles-help)
  67.             (dest @default-dest)
  68.             (optional)
  69.         )
  70.         )
  71.     )
  72.  
  73.     (set pop
  74.         (askbool
  75.             (prompt "Do you want the window to open upon start?")
  76.             (help @askchoice-help)
  77.             (choices "Yes" "No")
  78.             (default 0)
  79.         )
  80.     )
  81.     (if (<> pop 0)
  82.         (tooltype
  83.             (prompt "")
  84.             (help   "")
  85.             (dest ("SCHEDINSTALL:%s" ProgName))
  86.             (settooltype "POPUP" "YES")
  87.         )
  88.     )
  89.     (if (<> pop 1)
  90.         (tooltype
  91.             (prompt "")
  92.             (help   "")
  93.             (dest ("SCHEDINSTALL:%s" ProgName))
  94.             (settooltype "POPUP" "NO")
  95.         )
  96.     )
  97.  
  98. ;Install Doc files????
  99.  
  100. (procedure setDocsOpt
  101.     (set DocsOpt
  102.         (
  103.         (askoptions
  104.             (prompt "Select the format you wish your documentation to be installed")
  105.             (help @askoption-help)
  106.             (choices
  107.                 "Scheduler.guide"
  108.                 "Scheduler.doc"
  109.             )
  110.         )
  111.         )
  112.     )
  113. )
  114.  
  115.     (set docs
  116.         (askbool
  117.             (prompt "Do you want to install the docs?")
  118.             (help @askchoice-help)
  119.             (choices "Yes" "No")
  120.             (default 0)
  121.         )
  122.     )
  123.  
  124.     (if (<> docs 0)
  125.         (
  126.             (setDocsOpt)
  127.             (set docdir
  128.                 (askdir
  129.                     (prompt "Select where you would like to install the Documentation.")
  130.                     (help "This is where Scheduler docs will be located. ")
  131.                     (default @default-dest)
  132.                 )
  133.             )
  134.             (if (IN DocsOpt 0)
  135.                 (copyfiles
  136.                     (prompt "")
  137.                     (help @copyfiles-help)
  138.                     (source "")
  139.                     (dest docdir)
  140.                     (choices "Scheduler1.2.guide")
  141.                     (infos)
  142.                 )
  143.             )
  144.             (if (IN DocsOpt 1)
  145.                 (copyfiles
  146.                     (prompt "")
  147.                     (help @copyfiles-help)
  148.                     (source "")
  149.                     (dest docdir)
  150.                     (choices "Scheduler1.2.doc")
  151.                     (infos)
  152.                 )
  153.             )
  154.         )
  155.     )
  156.  
  157. (set msg1 ("Thanks for using %s" ProgName))
  158.  
  159. (exit msg1)
  160.  
  161.  
  162. ; ***********
  163. ; * Cleanup *
  164. ; ***********
  165.  
  166.     (makeassign "SCHEDINSTALL")
  167.  
  168. )
  169.