Search code examples
htmldelphichmhelpfile

How to compile HTML files into CHM file?


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


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/