home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / util / rexx / infrarexx / install < prev    next >
Text File  |  1994-10-21  |  16KB  |  747 lines

  1. (message
  2.   "\nWelcome to the\nInfraRexx Installer Utility\n\n"
  3.   "This program will install\n"
  4.   "InfraRexx release 1.4.\n"
  5.   "\n"
  6.   "Please read the AmigaGuide for\n"
  7.   "more information about InfraRexx.\n"
  8.   "\n"
  9.   "InfraRexx and InfraJoy are\n"
  10.   "© 1994 by Leon Woestenberg\n"
  11.   "(Digital Disturbance) and\n"
  12.   "Jeroen Steenblik.\n"
  13. )
  14. (welcome)
  15.  
  16. ;
  17. ; check AmigaOS version
  18. ;
  19. (transcript "Checking AmigaOS version...")
  20. (if
  21.   (<
  22.     (/
  23.       (getversion)
  24.       65536
  25.     )
  26.     37
  27.   )
  28.   (
  29.     (transcript "Aborting because AmigaOS Release 2.04 (or higher) is not available.")
  30.     (abort "\nInfraRexx requires at least AmigaOS Release 2.04 to run.\n\n"
  31.            "Press the Proceed button to abort the installation procedure.")
  32.  
  33.   )
  34.   (transcript "AmigaOS version 2.04 (or higher) found. Proceeding.")
  35. )
  36. (complete 0)
  37.  
  38. ;
  39. ; Ask for the version of the used hardware
  40. ;
  41. (set hardware-choice
  42.   (askchoice
  43.     (prompt "What hardware is used?\n(Use 'Help' if you are unsure)")
  44.     (help "Determining the hardware version:\n"
  45.           "    InfraRexx requires a small hardware extension in order to "
  46.           "operate. Due to the availability of several hardware versions "
  47.           "the software has to be configured to use the correct version.\n"
  48.           "\n"
  49.           "    If you have ordered the hardware directly from the authors, you "
  50.           "can read the version number from the print circuit board. If there's "
  51.           "no version indication, you have an InfraJoy v1 design.\n"
  52.           "\n"
  53.           "    If you built (or later patched) the hardware yourself, check the "
  54.           "building (or patch) documentation to determine the version number.\n"
  55.           "\n"
  56.           "    If you have no hardware yet, you can either order it from the authors "
  57.           "or build it yourself. See the documentation for more information on this. "
  58.           "If you choose to install the software now, please select the latest version number.\n"
  59.           "\n"
  60.           @askchoice-help
  61.     )
  62.     (choices
  63.       "InfraJoy v1"
  64.       "InfraJoy v2"
  65.       "InfraJoy v3"
  66.     )
  67.     (default 2)
  68.   )
  69. )
  70.  
  71. ;
  72. ; Ask where to install the InfraRexx drawer
  73. ;
  74. (set infrarexx-dest
  75.   (tackon
  76.     (askdir
  77.       (prompt "Where should the InfraRexx drawer be installed?")
  78.       (help @askdir-help)
  79.       (default @default-dest)
  80.     )
  81.     "InfraRexx"
  82.   )
  83. )
  84. (set @default-dest infrarexx-dest)
  85. (complete 10)
  86.  
  87. (copyfiles
  88.   (source "InfraRexxEditor")
  89.   (dest infrarexx-dest)
  90.   (infos)
  91. )
  92. (complete 20)
  93.  
  94. (copyfiles
  95.   (source "InfraRexxDaemon")
  96.   (dest infrarexx-dest)
  97.   (infos)
  98. )
  99. (complete 30)
  100.  
  101. ;
  102. ; Set the hardware version tooltypes
  103. ;
  104. (tooltype
  105.   (dest
  106.     (tackon
  107.       infrarexx-dest
  108.       "InfraRexxEditor"
  109.     )
  110.   )
  111.   (settooltype
  112.     "HARDWARE"
  113.     (select
  114.       hardware-choice
  115.       "1"
  116.       "2"
  117.       "3"
  118.     )
  119.   )
  120. )
  121. (tooltype
  122.   (dest
  123.     (tackon
  124.       infrarexx-dest
  125.       "InfraRexxDaemon"
  126.     )
  127.   )
  128.   (settooltype
  129.     "HARDWARE"
  130.     (select
  131.       hardware-choice
  132.       "1"
  133.       "2"
  134.       "3"
  135.     )
  136.   )
  137. )
  138. (complete 35)
  139. ;
  140. ; Check for locale.library
  141. ;
  142. (if
  143.   (>=
  144.     (/
  145.       (getversion "LIBS:locale.library")
  146.       65536
  147.     )
  148.     38
  149.   )
  150.   (
  151.     ;
  152.     ; Guess catalogs to be installed
  153.     ;
  154.     (set catalog-options
  155.       (+
  156.         (if (exists "LOCALE:Catalogs/Dansk") 1)
  157.         (if (exists "LOCALE:Catalogs/Italiano") 2)
  158.         (if (exists "LOCALE:Catalogs/Nederlands") 4)
  159.         0
  160.       )
  161.     )
  162.     ;
  163.     ; Ask for catalogs to be installed
  164.     ;
  165.     (set catalog-options
  166.       (askoptions
  167.         (prompt "Which language catalogs do you want to install?\n"
  168.         (choices
  169.           "Dansk"
  170.           "Italiano"
  171.           "Nederlands"
  172.         )
  173.         (default catalog-options)
  174.         (help
  175.           "Language catalogs:\n"
  176.           "    Starting with Workbench 2.1, Amiga programs can present "
  177.           "themselves in different languages, as long as so-called "
  178.           "catalogs for that language are present. Next to the languages "
  179.           "listed here, there are built-in english texts in the programs.\n"
  180.           "\n"
  181.           @askoptions-help)
  182.         )
  183.       )
  184.     )
  185.     ;
  186.     ; Install the selected catalogs
  187.     ;
  188.     (set current 0)
  189.     (while
  190.       (< current 3) ;latest number indicates #languages
  191.       (
  192.         (if
  193.           (IN catalog-options current)
  194.           (
  195.             (copyfiles
  196.               (prompt "Copying the selected catalogs...\n")
  197.               (source
  198.                 (tackon
  199.                   "Catalogs"
  200.                   (select current
  201.                     "Dansk"
  202.                     "Italiano"
  203.                     "Nederlands"
  204.                   )
  205.                 )
  206.               )
  207.               (pattern
  208.                 "#?.catalog"
  209.               )
  210.               (dest
  211.                 (tackon
  212.                   "LOCALE:Catalogs"
  213.                   (select current
  214.                     "Dansk"
  215.                     "Italiano"
  216.                     "Nederlands"
  217.                   )
  218.                 )
  219.               )
  220.               (help @copyfiles-help)
  221.             )
  222.           )
  223.         )
  224.         (set current (+ current 1))
  225.       )
  226.     )
  227.   )
  228. )
  229. (complete 40)
  230. ;
  231. ; Rename previous codeset directory if present
  232. ;
  233. (if
  234.   (=
  235.     (exists
  236.       (tackon
  237.          infrarexx-dest
  238.          "Codesets"
  239.       )
  240.       (noreq)
  241.     )
  242.     2
  243.   )
  244.   (
  245.     (transcript "Codesets directory found.")
  246.     (rename
  247.       (tackon
  248.         infrarexx-dest
  249.         "Codesets"
  250.       )
  251.       (tackon
  252.         infrarexx-dest
  253.         "Your_Pre_1.4_Codesets"
  254.       )
  255.       (prompt
  256.         "Renaming your old codesets directory to prevent "
  257.         "overwriting your edited codeset files.\n")
  258.       (help
  259.         "Renaming Codesets directory:\n"
  260.         "    The Install Utility tried to install the codeset "
  261.         "directory, but such a directory was already present. "
  262.         "You are now asked to rename the existing directory, so "
  263.         "that the contained files will not be overwritten. "
  264.         "Select either 'Proceed' to rename the existing directory to "
  265.         "'Your_Pre_1.4_Codesets' or 'Skip' to resume without renaming."
  266.       )
  267.       (confirm)
  268.     )
  269.   )
  270. )
  271. (complete 45)
  272. ;
  273. ; Ask for codeset to be used
  274. ;
  275. (set usedcodeset-options
  276.   (select
  277.     (set usedcodeset-choice
  278.       (askchoice
  279.         (prompt "Please select the command codeset that you want to use initially:\n")
  280.         (choices
  281.          ;"Akai"
  282.          ;"Canon"
  283.          ;"Goldstar"
  284.          ;"Hitachi"
  285.          ;"JVC"
  286.          ;"Kenwood"
  287.          ;"NEC"
  288.          ;"Onkyo"
  289.           "Panasonic"
  290.           "Philips"
  291.           "Pioneer"
  292.          ;"Sharp"
  293.           "Sony"
  294.          ;"Teac"
  295.           "Technics"
  296.          ;"Yamaha"
  297.         )
  298.         (default 0)
  299.         (help "Initial codeset selection:\n"
  300.               "    You are asked for a command codeset that will be used if "
  301.               "you start the InfraRexx Daemon immediately after installation. "
  302.               "Of course you can later change this using the argument/tooltype "
  303.               "FROM.\n"
  304.               "\n"
  305.               @askchoice-help
  306.         )
  307.       )
  308.     )
  309.    ;(shiftleft 1 0)  ;Akai
  310.    ;(shiftleft 1 1)  ;Canon
  311.    ;(shiftleft 1 2)  ;Goldstar
  312.    ;(shiftleft 1 3)  ;Hitachi
  313.    ;(shiftleft 1 4)  ;JVC
  314.    ;(shiftleft 1 5)  ;Kenwood
  315.    ;(shiftleft 1 6)  ;NEC
  316.    ;(shiftleft 1 7)  ;Onkyo
  317.     (shiftleft 1 8)  ;Panasonic
  318.     (shiftleft 1 9)  ;Philips
  319.     (shiftleft 1 10) ;Pioneer
  320.    ;(shiftleft 1 11) ;Sharp
  321.     (shiftleft 1 12) ;Sony
  322.    ;(shiftleft 1 13) ;Teac
  323.     (shiftleft 1 14) ;Technics
  324.    ;(shiftleft 1 15) ;Yamaha
  325.   )
  326. )
  327. ;
  328. ; Set FROM tooltype to used codeset
  329. ;
  330. (tooltype
  331.   (dest
  332.     (tackon
  333.       infrarexx-dest
  334.       "InfraRexxDaemon"
  335.     )
  336.   )
  337.   (settooltype
  338.     "FROM"
  339.     (tackon
  340.       infrarexx-dest
  341.       (tackon
  342.         "Codesets"
  343.         (select
  344.           usedcodeset-choice
  345.          ;"Akai"
  346.          ;"Canon"
  347.          ;"Goldstar"
  348.          ;"Hitachi"
  349.          ;"JVC"
  350.          ;"Kenwood"
  351.          ;"NEC"
  352.          ;"Onkyo"
  353.           "Panasonic"
  354.           "Philips"
  355.           "Pioneer"
  356.          ;"Sharp"
  357.           "Sony"
  358.          ;"Teac"
  359.           "Technics"
  360.          ;"Yamaha"
  361.         )
  362.       )
  363.     )
  364.   )
  365. )
  366. (complete 50)
  367. ;
  368. ; Ask for additional codesets to be installed
  369. ;
  370. (set additionalcodeset-options
  371.   (askoptions
  372.     (prompt "Please select additional command codesets that you want to install: (Empty codesets are marked with ¹)\n"
  373.     (choices
  374.        "Akai¹"
  375.        "Canon¹"
  376.        "Goldstar¹"
  377.        "Hitachi¹"
  378.        "JVC¹"
  379.        "Kenwood¹"
  380.        "NEC¹"
  381.        "Onkyo¹"
  382.        "Panasonic"
  383.        "Philips"
  384.        "Pioneer"
  385.        "Sharp¹"
  386.        "Sony"
  387.        "Teac¹"
  388.        "Technics"
  389.        "Yamaha¹"
  390.     )
  391.     (default usedcodeset-options)
  392.     (help
  393.       "Additional codesets selection:\n"
  394.       "    Here you may choose codesets that will be installed into the "
  395.       "codesets directory, either empty codesets that you use as a base "
  396.       "project for learning new codes, or suplemental codesets for "
  397.       "other electronic brands than that of the initial codeset.\n"
  398.       "\n"
  399.       @askoptions-help)
  400.     )
  401.   )
  402. )
  403. ;
  404. ; Merge the used and additonal codesets together
  405. ;
  406. (set codesets-options
  407.   (BITOR
  408.     usedcodeset-options
  409.     additionalcodeset-options
  410.   )
  411. )
  412. ;
  413. ; Install the selected codesets
  414. ;
  415. (set current 0)
  416. (while
  417.   (< current 16) ;latest number indicates #codesets
  418.   (
  419.     (if
  420.       (IN codesets-options current)
  421.       (
  422.         (copyfiles
  423.           (prompt "Copying the selected codesets...\n")
  424.           (source
  425.             (tackon
  426.               "Codesets"
  427.               (select
  428.                 current
  429.                 "Akai"
  430.                 "Canon"
  431.                 "Goldstar"
  432.                 "Hitachi"
  433.                 "JVC"
  434.                 "Kenwood"
  435.                 "NEC"
  436.                 "Onkyo"
  437.                 "Panasonic"
  438.                 "Philips"
  439.                 "Pioneer"
  440.                 "Sharp"
  441.                 "Sony"
  442.                 "Teac"
  443.                 "Technics"
  444.                 "Yamaha"
  445.               )
  446.             )
  447.           )
  448.           (dest
  449.             (tackon infrarexx-dest "Codesets")
  450.           )
  451.           (help @copyfiles-help)
  452.         )
  453.       )
  454.     )
  455.     (set current (+ current 1))
  456.   )
  457. )
  458. (complete 60)
  459. ;
  460. ; Guess documentation to be installed
  461. ;
  462. (set documentation-options
  463.   (if
  464.     (=
  465.       hardware-choice
  466.       2
  467.     )
  468.     3
  469.     31)
  470. )
  471. ;
  472. ; Ask for documentation to be installed
  473. ;
  474. (set documentation-options
  475.   (askoptions
  476.     (prompt "What documentation do you want to install?\n"
  477.     (choices "InfraRexx User Guide"
  478.              "Hardware (Info/Build/Patch) Guide"
  479.              "Hardware Schematic (IFF format)"
  480.              "Hardware PCB Layout (IFF format)"
  481.              "Hardware PCB Layout (Postscript format)"
  482.     )
  483.     (default documentation-options)
  484.     (help "Documentation description:\n"
  485.           "    The Infrarexx guide describes every aspect of this package, "
  486.           "except the hardware construction. It is therefore advisable to "
  487.           "install this guide, unless you suffer from storage capacity "
  488.           "shortage.\n"
  489.           "\n"
  490.           "    The hardware can be ordered from the authors (see the "
  491.           "InfraRexx User Guide), but you can also build it yourself. "
  492.           "For this purpose, we supplied a hardware manual to guide you "
  493.           "through the building process in a comfortable way. For users "
  494.           "that already have the hardware, there are patch instructions "
  495.           "to upgrade it.\n"
  496.           "\n"
  497.           "    Choose the hardware schematic and/or print circuit board "
  498.           "layouts as a source for your hardware. Both are available in "
  499.           "IFF format, common to the Amiga, and the layout is available "
  500.           "in PostScript too, common to high quality laserprinters.\n"
  501.           "\n"
  502.           @askoptions-help)
  503.     )
  504.   )
  505. )
  506. (complete 65)
  507. ;
  508. ; Determine if MultiView exists on this system
  509. ;
  510. (set multiview-exists
  511.   (exists
  512.     "SYS:Utilities/MultiView"
  513.     (noreq)
  514.   )
  515. )
  516. ;
  517. ; Install InfraRexx User Guide if selected
  518. ;
  519. (if
  520.   (IN documentation-options 0)
  521.   (
  522.     (copyfiles
  523.       (prompt "Installing the InfraRexx User Guide...")
  524.       (source "InfraRexx.guide")
  525.       (dest
  526.         (set userguide-dest
  527.           (askdir
  528.             (prompt "Select a place for the InfraRexx User Guide.")
  529.             (default infrarexx-dest)
  530.             (help @askdir-help)
  531.           )
  532.         )
  533.       )
  534.       (infos)
  535.       (help @copyfiles-help)
  536.     )
  537.     (copyfiles
  538.       (prompt "Installing the InfraRexx Order Form...")
  539.       (source "OrderForm")
  540.       (dest userguide-dest)
  541.       (help @copyfiles-help)
  542.     )
  543.     (if
  544.       multiview-exists
  545.       (tooltype
  546.         (dest
  547.           (tackon userguide-dest "InfraRexx.guide")
  548.         )
  549.         (setdefaulttool "MultiView")
  550.       )
  551.     )
  552.   )
  553. )
  554. (complete 75)
  555. ;
  556. ; Install InfraRexx Hardware Guide if selected
  557. ;
  558. (if
  559.   (IN documentation-options 1)
  560.   (
  561.     (copyfiles
  562.       (prompt "Installing the Hardware Building Guide...")
  563.       (source "Hardware/Hardware.guide")
  564.       (dest
  565.         (tackon
  566.           infrarexx-dest
  567.           "Hardware"
  568.         )
  569.       )
  570.       (infos)
  571.       (help @copyfiles-help)
  572.     )
  573.     (if
  574.       multiview-exists
  575.       (tooltype
  576.         (dest
  577.           (tackon userguide-dest "Hardware.guide")
  578.         )
  579.         (setdefaulttool "MultiView")
  580.       )
  581.     )
  582.   )
  583. )
  584. (complete 80)
  585. ;
  586. ; Install InfraRexx Hardware Schematic if selected
  587. ;
  588. (if
  589.   (IN documentation-options 2)
  590.   (
  591.     (copyfiles
  592.       (prompt "Installing the Hardware Schematic...")
  593.       (source "Hardware/Schematic.iff")
  594.       (dest
  595.         (tackon
  596.           infrarexx-dest
  597.           "Hardware"
  598.         )
  599.       )
  600.       (infos)
  601.       (help @copyfiles-help)
  602.     )
  603.     (if
  604.       multiview-exists
  605.       (tooltype
  606.         (dest
  607.           (tackon infrarexx-dest "Hardware/Schematic.iff")
  608.         )
  609.         (setdefaulttool "MultiView")
  610.       )
  611.     )
  612.   )
  613. )
  614. (complete 85)
  615. ;
  616. ; Install InfraRexx Hardware Layouts (IFF) if selected
  617. ;
  618. (if
  619.   (IN documentation-options 3)
  620.   (
  621.     (copyfiles
  622.       (prompt "Installing the Hardware Layouts (IFF)...")
  623.       (source "Hardware")
  624.       (dest
  625.         (tackon
  626.           infrarexx-dest
  627.           "Hardware"
  628.         )
  629.       )
  630.       (choices
  631.         "BothSides.iff"
  632.         "ComponentSide.iff"
  633.         "SolderSide.iff"
  634.       )
  635.       (infos)
  636.       (help @copyfiles-help)
  637.     )
  638.     (if
  639.       multiview-exists
  640.       (
  641.         (tooltype
  642.           (dest
  643.             (tackon infrarexx-dest "Hardware/BothSides.iff")
  644.           )
  645.           (setdefaulttool "MultiView")
  646.         )
  647.         (tooltype
  648.           (dest
  649.             (tackon infrarexx-dest "Hardware/ComponentSide.iff")
  650.           )
  651.           (setdefaulttool "MultiView")
  652.         )
  653.         (tooltype
  654.           (dest
  655.             (tackon infrarexx-dest "Hardware/SolderSide.iff")
  656.           )
  657.           (setdefaulttool "MultiView")
  658.         )
  659.       )
  660.     )
  661.   )
  662. )
  663. (complete 90)
  664. ;
  665. ; Install InfraRexx Hardware Layouts (PostScript) if selected
  666. ;
  667. (if
  668.   (IN documentation-options 4)
  669.   (
  670.     (copyfiles
  671.       (prompt "Installing the Hardware Layouts (PostScript)...")
  672.       (source "Hardware")
  673.       (dest
  674.         (tackon
  675.           infrarexx-dest
  676.           "Hardware"
  677.         )
  678.       )
  679.       (choices
  680.         "ComponentSide.ps"
  681.         "SolderSide.ps"
  682.       )
  683.       (infos)
  684.       (help @copyfiles-help)
  685.     )
  686.   )
  687. )
  688. (complete 95)
  689. ;
  690. ; Ask for examples to be installed
  691. ;
  692. (set examples-options
  693.   (askoptions
  694.     (prompt "Please select any examples you want to install:"
  695.     (choices "Scala Example"
  696.              "Toolmanager Example"
  697.     )
  698.     (default 3)
  699.     (help @askoptions-help)
  700.     )
  701.   )
  702. )
  703. ;
  704. ; Install the selected examples
  705. ;
  706. (set current 0)
  707. (while
  708.   (< current 2) ;latest number indicates #examples
  709.   (
  710.     (if
  711.       (IN examples-options current)
  712.       (
  713.         (copyfiles
  714.           (prompt "Copying the selected examples...\n")
  715.           (source
  716.             "Examples"
  717.           )
  718.           (pattern
  719.             (select
  720.                current
  721.                "ScalaExample#?"
  722.                "ToolManagerExample#?"
  723.             )
  724.           )
  725.           (dest
  726.             (tackon infrarexx-dest "Examples")
  727.           )
  728.           (infos)
  729.           (help @copyfiles-help)
  730.         )
  731.       )
  732.     )
  733.     (set current (+ current 1))
  734.   )
  735. )
  736. (complete 100)
  737.  
  738. (exit "You have just installed release 1.4 of InfraRexx.\n"
  739.       "\n"
  740.       "That wasn't that hard, was it?! :-)\n"
  741.       "\n"
  742.       "InfraRexx and InfraJoy are\n"
  743.       "© 1994 by Leon Woestenberg\n"
  744.       "(Digital Disturbance) and\n"
  745.       "Jeroen Steenblik.\n"
  746. )
  747.