How to compile HTML files to a CHM file?

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

+6
html delphi chm
source share
3 answers

Perhaps there are libs / components for this. Personnaly, I did it myself, as it’s pretty easy.

Your application should

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

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

+5
source share

The usual way to do this is to use hhc from the Microsoft HTML Help Workshop to create the help project specified in the .hhp file. You can write the .hpp file yourself and all its supporting files. Or, most often, you can use a third-party help creation tool, which is a lot.

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

+7
source share

Free Pascal includes a CHM read / write library (no dependencies), and SVN versions also contain a basic CHM command-line compiler. The license is the same as the rest of the FPC library, LGPL with a static binding exception, so perfect for commercial use.

I think it's pretty easy to port to Delphi.

A somewhat outdated package page for this package

http://wiki.freepascal.org/chm

The package was originally developed for the FPC fpdoc library documentation toolkit. (Documentation is generated at night in some cases, and all FPC / Lazarus servers are Unix)

+3
source share

All Articles