home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / rs60-3.dms / rs60-3.adf / Install-ReSource < prev    next >
Encoding:
Text File  |  1994-04-26  |  17.9 KB  |  852 lines

  1. ;This Installer script is used to install ReSource V6 on your hard disk.
  2. ;
  3. ;This script Copyright ©1994 by The Puzzle Factory, Inc.
  4.  
  5. (set SysVer (/ (getversion) 65536))
  6. (set LibsColon (getassign "libs"))
  7. (set ReSourceColon (getassign "ReSource"))
  8.  
  9. (set #HelloMsg
  10.     (cat
  11.         "\n\n\nThis script will install\n\nReSource V6\n\non your hard disk."
  12.     )
  13. )
  14.  
  15. (set #MinOSMsg
  16.     (cat
  17.         "Sorry, ReSource REQUIRES V37 (2.04) or better of the Amiga OS."
  18.     )
  19. )
  20.  
  21. (set #InstallASLPrompt
  22.     (cat
  23.         "Install V39.4 of asl.library?"
  24.     )
  25. )
  26.  
  27. (set #InstallASLHelp
  28.     (cat
  29.         "For full support of all ReSource features, ReSource requires a version "
  30.         "of asl.library which contains the system ScreenMode requester.\n\n"
  31.         @copylib-help
  32.     )
  33. )
  34.  
  35. (set #ReSourceDirPrompt
  36.     (cat
  37.         "Where should the ReSource directory be created?"
  38.     )
  39. )
  40.  
  41. (set #ReSourceDirHelp
  42.     (cat
  43.         "A directory named \"RS\" will be created here to hold all the "
  44.         "main ReSource executables.\n\n"
  45.         @askdir-help
  46.     )
  47. )
  48.  
  49. (set #ReSourceDirNoSpace
  50.     (cat
  51.         "Sorry, that volume doesn't have enough space free for a ReSource "
  52.         "installation!  Please choose another place to install ReSource."
  53.     )
  54. )
  55.  
  56. (set #ReSourceLibsPrompt
  57.     (cat
  58.         "Where should the ReSource libraries be installed?"
  59.     )
  60. )
  61.  
  62. (set #OldVerMsg
  63.     (cat
  64.         "Sorry, you seem to already have a version of the ReSource support "
  65.         "libraries installed in an earlier path, which means the new version "
  66.         "of the libraries will not be found.  Please choose a path which is "
  67.         "higher in the list (see your documentation, or the 'HELP' for the "
  68.         "previous screen), or delete any old versions of the ReSource support "
  69.         "libraries and run this script again."
  70.     )
  71. )
  72.  
  73. (set #InvalidDirMsg
  74.     (cat
  75.         "Sorry, the directory you have chosen would place the ReSource "
  76.         "support libraries where ReSource could never find them.  Please "
  77.         "choose one of the recommended directories (see your documentation, "
  78.         "or the 'HELP' for the previous screen)."
  79.     )
  80. )
  81.  
  82. (set #ReSourceLibsNoSpace
  83.     (cat
  84.         "Sorry, that location doesn't have enough space free to install the "
  85.         "ReSource support libraries!  Please choose another place to install "
  86.         "these libraries."
  87.     )
  88. )
  89.  
  90. (set #ExtrasHelp
  91.     (cat
  92.         "Check which of these options you are interested in installing "
  93.         "at this time.  You will be given a chance to select a location "
  94.         "separately for each option.\n\n"
  95.         @askoptions-help
  96.     )
  97. )
  98.  
  99. (set #ExtrasNoSpace
  100.     (cat
  101.         "Sorry, there is not enough room on that volume to install the extra "
  102.         "files you have chosen.  Please choose another destination."
  103.     )
  104. )
  105.  
  106. (user 2)
  107.  
  108. ;space_target  - "thing" to find out available space for
  109. ;space_avail    - return value
  110.  
  111. (procedure GETSPACE
  112.     (
  113.         (set SPACEtmp space_target)
  114.         (while (not (= SPACEdir SPACEtmp))
  115.             (set SPACEtmp (pathonly SPACEtmp))
  116.             (set SPACEdir (pathonly SPACEtmp))
  117.         )
  118.         (if (or (= SPACEdir "RAM:")
  119.             (or (= SPACEdir "Ram:")
  120.             (or (= SPACEdir "ram:") (= SPACEdir "Ram Disk:"))))
  121.  
  122.             ; looks like RAM:...
  123.             (set space_avail (+ (database "total-mem")))
  124.  
  125.             ; looks like somewhere else...
  126.             (set space_avail (getdiskspace space_target))
  127.         )
  128.     )
  129. )
  130.  
  131. (complete 0)
  132.  
  133. (message #HelloMsg)
  134.  
  135. (if (< SysVer 37)
  136.     (
  137.         (message #MinOSMsg)
  138.         (abort)
  139.     )
  140. )
  141.  
  142. (if (askbool
  143.         (prompt #InstallASLPrompt)
  144.         (help    #InstallASLHelp)
  145.         (choices "Proceed" "Skip this file")
  146.     )
  147.     (copylib
  148.         (source "ReSource_3:asl.library")
  149.         (dest    "libs:")
  150.     )
  151. )
  152.  
  153. (set OK 0)
  154.  
  155. (while (= OK 0)
  156.     (set ResMain
  157.         (askdir
  158.             (prompt #ReSourceDirPrompt)
  159.             (help    #ReSourceDirHelp)
  160.             (default @default-dest)
  161.         )
  162.     )
  163.     (set space_target ResMain)
  164.     (GETSPACE)
  165.  
  166.     (if (< space_avail 380000)
  167.         (message #ReSourceDirNoSpace)
  168.     (set OK 1)
  169.     )
  170. )
  171.  
  172. (set ResMain (tackon ResMain "RS"))
  173.  
  174. (makedir ResMain (safe))
  175.  
  176. (set @default-dest ResMain)
  177.  
  178. (complete 1)
  179.  
  180. (askdisk
  181.     (prompt "\n\nPlease insert\n\nReSource Disk 1\n\nin any drive.")
  182.     (help    "The main ReSource files are supplied on ReSource Disk 1.\n\n"
  183.             @askdisk-help
  184.     )
  185.     (dest    "ReSource_1")
  186. )
  187.  
  188. (working "Copying ReSource...")
  189.  
  190. (copyfiles
  191.     (source "ReSource_1:")
  192.     (dest    ResMain)
  193.     (choices
  194.             "ReadMe"
  195.             "ReSource"
  196.             "RS.KeyTable"
  197.             "RS.Macros"
  198.             "ShowKeys"
  199.             "ShowMacros"
  200.     )
  201.     (infos)
  202. )
  203.  
  204. (complete 10)
  205.  
  206. (set tempdir (tackon ResMain "libs"))
  207.  
  208. (makedir tempdir (safe))
  209.  
  210. (set OK 0)
  211.  
  212. (while (= OK 0)
  213.     (set ResLib
  214.         (askdir
  215.             (prompt #ReSourceLibsPrompt)
  216.             (help    "ReSource has several support libraries needed for proper "
  217.                     "operation.  The suggested default location for these "
  218.                     "libraries is in a subdirectory of the place you installed  "
  219.                     "ReSource.  ReSource knows to look for these libraries in one "
  220.                     "of several places:\n\n"
  221.                     ("      %s\n" tempdir)
  222.                     "      libs:\n"
  223.                     "      libs:ReSource\n"
  224.                     "      ReSource:\n"
  225.                     "      ReSource:libs\n\n"
  226.                     "If you do not install the libraries in one of these places, "
  227.                     "ReSource will not run, as it won't be able to find the files "
  228.                     "it needs.\n\n"
  229.                     @askdir-help
  230.             )
  231.             (default tempdir)
  232.         )
  233.     )
  234.  
  235.     ; first check to see if they want 'em in PROGDIR:libs.  If so, we can skip
  236.     ; the rest of the following mess...
  237.     (if (= ResLib tempdir)
  238.  
  239.         ; yes, in PROGDIR:libs.  Exit loop
  240.         (set OK 1)
  241.  
  242.         ; no... well then, here's YAK (Yet Another Kludge)
  243.         (
  244.             ; see if they chose a valid place to put the libraries
  245.             (set ValidPath 0)
  246.             (if (= ResLib LibsColon)
  247.                 (set ValidPath 1)
  248.             )
  249.             (if (= ResLib (tackon LibsColon "ReSource"))
  250.                 (set ValidPath (+ ValidPath 2))
  251.             )
  252.             (if (= ResLib ReSourceColon)
  253.                 (set ValidPath (+ ValidPath 4))
  254.             )
  255.             (if (= ResLib (tackon ReSourceColon "libs"))
  256.                 (set ValidPath (+ ValidPath 8))
  257.             )
  258.  
  259.             ; if the path they chose is valid, see if there's an old .library
  260.             ; earlier in the path
  261.             (if ValidPath
  262.  
  263.                 ; if they set the destination to a valid one, check for conflict with
  264.                 ; old version files in "earlier" locations
  265.                 (
  266.                     ; Check for 'ReSourcesyms.library' in all the paths that matter
  267.                     (set OldLib 0)
  268.                     (if (exists (tackon tempdir "ReSourcesyms.library"))
  269.                         (set OldLib 1)
  270.                     )
  271.                     (if (exists (tackon LibsColon "ReSourcesyms.library"))
  272.                         (set OldLib (+ OldLib 2))
  273.                     )
  274.                     (if (exists (tackon LibsColon "ReSource/ReSourcesyms.library"))
  275.                         (set OldLib (+ OldLib 4))
  276.                     )
  277.                     (if (exists (tackon ReSourceColon "ReSourcesyms.library"))
  278.                         (set OldLib (+ OldLib 8))
  279.                     )
  280.  
  281.                     ; if ReSourcesyms.library exists in any paths, see if it'll
  282.                     ; conflict.  Code may be hard to follow, but it works!
  283.                     (if OldLib
  284.                         (
  285.                             (if (in OldLib 0)
  286.                                 (message #OldVerMsg)
  287.                                 (if (and (in OldLib 1) (> ValidPath 1))
  288.                                     (message #OldVerMsg)
  289.                                     (if (and (in OldLib 2) (> ValidPath 2))
  290.                                         (message #OldVerMsg)
  291.                                         (if (and (in OldLib 3) (> ValidPath 4))
  292.                                             (message #OldVerMsg)
  293.  
  294.                                             ; if we got this deep and everything
  295.                                             ; is OK, exit the loop and go with it!
  296.                                             (set OK 1)
  297.                                         )
  298.                                     )
  299.                                 )
  300.                             )
  301.                         )
  302.  
  303.                         ; didn't find any old versions of the .library file
  304.                         (set OK 1)
  305.                     )
  306.                 )
  307.  
  308.                 ; if not a valid directory, tell 'em about it and loop back
  309.                 (message #InvalidDirMsg)
  310.             )
  311.         )
  312.     ) ; end of 'if (= ResLib tempdir)'
  313.  
  314.     (if (= OK 1)
  315.         (
  316.             (set space_target ResLib)
  317.             (GETSPACE)
  318.  
  319.             (if (< space_avail 470000)
  320.                 (
  321.                     (message #ReSourceLibsNoSpace)
  322.                     (set OK 0)
  323.                 )
  324.             )
  325.         )
  326.     )
  327. ) ; end of 'while (= OK 0)'
  328.  
  329. (if (not (= ResLib tempdir))
  330.     (delete tempdir (safe))
  331. )
  332.  
  333. (complete 20)
  334.  
  335. (askdisk
  336.     (prompt "\n\nPlease insert\n\nReSource Disk 1\n\nin any drive.")
  337.     (help    "The ReSource support libraries are supplied on ReSource Disk 1.\n\n"
  338.             @askdisk-help
  339.     )
  340.     (dest    "ReSource_1")
  341. )
  342.  
  343. (working "Copying ReSource support libraries...")
  344.  
  345. (copyfiles
  346.     (source "ReSource_1:libs")
  347.     (dest    ResLib)
  348.     (infos)
  349.     (all)
  350. )
  351.  
  352. (complete 25)
  353.  
  354. (set ProgList
  355.     (askoptions
  356.         (prompt "Please choose which of the supplied 'extra' files you wish "
  357.                 "to install:  (amount of disk space required is shown in "
  358.                 "parentheses)"
  359.         )
  360.         (help    #ExtrasHelp)
  361.         (choices
  362.                 "development tools (83k)"
  363.                 ".fd files         (46k)"
  364.                 "include.i files  (566k)"
  365.                 "link libraries   (242k)"
  366.                 "startup files     (47k)"
  367.         )
  368.     )
  369. )
  370.  
  371. (complete 30)
  372.  
  373. (if ProgList
  374.     (
  375.         (askdisk
  376.             (prompt "\n\nPlease insert\n\nReSource Disk 3\n\nin any drive.")
  377.             (help    "The extra file archives are supplied on ReSource Disk 3.\n\n"
  378.                     @askdisk-help
  379.             )
  380.             (dest    "ReSource_3")
  381.         )
  382.  
  383.         (copyfiles (source "ReSource_3:lhex") (dest "ram:"))
  384.         (if (in ProgList 0)
  385.             (
  386.                 (set tempdir (tackon ResMain "devtools"))
  387.                 (makedir tempdir (safe))
  388.  
  389.                 (set OK 0)
  390.                 (while (= OK 0)
  391.                     (set DestDir
  392.                         (askdir
  393.                             (prompt "Where should the developer tools be installed?")
  394.                             (help    @askdir-help)
  395.                             (default tempdir)
  396.                         )
  397.                     )
  398.  
  399.                     (set space_target DestDir)
  400.                     (GETSPACE)
  401.  
  402.                     (if (< space_avail 85000)
  403.                         (message #ExtrasNoSpace)
  404.                         (set OK 1)
  405.                     )
  406.                 )
  407.                 (if (not (= DestDir tempdir))
  408.                     (delete tempdir)
  409.                 )
  410.                 (working "Extracting from 'devtools' archive..")
  411.                 (run (cat "ram:lhex -aFw \"" DestDir "\" x ReSource_3:devtools.lha"))
  412.             )
  413.         )
  414.         (complete 40)
  415.         (if (in ProgList 1)
  416.             (
  417.                 (set tempdir (tackon ResMain "fd"))
  418.                 (makedir tempdir (safe))
  419.  
  420.                 (set OK 0)
  421.                 (while (= OK 0)
  422.                     (set DestDir
  423.                         (askdir
  424.                             (prompt "Where should the .fd files be installed?")
  425.                             (help    @askdir-help)
  426.                             (default tempdir)
  427.                         )
  428.                     )
  429.  
  430.                     (set space_target DestDir)
  431.                     (GETSPACE)
  432.  
  433.                     (if (< space_avail 47000)
  434.                         (message #ExtrasNoSpace)
  435.                         (set OK 1)
  436.                     )
  437.                 )
  438.                 (if (not (= DestDir tempdir))
  439.                     (delete tempdir)
  440.                 )
  441.                 (working "Extracting from 'fd' archive..")
  442.                 (run (cat "ram:lhex -aFw \"" DestDir "\" x ReSource_3:fd.lha"))
  443.             )
  444.         )
  445.         (complete 50)
  446.         (if (in ProgList 2)
  447.             (
  448.                 (set tempdir (tackon ResMain "include"))
  449.                 (makedir tempdir (safe))
  450.  
  451.                 (set OK 0)
  452.                 (while (= OK 0)
  453.                     (set DestDir
  454.                         (askdir
  455.                             (prompt "Where should the include files be installed?")
  456.                             (help    @askdir-help)
  457.                             (default tempdir)
  458.                         )
  459.                     )
  460.  
  461.                     (set space_target DestDir)
  462.                     (GETSPACE)
  463.  
  464.                     (if (< space_avail 580000)
  465.                         (message #ExtrasNoSpace)
  466.                         (set OK 1)
  467.                     )
  468.                 )
  469.                 (if (not (= DestDir tempdir))
  470.                     (delete tempdir)
  471.                 )
  472.                 (working "Extracting from 'include_i' archive..")
  473.                 (run (cat "ram:lhex -aFw \"" DestDir "\" x ReSource_3:include_i.lha"))
  474.             )
  475.         )
  476.         (complete 60)
  477.         (if (in ProgList 3)
  478.             (
  479.                 (set tempdir (tackon ResMain "lib"))
  480.                 (makedir tempdir (safe))
  481.  
  482.                 (set OK 0)
  483.                 (while (= OK 0)
  484.                     (set DestDir
  485.                         (askdir
  486.                             (prompt "Where should the .lib files be installed?")
  487.                             (help    @askdir-help)
  488.                             (default tempdir)
  489.                         )
  490.                     )
  491.  
  492.                     (set space_target DestDir)
  493.                     (GETSPACE)
  494.  
  495.                     (if (< space_avail 248000)
  496.                         (message #ExtrasNoSpace)
  497.                         (set OK 1)
  498.                     )
  499.                 )
  500.                 (if (not (= DestDir tempdir))
  501.                     (delete tempdir)
  502.                 )
  503.                 (working "Extracting from 'libs' archive..")
  504.                 (run (cat "ram:lhex -aFw \"" DestDir "\" x ReSource_3:libs.lha"))
  505.             )
  506.         )
  507.         (complete 70)
  508.         (if (in ProgList 4)
  509.             (
  510.                 (set tempdir (tackon ResMain "startups"))
  511.                 (makedir tempdir (safe))
  512.  
  513.                 (set OK 0)
  514.                 (while (= OK 0)
  515.                     (set DestDir
  516.                         (askdir
  517.                             (prompt "Where should the startup files be installed?")
  518.                             (help    @askdir-help)
  519.                             (default tempdir)
  520.                         )
  521.                     )
  522.  
  523.                     (set space_target DestDir)
  524.                     (GETSPACE)
  525.  
  526.                     (if (< space_avail 48000)
  527.                         (message #ExtrasNoSpace)
  528.                         (set OK 1)
  529.                     )
  530.                 )
  531.                 (if (not (= DestDir tempdir))
  532.                     (delete tempdir)
  533.                 )
  534.                 (working "Extracting from 'startups' archive..")
  535.                 (run (cat "ram:lhex -aFw \"" DestDir "\" x ReSource_3:startups.lha"))
  536.             )
  537.         )
  538.         (delete "ram:lhex")
  539.     )
  540. )
  541.  
  542. (complete 80)
  543.  
  544. (if (askbool
  545.         (prompt "There are several optional files included in the ReSource "
  546.                 "package.  You will be asked about each file individually.  "
  547.                 "Do you wish to install any of these optional files?"
  548.         )
  549.         (help    "These files include:\n\n"
  550.                 "CFuncs.rcl - a ReSource Control Language file that provides "
  551.                 "ReSource with information about standard 'C' functions.\n\n"
  552.                 "Various example files and ReSource documentation."
  553.         )
  554.         (choices "Install files" "Skip these files")
  555.     )
  556.  
  557.     ; Install optional
  558.     (
  559.         (if (askbool
  560.                 (prompt "Install \"CFuncs.rcl\" file?")
  561.                 (help    "This is a ReSource Control Language file that provides "
  562.                         "ReSource with information about standard 'C' functions.  "
  563.                         "It is about 300K in length.\n\n"
  564.                 )
  565.             )
  566.  
  567.             ; yes, install CFuncs.rcl
  568.             (
  569.                 (askdisk
  570.                     (prompt "\n\nPlease insert\n\nReSource Disk 2\n\nin any drive.")
  571.                     (help    "The optional file \"CFuncs.rcl\" is supplied on "
  572.                             "ReSource Disk 2.\n\n"
  573.                             @askdisk-help
  574.                     )
  575.                     (dest    "ReSource_2")
  576.                 )
  577.  
  578.                 (set OK 0)
  579.                 (while (= OK 0)
  580.                     (set DestDir
  581.                         (askdir
  582.                             (prompt "Where should the CFuncs.rcl file be installed?")
  583.                             (help    @askdir-help)
  584.                             (default "libs:")
  585.                         )
  586.                     )
  587.  
  588.                     (set space_target DestDir)
  589.                     (GETSPACE)
  590.  
  591.                     (if (< space_avail 310000)
  592.                         (message #ExtrasNoSpace)
  593.                         (set OK 1)
  594.                     )
  595.                 )
  596.  
  597.                 (copyfiles
  598.                     (source "ReSource_2:CFuncs.rcl")
  599.                     (dest    DestDir)
  600.                 )
  601.             )
  602.         )
  603.  
  604.         (complete 85)
  605.  
  606.         (if (askbool
  607.                 (prompt "Install ReSource documentation?")
  608.                 (help    "Several documentation files are supplied on disk for ease "
  609.                         "of access while using ReSource."
  610.                 )
  611.             )
  612.  
  613.             ; yes, install documentation
  614.             (
  615.                 (set DocList
  616.                     (askoptions
  617.                         (prompt "Please choose which documentation files you wish "
  618.                                 "to install."
  619.                         )
  620.                         (help    @askoptions-help)
  621.                         (choices
  622.                             "RCL.doc"
  623.                             "ShowKeys.doc"
  624.                             "ShowMacros.doc"
  625.                             "UserSymbols.doc"
  626.                         )
  627.                     )
  628.                 )
  629.                 (if DocList
  630.                     (
  631.                         (askdisk
  632.                             (prompt "\n\nPlease insert\n\nReSource Disk 2\n\nin any "
  633.                                     "drive."
  634.                             )
  635.                             (help    "The ReSource documentation files are supplied "
  636.                                     "on ReSource Disk 2, in the \"Docs\" directory.\n\n"
  637.                                     @askdisk-help
  638.                             )
  639.                             (dest    "ReSource_2")
  640.                         )
  641.                         (set DocDest
  642.                             (askdir
  643.                                 (prompt "Where do you wish the documentation files "
  644.                                         "installed?"
  645.                                 )
  646.                                 (help    @askdir-help)
  647.                                 (default @default-dest)
  648.                             )
  649.                         )
  650.                         (set OK 0)
  651.                         (while (= OK 0)
  652.                             (set DestDir
  653.                                 (askdir
  654.                                     (prompt "Where should the documentation files be installed?")
  655.                                     (help    @askdir-help)
  656.                                     (default ResMain)
  657.                                 )
  658.                             )
  659.  
  660.                             (set space_target DestDir)
  661.                             (GETSPACE)
  662.  
  663.                             (if (< space_avail 114000)
  664.                                 (message #ExtrasNoSpace)
  665.                                 (set OK 1)
  666.                             )
  667.                         )
  668.  
  669.                         (if (in DocList 0)
  670.                             (copyfiles
  671.                                 (source "ReSource_2:Docs/RCL.doc")
  672.                                 (dest DestDir)
  673.                                 (infos)
  674.                             )
  675.                         )
  676.                         (if (in DocList 1)
  677.                             (copyfiles
  678.                                 (source "ReSource_2:Docs/ShowKeys.doc")
  679.                                 (dest DestDir)
  680.                                 (infos)
  681.                             )
  682.                         )
  683.                         (if (in DocList 2)
  684.                             (copyfiles
  685.                                 (source "ReSource_2:Docs/ShowMacros.doc")
  686.                                 (dest DestDir)
  687.                                 (infos)
  688.                             )
  689.                         )
  690.                         (if (in DocList 3)
  691.                             (copyfiles
  692.                                 (source "ReSource_2:Docs/UserSymbols.doc")
  693.                                 (dest DestDir)
  694.                                 (infos)
  695.                             )
  696.                         )
  697.                     )
  698.                 )
  699.             )    ; end of "if DocList"
  700.         )    ; end of install documentation
  701.  
  702.         (complete 92)
  703.  
  704.         (if (askbool
  705.                 (prompt "Install Tutorial files?")
  706.                 (help    "These are files used with the Tutorial section of the "
  707.                         "manual.  Recommended!"
  708.                 )
  709.             )
  710.  
  711.             ; yes, install tutorials
  712.             (
  713.                 (askdisk
  714.                     (prompt "\n\nPlease insert\n\nReSource Disk 2\n\nin any drive.")
  715.                     (help    "The Tutorial files are supplied on ReSource Disk 2, "
  716.                             "in the \"Tutorials\" directory.\n\n"
  717.                             @askdisk-help
  718.                     )
  719.                     (dest    "ReSource_2")
  720.                 )
  721.  
  722.                 (set OK 0)
  723.                 (while (= OK 0)
  724.                     (set DestDir
  725.                         (askdir
  726.                             (prompt "Where should the Tutorial files be installed?")
  727.                             (help    @askdir-help)
  728.                             (default ResMain)
  729.                         )
  730.                     )
  731.  
  732.                     (set space_target DestDir)
  733.                     (GETSPACE)
  734.  
  735.                     (if (< space_avail 9000)
  736.                         (message #ExtrasNoSpace)
  737.                         (set OK 1)
  738.                     )
  739.                 )
  740.  
  741.                 (copyfiles
  742.                     (source "ReSource_2:Tutorials")
  743.                     (dest    DestDir)
  744.                     (all)
  745.                 )
  746.             )
  747.         )
  748.  
  749.         (if (askbool
  750.                 (prompt "Install Utility files?")
  751.                 (help    "These are small files which can be used to explore "
  752.                         "various parts of the OS.\n\n"
  753.                         "\"ListInt\" will dump Intuition structures as "
  754.                         "assembly source code, for use in your own programs.\n\n"
  755.                         "\"ShowCpr\" will dump system Copper lists as "
  756.                         "assembly source code.\n\n"
  757.                         "\"StarBurst\" will toggle the bit in dos.library "
  758.                         "that enables the use of \"*\" for wildcards."
  759.                 )
  760.             )
  761.  
  762.             ; yes, install utilities
  763.             (
  764.                 (askdisk
  765.                     (prompt "\n\nPlease insert\n\nReSource Disk 2\n\nin any drive.")
  766.                     (help    "The Utility files are supplied on ReSource Disk 2, "
  767.                             "in the \"Utilities\" directory.\n\n"
  768.                             @askdisk-help
  769.                     )
  770.                     (dest    "ReSource_2")
  771.                 )
  772.  
  773.                 (set OK 0)
  774.                 (while (= OK 0)
  775.                     (set DestDir
  776.                         (askdir
  777.                             (prompt "Where should the Utility files be installed?")
  778.                             (help    @askdir-help)
  779.                             (default ResMain)
  780.                         )
  781.                     )
  782.  
  783.                     (set space_target DestDir)
  784.                     (GETSPACE)
  785.  
  786.                     (if (< space_avail 26000)
  787.                         (message #ExtrasNoSpace)
  788.                         (set OK 1)
  789.                     )
  790.                 )
  791.  
  792.                 (copyfiles
  793.                     (source "ReSource_2:Utilities")
  794.                     (dest    DestDir)
  795.                     (all)
  796.                 )
  797.             )
  798.         )
  799.  
  800.         (if (askbool
  801.                 (prompt "Install Example files?")
  802.                 (help    "These files are intended to make your use of "
  803.                         "ReSource more productive by giving examples "
  804.                         "of how various features can be used."
  805.                 )
  806.             )
  807.  
  808.             ; yes, install examples
  809.             (
  810.                 (askdisk
  811.                     (prompt "\n\nPlease insert\n\nReSource Disk 2\n\nin any drive.")
  812.                     (help    "The Example files are supplied on ReSource Disk 2, "
  813.                             "in the \"Examples\" directory.\n\n"
  814.                             @askdisk-help
  815.                     )
  816.                     (dest    "ReSource_2")
  817.                 )
  818.  
  819.                 (set OK 0)
  820.                 (while (= OK 0)
  821.                     (set DestDir
  822.                         (askdir
  823.                             (prompt "Where should the Example files be installed?")
  824.                             (help    @askdir-help)
  825.                             (default ResMain)
  826.                         )
  827.                     )
  828.  
  829.                     (set space_target DestDir)
  830.                     (GETSPACE)
  831.  
  832.                     (if (< space_avail 94000)
  833.                         (message #ExtrasNoSpace)
  834.                         (set OK 1)
  835.                     )
  836.                 )
  837.  
  838.                 (copyfiles
  839.                     (source "ReSource_2:Examples")
  840.                     (dest    DestDir)
  841.                     (all)
  842.                 )
  843.             )
  844.         )
  845.  
  846.         (complete 96)
  847.     )
  848.     ; end of Install optional
  849. )
  850.  
  851. (complete 100)
  852.