In order to have a complete development environment for my SoC project under Windows, I still had to install and configure BoostBook. Why I want this is beyond the aim of this post, but for the curious ones: my NetBSD setup is severely broken and I want to be able to work on documentation when I will be doing the Win32 part.

I have spent a lot of time to get BoostBook properly configured, although now that I know the appropriate path it is quite simple. Let's see how.

First of all, you need to have xsltproc in Windows. "Easy", I thought; "I can install it through Cygwin". It wasn't that nice when I started to see bash crashing during installation, probably due to some Vista-related issue. I discarded Cygwin and soon after discovered some prebuilt, standalone binaries that made the task a lot easier.

So, the required steps are:
  1. Get the iconv, zlib, libxml2 and libxslt binary packages made by Igor Zlatkovic.
  2. Unpack all these packages in the same directory so that you get unique bin, include and lib directories within the hierarchy. I used C:UsersjmmvDocumentsboostxml as the root for all files.
  3. Go to the bin directory and launch xsltproc.exe. It should just work.
  4. Download Docbook XML 4.2 and unpack it; for example, in the same directory as above. In my case I used C:UsersjmmvDocumentsboostxmldocbook-xml.
  5. Download the latest Docbook XSL version and unpack it; you can use the same root directory used previously. To make things easier, rename the directory created during the extraction to docbook-xsl (bypassing the version name). Here I have: C:UsersjmmvDocumentsboostxmldocbook-xsl.
  6. Add the following to your user-config.jam file, which probably lives in your home directory (%HOMEDRIVE%%HOMEPATH%). You must already have it, or otherwise you could not be building Boost.

    using xsltproc : "C:/Users/jmmv/Documents/boost/xml/bin/xsltproc.exe" ;

    using boostbook
    : "C:/Users/jmmv/Documents/boost/xml/docbook-xsl"
    : "C:/Users/jmmv/Documents/boost/xml/docbook-xml"
    ;

    Adjust the paths as appropriate.
As you can see, it is quite simple. Just keep one thing in mind: if you try to build some documents and the process breaks due to misconfiguration, be sure to delete any bin and bin.v2 directories generated by the build before you try again. Otherwise your configuration changes will not take any effect. This is what made me lose a lot of time because, although I had already fixed the configuration problems, they were not being honored!

For more information, check out the official documentation about manual setup.

Comments from the original Blogger-hosted post: