chmfilewriter does not write TOC
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
Unit chmfilewriter (in directory chm/src) can be used to create chm help files. These files, however, different from other chm files: there is no table-of-contents (TOC).
chmfilewriter does contain code to handle the TOC. But due to incorrect handling of relative file names the TOC actually is not written to the file.
The attached patch fixes this issue.
Steps to reproduce:
- Compile and run the project "chmmaker" in "lazarus/tools/chmmmaker"
- Load the sample file "example.hfp" (in folder "example"). This chm project contains a TOC file which should be included with the chm file.
- Click "Compile and view"
- This creates the "example.chm" help file and loads it into Lazarus' CHM viewer LHelp, or in Windows, double-click on example.chm to open it in the system's help viewer.
- The page "Contents" is missing.
- Apply the patch and repeat
- Page "Contents" now is present.