14

I use Zeal to lookup API documentation on Linux. It requires files to be in the Apple docset format.

I have C++ code for which I can generate documentation using Doxygen. Doxygen can build a docset, but it requires the docsetutil program, which is not available on Linux.

Is there any other method to create a docset of a C++ codebase on Linux?

Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
  • Hi, It's good that you asked this question, it looks like [docsetutils](https://github.com/SwiftDocOrg/DocSetUtil) is back as a swift tool ! – Prateek Khandelwal Oct 26 '20 at 07:19

1 Answers1

7

"No need for docsetutil if you're generating a Dash-only docset," suggests the developer of Dash. Likewise according to the Dash documentation, you need the following entries in the Doxygen config file to generate the docset (the last 3 are optional):

GENERATE_DOCSET   = YES
DISABLE_INDEX     = YES 
SEARCHENGINE      = NO
GENERATE_TREEVIEW = NO
Cahit
  • 2,484
  • 19
  • 23
  • I'm a bit embarrassed I didn't find this myself! Thanks for doing the legwork and pointing this out - solves my problem in a different (and simpler!) way than I'd anticipated. – cincodenada Jan 29 '16 at 20:37
  • 3
    In case others are wondering: You need to run doxygen with the correct config, run make inside the html folder. Make will fail but will do enough work. The docset are located as a subfolder in the html folder named something like *.docset – olejorgenb Mar 09 '16 at 09:52
  • 2
    I've tried this to generate a docset for SDL 2.0.4, first running doxygen and make using MSYS on Windows, then redoing it on Linux Mint. Both times, as expected, the makefile failed claiming the docsetutil is not found. But both times, the generate files were *NOT* sufficient - with the docset folder where Zeal looks for them, no sign of the docs in Zeal. I tried faking a meta.json file since that wasn't generated - didn't help, plus that and some icons are also missing from the mono docset which works. Next suspect - docSet.dsidx - every docset I have has that, but it's not generated for SDL. –  Sep 17 '16 at 00:33
  • You can generate a valid docset with [dashing](https://github.com/technosophos/dashing). I just tried for SDL2-2.0.4, it won't label stuff correctly, but at least you get a docset that shows up in zeal and a method to generate docsets which you can tweak and play around with. – Andreas Raster Oct 05 '16 at 16:56
  • 1
    I ended up creating the _docSet.dsidx_ manually with the help of a bit of Bash and SQL (it's just an SQLite database). – Ignitor Jun 19 '17 at 23:09
  • @Ignitor Any chances you can share how you created the docSet.dsidx? – machinekoder Feb 26 '20 at 10:44
  • As I wrote: I created it manually. It is just an SQLite database. Have a look at a _docSet.dsidx_ of any other documentation using your favorite SQLite client (I use [SQLite Studio](https://sqlitestudio.pl)). I used a Bash script to gather the data. Unfortunately, I don't have that script anymore. :-/ – Ignitor Mar 01 '20 at 00:10