Cross-platform HTML Help module
Posted: Sun Dec 30, 2018 12:51 pm
Here is my take on a cross-platform HTML help file viewer. It's only a viewer module - not to create the help files. There's been some recent discussion on this subject so this is just what works for me. Though most of the code is a few years old, I didn't post before because I assumed (maybe wrongly?) that people would already have a good solution.
The module, called HelpViewX, takes the same approach as the help for the PureBasic IDE on the Mac. I think the PB Help is great on all platforms and I wanted to attempt something similar for my application on the Mac. Also over the last year I've been using it for Linux. I don't use it for Windows as I'm currently happy with .chm and the native PureBasic OpenHelp, but the module does work the same on Windows.
Main code calls the help with OpenHelpX(dirpath) - intentionally quite similar to the native PureBasic so it's easy to switch between platforms. It uses two XML files to show the Contents and Index. The module code is simple and not too big. The XML stuff is virtually lifted from the PureBasic example - nothing fancy.
The zip file contains 'helpviewx.pbi' and a 'helpexample' directory with a small complete help system for test and demonstration. The module code can be compiled on its own, with a requester to select the directory, either helpexample or your own. The example help gives a bit more info about the module.
Should work on Windows, Mac and Linux (gtk2, gtk3 and qt) - runs on my systems but don't blame me if it falls over in a smelly heap or needs tweaking to suit your set-up!
http://www.deeproot.co.uk/downloads/HelpViewX.zip
The module, called HelpViewX, takes the same approach as the help for the PureBasic IDE on the Mac. I think the PB Help is great on all platforms and I wanted to attempt something similar for my application on the Mac. Also over the last year I've been using it for Linux. I don't use it for Windows as I'm currently happy with .chm and the native PureBasic OpenHelp, but the module does work the same on Windows.
Main code calls the help with OpenHelpX(dirpath) - intentionally quite similar to the native PureBasic so it's easy to switch between platforms. It uses two XML files to show the Contents and Index. The module code is simple and not too big. The XML stuff is virtually lifted from the PureBasic example - nothing fancy.
The zip file contains 'helpviewx.pbi' and a 'helpexample' directory with a small complete help system for test and demonstration. The module code can be compiled on its own, with a requester to select the directory, either helpexample or your own. The example help gives a bit more info about the module.
Should work on Windows, Mac and Linux (gtk2, gtk3 and qt) - runs on my systems but don't blame me if it falls over in a smelly heap or needs tweaking to suit your set-up!
http://www.deeproot.co.uk/downloads/HelpViewX.zip