Question

How in my code (Delphi) to make CHM files from a bunch of HTML (with linked image files)? Details needed, thanks!

Was it helpful?

Solution

Maybe there are libs/components to do that. Personnaly, I made it myself as it is quite easy.

Your application should

  • list all files to include
  • Create HHC + HHP + HHK files content-
  • call command line hhc.exe with HHP parameter

As an example, have a look to DelphiCodeToDoc CHM generator.
Read uDocGenCHM_Tools.pas and uDocGeneratorChm.pas in svn repository of my project (too large to post here!). https://dephicodetodoc.svn.sourceforge.net/svnroot/dephicodetodoc/trunk/DelphiCodeToDoc/Source/Generator/Chm/

OTHER TIPS

The normal way to do this is to use hhc from Microsoft's HTML Help Workshop to build a help project, specified in a .hhp file. You can write the .hpp file yourself, and all its auxiliary files. Or, more commonly, you can use a 3rd party help authoring tool of which there are many.

I don't see where Delphi comes into the building of the .chm file, but if I've missed something then please update your question to add more details.

Free Pascal includes a CHM read/write library (without dependancies), and SVN versions also contain a basic commandline CHM compiler. The license is the same as the rest of FPC's Library, LGPL with static linking exception, so fine for commercial use.

I think it should be fairly easy to port to Delphi.

The somewhat outdate package page for this package is

http://wiki.freepascal.org/chm

The package was originally developed for FPC's library documentation tool fpdoc. (Documentation is generated nightly in some cases, and all FPC/Lazarus' servers are Unix)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top