installing-via-homebrew.dita 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <task id="installing-via-homebrew">
  5. <title>Installing on macOS via Homebrew</title>
  6. <titlealts>
  7. <navtitle>Installing via Homebrew</navtitle>
  8. </titlealts>
  9. <shortdesc>An alternative installation method can be used to install DITA-OT on macOS via
  10. <xref keyref="homebrew"/>, the platform’s most popular open-source package manager.</shortdesc>
  11. <prolog>
  12. <metadata>
  13. <keywords>
  14. <indexterm>macOS</indexterm>
  15. <indexterm><cmdname>dita</cmdname> command
  16. <indexterm>Homebrew</indexterm></indexterm>
  17. <indexterm>installing
  18. <indexterm>Homebrew</indexterm></indexterm>
  19. </keywords>
  20. </metadata>
  21. </prolog>
  22. <taskbody>
  23. <prereq>
  24. <p>The steps below assume you have already installed
  25. <xref keyref="homebrew"/> according to the instructions at
  26. <xref keyref="homebrew">brew.sh</xref>.</p>
  27. <note type="tip">Verify that your <varname>PATH</varname> environment begins with
  28. <filepath>/usr/local/bin</filepath> to ensure that Homebrew-installed software takes precedence over any
  29. programs of the same name elsewhere on the system.</note>
  30. </prereq>
  31. <steps>
  32. <step>
  33. <cmd>Update Homebrew to make sure the latest package formulas are available on your system:</cmd>
  34. <stepxmp><codeblock>$ <cmdname>brew update</cmdname>
  35. Already up-to-date.</codeblock></stepxmp>
  36. <stepresult>
  37. <p>Homebrew responds with a list of any new or updated formulæ.</p></stepresult>
  38. </step>
  39. <step importance="optional">
  40. <cmd>Check the version of DITA-OT that is available from Homebrew:</cmd>
  41. <stepxmp><codeblock>$ <cmdname>brew info dita-ot</cmdname>
  42. <systemoutput>dita-ot: stable <keyword keyref="maintenance-version"/>
  43. DITA Open Toolkit is an implementation of the OASIS DITA specification
  44. https://www.dita-ot.org/
  45. /usr/local/Cellar/dita-ot/<keyword keyref="maintenance-version"/> (<varname>number of files</varname>, <varname>package size</varname>) *
  46. Built from source on <varname>YYYY-MM-DD</varname> at <varname>hh:mm:ss</varname>
  47. From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/dita-ot.rb
  48. ==> Requirements
  49. Required: java >= 1.8 ✔</systemoutput>
  50. </codeblock></stepxmp>
  51. <stepresult>
  52. <p>The version of the DITA-OT formula is shown, along with basic information on the package.</p></stepresult>
  53. </step>
  54. <step>
  55. <cmd>Install the <codeph>dita-ot</codeph> package:</cmd>
  56. <stepxmp><codeblock>$ <cmdname>brew install dita-ot</cmdname>
  57. <systemoutput>Downloading…</systemoutput></codeblock></stepxmp>
  58. <stepresult>
  59. <p>Homebrew will automatically download the latest version of the toolkit, install it in a subfolder of the
  60. local package Cellar and symlink the <cmdname>dita</cmdname> command to
  61. <filepath>/usr/local/bin/dita</filepath>.</p></stepresult>
  62. </step>
  63. <step importance="optional">
  64. <cmd>Verify the installation:</cmd>
  65. <stepxmp><codeblock>$ <cmdname>which dita</cmdname>
  66. <systemoutput>/usr/local/bin/dita</systemoutput></codeblock></stepxmp>
  67. <stepresult>
  68. <p>The response confirms that the system will use the Homebrew-installed version of DITA-OT.</p></stepresult>
  69. </step>
  70. <step importance="optional">
  71. <cmd>Check the DITA-OT version number:</cmd>
  72. <stepxmp><codeblock>$ <cmdname>dita</cmdname> <parmname>--version</parmname>
  73. <systemoutput>DITA-OT version <keyword keyref="maintenance-version"/></systemoutput></codeblock></stepxmp>
  74. <stepresult>The DITA-OT version number appears on the console.</stepresult>
  75. </step>
  76. </steps>
  77. <result>
  78. <p>You can now run the <cmdname>dita</cmdname> command to transform DITA content.</p></result>
  79. </taskbody>
  80. </task>