2 Copyright 2002,2004,2006 Joel de Guzman, Eric Niebler
3 Copyright 2010-2011 Daniel James
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
10 [chapter Installation and configuration
12 [compatibility-mode 1.5]
13 [id quickbook.install]
14 [source-mode teletype]
17 This section provides some guidelines on how to install and configure
18 BoostBook and Quickbook under several operating systems. Before installing
19 you'll need a local copy of boost, and to install the version of `bjam`
20 which comes with it (or a later version).
22 [/ I don't think this is needed any more]
24 Before continuing, it is very important that you keep this in mind: if you
25 try to build some documents and the process breaks due to misconfiguration,
26 be absolutely sure to delete any `bin` and `bin.v2` directories generated
27 by the build before trying again. Otherwise your configuration fixes will
31 [section:macosx Mac OS X]
33 The simplest way to install on OS X is to use macports.
34 If you don't want to use macports and are using Snow Leopard or later,
35 there are instructions [link quickbook.install.macosx.native later].
36 Earlier versions of OS X need to use something like macports to install
37 `xsltproc` because the version they come with is very old, and doesn't have
38 good enough XSL support for boostbook's stylesheets.
40 [section:macports Mac OS X, using macports]
42 First install the `libxslt`, `docbook-xsl` and `docbook-xml-4.2`
45 sudo port install libxslt docbook-xsl docbook-xml-4.2
47 Next, we need to configure Boost Build to compile BoostBook files. Add the
48 following to your `user-config.jam` file, which should be in your home
49 directory. If you don't have one, create a file containing this text. For more
50 information on setting up `user-config.jam`, see the
51 [@http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html Boost
55 : /opt/local/bin/xsltproc
59 : /opt/local/share/xsl/docbook-xsl/
60 : /opt/local/share/xml/docbook/4.2
63 The above steps are enough to get a functional BoostBook setup. Quickbook
64 will be automatically built when needed. If you want to avoid these
67 # Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
69 # Build the utility by issuing `bjam`.
71 # Copy the resulting `quickbook` binary (located at
72 `BOOST_ROOT/dist/bin`) to a safe place. The traditional location is
75 # Add the following to your `user-config.jam` file, using the full path of the
79 : /usr/local/bin/quickbook
83 If you need to build documentation that uses Doxygen, you will need to install it as well:
85 sudo port install doxygen
87 And then add to your `user-config.jam`:
91 Alternatively, you can install from the official doxygen `dmg`.
92 This is described at [link osx-prebuilt-doxygen the end of the next section].
94 [endsect] [/ macports]
96 [section:native Mac OS X, Snow Leopard (or later)]
98 [:['Section contributed by Julio M. Merino Vidal]]
100 The text below assumes you want to install all the necessary utilities in a
101 system-wide location, allowing any user in the machine to have access to
102 them. Therefore, all files will be put in the `/usr/local` hierarchy. If
103 you do not want this, you can choose any other prefix such as
104 `~/Applications` for a single-user installation.
106 Snow Leopard comes with `xsltproc` and all related libraries preinstalled, so
107 you do not need to take any extra steps to set them up. It is probable
108 that future versions will include them too, but these instructions may not
109 apply to older versions.
113 # Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML
114 4.2] and unpack it inside `/usr/local/share/xml/docbook/4.2`.
116 # Download the latest
117 [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608
118 Docbook XSL] version and unpack it. Be careful that you download the correct
119 file, sometimes the 'looking for the latest version' link often links to
120 another file. The name should be of the form
121 '''<code>docbook-xsl-1.<emphasis>nn</emphasis>.<emphasis>n</emphasis>.tar.bz2</code>''',
122 with no suffix such as `-ns.tar.bz2` or `-doc.tar.bz2`.
124 `/usr/local/share/xsl/docbook`, thus effectively removing the version
125 number from the directory name (for simplicity).
127 # Add the following to your `user-config.jam` file, which should live in
128 your home directory (`/Users/<your_username>`). You must already have it
129 somewhere or otherwise you could not be building Boost (i.e. missing
130 tools configuration).
135 : "/usr/local/share/xsl/docbook"
136 : "/usr/local/share/xml/docbook/4.2"
140 The above steps are enough to get a functional BoostBook setup. Quickbook
141 will be automatically built when needed. If you want to avoid these
142 rebuilds and install a system-wide Quickbook instead:
144 # Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
146 # Build the utility by issuing `bjam`.
148 # Copy the resulting `quickbook` binary (located at
149 `BOOST_ROOT/dist/bin`) to a safe place. Following our previous
150 example, you can install it into: `/usr/local/bin`.
152 # Add the following to your `user-config.jam` file:
155 : "/usr/local/bin/quickbook" ;
159 [# osx-prebuilt-doxygen]
160 Additionally, if you need to build documentation that uses
161 [@http://www.doxygen.org Doxygen], you will need to install it too:
163 # Go to the [@http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc
164 downloads section] and get the disk image (`dmg` file) for Mac OS X.
166 # Open the disk image and drag the Doxygen application to your
167 `Applications` folder to install it.
169 # Add the following to your `user-config.jam` file:
172 : /Applications/Doxygen.app/Contents/Resources/doxygen
176 [/ Removed this, since there are macports based instructions earlier.
177 Instructions for pkgsrc welcome]
179 Alternatively, you may want to install all the prerequistes through a
180 package system to avoid manual management of the installations. In that
181 case, check out [@http://www.pkgsrc.org pkgsrc].
188 [section:windows Windows 2000, XP, 2003, Vista, 7]
190 [:['Section contributed by Julio M. Merino Vidal]]
192 The following instructions apply to any Windows system based on Windows
193 2000, including Windows XP, Windows 2003 Server, Windows Vista, and Windows 7. The
194 paths shown below are taken from a Windows Vista machine; you will need to
195 adjust them to match your system in case you are running an older version.
197 # First of all you need to have a copy of `xsltproc` for Windows. There
198 are many ways to get this tool, but to keep things simple, use the
199 [@http://www.zlatkovic.com/pub/libxml/ binary packages] made by Igor
200 Zlatkovic. At the very least, you need to download the following
201 packages: `iconv`, `zlib`, `libxml2` and `libxslt`.
203 # Unpack all these packages in the same directory so that you get unique
204 `bin`, `include` and `lib` directories within the hierarchy. These
205 instructions use `C:\Users\example\Documents\boost\xml` as the root for
208 # From the command line, go to the `bin` directory and launch
209 `xsltproc.exe` to ensure it works. You should get usage information on
212 # Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML
213 4.2] and unpack it in the same directory used above. That is:
214 `C:\Users\example\Documents\boost\xml\docbook-xml`.
216 # Download the latest
217 [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608
218 Docbook XSL] version and unpack it, again in the same directory
219 used before. Be careful that you download the correct
220 file, sometimes the 'looking for the latest version' link often links to
221 another file. The name should be of the form
222 '''<code>docbook-xsl-1.<emphasis>nn</emphasis>.<emphasis>n</emphasis>.tar.bz2</code>''',
223 with no suffix such as `-ns.tar.bz2` or `-doc.tar.bz2`.
224 To make things easier, rename the directory created
225 during the extraction to `docbook-xsl` (bypassing the version name):
226 `C:\Users\example\Documents\boost\xml\docbook-xsl`.
228 # Add the following to your `user-config.jam` file, which should live in
229 your home directory (`%HOMEDRIVE%%HOMEPATH%`). You must already have it
230 somewhere or otherwise you could not be building Boost (i.e. missing
231 tools configuration).
234 : "C:/Users/example/Documents/boost/xml/bin/xsltproc.exe"
238 : "C:/Users/example/Documents/boost/xml/docbook-xsl"
239 : "C:/Users/example/Documents/boost/xml/docbook-xml"
243 The above steps are enough to get a functional BoostBook setup. Quickbook
244 will be automatically built when needed. If you want to avoid these
247 # Go to Quickbook's source directory (`BOOST_ROOT\tools\quickbook`).
249 # Build the utility by issuing `bjam`.
251 # Copy the resulting `quickbook.exe` binary (located at
252 `BOOST_ROOT\dist\bin`) to a safe place. Following our previous
253 example, you can install it into:
254 `C:\Users\example\Documents\boost\xml\bin`.
256 # Add the following to your `user-config.jam` file:
259 : "C:/Users/example/Documents/boost/xml/bin/quickbook.exe"
265 [section:linux Debian, Ubuntu]
267 The following instructions apply to Debian and its derivatives. They are based
268 on a Ubuntu Edgy install but should work on other Debian based systems. They
269 assume you've already installed an appropriate version of `bjam` for your
272 First install the `xsltproc`, `docbook-xsl` and `docbook-xml` packages.
273 For example, using `apt-get`:
275 sudo apt-get install xsltproc docbook-xsl docbook-xml
277 If you're planning on building boost's documentation, you'll also need to
278 install the `doxygen` package as well.
280 Next, we need to configure Boost Build to compile BoostBook files. Add the
281 following to your `user-config.jam` file, which should be in your home
282 directory. If you don't have one, create a file containing this text. For more
283 information on setting up `user-config.jam`, see the
284 [@http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html Boost
285 Build documentation].
290 : /usr/share/xml/docbook/stylesheet/nwalsh
291 : /usr/share/xml/docbook/schema/dtd/4.2
294 # Remove this line if you're not using doxygen
297 The above steps are enough to get a functional BoostBook setup. Quickbook
298 will be automatically built when needed. If you want to avoid these
301 # Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
303 # Build the utility by issuing `bjam`.
305 # Copy the resulting `quickbook` binary (located at
306 `BOOST_ROOT/dist/bin`) to a safe place. The traditional location is
309 # Add the following to your `user-config.jam` file, using the full path of the
310 quickbook executable:
313 : /usr/local/bin/quickbook