You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/HtmlHelp.asciidoc
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,19 @@ _HTML Help_ is a file format for documentation. The final documentation can be a
9
9
10
10
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.
11
11
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`.
13
13
14
-
##Prerequisite: HTML Help Workshop
14
+
##Generating HTML Help files with PasDoc
15
15
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.
17
25
18
26
Best options to get _HTML Help Workshop_ now:
19
27
@@ -28,16 +36,23 @@ Best options to get _HTML Help Workshop_ now:
28
36
29
37
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.
30
38
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)
32
48
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:
35
50
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
+
```
39
54
40
-
That's it! You have`docs.chm` file, that can be viewed with _HTML Help_ viewer.
0 commit comments