Skip to content

Commit ba50733

Browse files
committed
Document chmcmd
1 parent 46f27b3 commit ba50733

1 file changed

Lines changed: 25 additions & 10 deletions

File tree

src/HtmlHelp.asciidoc

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@ _HTML Help_ is a file format for documentation. The final documentation can be a
99

1010
As the name suggests, the format is based on HTML. Internally, a `.chm` file is just a collection of HTML files, with some extra information. See https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help[Wikipedia] and http://msdn.microsoft.com/en-us/library/windows/desktop/ms524413(v=vs.85).aspx[Microsoft documentation] for more information.
1111

12-
link:index[PasDoc] can generate all the files necessary to create the _HTML Help_ documentation. We do not produce a ready `.chm` file -- but we generate all the prerequisites necessary, so that you can create the final file using the _Microsoft HTML Workshop_ (free download).
12+
link:index[PasDoc] can generate all the files necessary to create the _HTML Help_ documentation. We do not produce a ready `.chm` file -- but we generate all the prerequisites necessary. After generating the files, you can create the final CHM file using tools like `hhc` or `chmcmd`.
1313

14-
## Prerequisite: HTML Help Workshop
14+
## Generating HTML Help files with PasDoc
1515

16-
You need to get https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx[HTML Help Workshop]. Unfortunately, the download links (on this Microsoft page) are broken, which has been https://learn.microsoft.com/en-us/answers/questions/265752/htmlhelp-workshop-download-for-chm-compiler-instalp[reported] but seems unlikely to be fixed.
16+
First, generate documentation using pasdoc with `--format=htmlhelp` command-line option. In addition to normal HTML files, we will output files `docs.hhc`, `docs.hhk` and `docs.hhp`. You can change the names of these files to something else with link:NameOption[--name option].
17+
18+
Once this is done, you can create the final `.chm` file using one of the tools described below.
19+
20+
## Creating the final .chm file
21+
22+
### Microsoft HTML Help Workshop (Windows only, proprietary)
23+
24+
One option to create the final `.chm` file is to use https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx[HTML Help Workshop]. Unfortunately, the download links (on this Microsoft page) are broken, which has been https://learn.microsoft.com/en-us/answers/questions/265752/htmlhelp-workshop-download-for-chm-compiler-instalp[reported] but seems unlikely to be fixed.
1725

1826
Best options to get _HTML Help Workshop_ now:
1927

@@ -28,16 +36,23 @@ Best options to get _HTML Help Workshop_ now:
2836
2937
In both cases, after the installation the tools are in `C:\Program Files (x86)\HTML Help Workshop` directory. You can add it to your `$PATH` to easily execute `hhc` from the command line.
3038

31-
## Usage of HTML Help output from PasDoc
39+
To make `docs.chm` file:
40+
41+
* Interactively: run the `hhw` program from the _HTML Help Workshop_, open generated `docs.hhp` file, and run _"Compile HTML file"_ from toolbar.
42+
43+
* Or in batch mode (command line): run `hhc docs.hhp`.
44+
45+
That's it! You have `docs.chm` file.
46+
47+
### chmcmd (cross-platform, open-source)
3248

33-
1. Generate documentation with pasdoc with `--format=htmlhelp`. In addition to normal HTML files, we
34-
will also output files `docs.hhc`, `docs.hhk` and `docs.hhp`. You can change the names of these files to something else with link:NameOption[--name option].
49+
Another option is to use cross-platform open-source tool `chmcmd` developed and distributed along with https://www.freepascal.org/[FPC]. Call it like this:
3550

36-
2. Make `docs.chm` file:
37-
** Interactively: run the `hhw` program from the _HTML Help Workshop_, open generated `docs.hhp` file, and run _"Compile HTML file"_ from toolbar.
38-
** Or in batch mode (command line): run `hhc docs.hhp`.
51+
```
52+
chmcmd --no-html-scan docs.hhp
53+
```
3954

40-
That's it! You have `docs.chm` file, that can be viewed with _HTML Help_ viewer.
55+
This will again create `docs.chm` file.
4156

4257
## Custom help contents
4358

0 commit comments

Comments
 (0)