I create Lazarus chm files by the script "build_chm" in folder "docs/html" - I'm on Windows, therefore, I use "build_chm.bat". These things must be done frist for this to work:
- Load "build_lcl_docs.lpi" into Lazarus and compile it.
- Modify the line "PATH=..." of the script to point the PATH variable to the folder which contains fpdoc.exe (this should be the same as fpc.exe).
- Add "--fpcdocs ../chm" to the "build_lcl_docs" command line so that the created chm files are copied to the right folder automatically. Otherwise the chm files (and xct crossreference files) will appear in the folder of the script, i.e. in "docs/html" and must be copied manually.
This is the script, which is working for me:
PATH=C:\lazarus-trunk_fpc304\fpc\3.0.4\bin\i386-win32\;%PATH%
build_lcl_docs.exe --outfmt chm --fpcdocs ../chm
Note that the script aborts when the xml files contain an error. The xml files before r60922, for example, contained an xml error in lazunicode.xml (line 245, the "<>" in "Length(fCurrent)<>aCount." had to be replaced by "<>")
Note also that build_lcl_docs does not add "private" docs to the chm. (There is an option for fpdoc to include the "private" section, but I did not find a way how to invoke this in build_lcl).
Building the Lazarus help takes a few minutes, therefore, be patient.