How WinHelp files work

17 points by Quin 13 hours ago on lobsters | 7 comments

david_chisnall | 11 hours ago

Huh, I always assumed they were RTF files with a little bit of additional structure. I had no idea they were so complex.

calvin | 5 hours ago

They're built from RTF files with Help Workshop; most of the authoring is basically done in Word abusing various features like page breaks and footnotes for things that are not in the pages of the help file itself, and the Help project file for metadata like a TOC and index.

ssokolow | 10 hours ago

I'm not familiar enough with them to say how much, but the description makes me think that they're at least taking inspiration from the MS-CFB container format that Microsoft Word .doc files are built on.

...Microsoft does have a history of liking "filesystem in a file" formats and, to be fair, one could argue that the current fashion of using Zip or SQLite as standard containers for structured data is also close enough to count. (OpenDocument, OOXML, EPUB, etc. etc. etc.)

gerikson | 10 hours ago

Isn't the quintessential "filesystem in a file" macOS installer packages?

ssokolow | 10 hours ago

Isn't the quintessential "filesystem in a file" macOS installer packages?

Do you mean .dmg files (which are literally disk images in every sense of the word in more or less the same way that .iso files are, except with support for in-built compression and so on) or .pkg files (which are the ones properly known as "macOS installer packages")?

Because, as I understand it, .pkg files are more like .rpm or .deb files, but based on Xar archives instead of cpio or ar.

...and I'd probably point to .iso files as much more "the quintessential 'filesystem in a file'" purely on OS market share alone.

ssokolow | 11 hours ago

Nice!

I'll have to try compiling it to WebAssembly and hooking it up alongside CHMate the next time I'm working on my experiments to build a more workflow-appropriate frontend for Recoll to see how close I can get to Zeal for ancient retro-hobby reference materials.

The Microsoft Windows Help files (both old style and html style) for PuTTY are built by a bespoke documentation generator called Halibut (which doesn’t depend on Microsoft tooling). I had a brief look at the code but it doesn’t have much commentary on the output format (basically just a complaint that Simon hasn’t worked out how to use a character set other than CP1252) so it isn’t easy to reuse with a different document input format.