Sign in Join
Wiki copytemporary

Installing Help in the IDE: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11**Installing Help in the IDE** for the Lazarus Runtime Library ([[RTL]]), Free Pascal, Free Component Library ([[FCL]]) and the Lazarus Component Library ([[LCL]]) and a number of associated things.
22
33The installer or package may have already set up Help (or lhelp), depending on how you installed Lazarus. If it is not operational or it is out of date, this page will help you.
44
55## Changing the key for context sensitive help
66
7-Some platforms do not pass the <span class="kbd">F1</span> key to applications. The key can be changed in the menu under *Tools \> Options \> Editor \> Key Mappings \> Help Menu Commands \> Context sensitive help*.
7+Some platforms do not pass the `F1` key to applications. The key can be changed in the menu under *Tools \> Options \> Editor \> Key Mappings \> Help Menu Commands \> Context sensitive help*.
88
99## Installing CHM help (Lazarus 1.0 and later)
1010
1111Note: these instructions use Windows path notation, but they also apply to other systems with minor changes.
1212
13-- (This step is almost certainly unnecessary, jump to the next one) Go to `$(LazarusDir)\components\chmhelp\lhelp` and see if `lhelp` (Linux, FreeBSD, macOS) or `lhelp.exe` (Windows) exists. Compile \$(LazarusDir)\components\chmhelp\lhelp\lhelp.lpi if it does not. Although newer versions of Lazarus will compile lhelp if needed the first time you press <span class="kbd">F1</span>, compiling the lpi yourself won't hurt.
13+- (This step is almost certainly unnecessary, jump to the next one) Go to `$(LazarusDir)\components\chmhelp\lhelp` and see if `lhelp` (Linux, FreeBSD, macOS) or `lhelp.exe` (Windows) exists. Compile \$(LazarusDir)\components\chmhelp\lhelp\lhelp.lpi if it does not. Although newer versions of Lazarus will compile lhelp if needed the first time you press `F1`, compiling the lpi yourself won't hurt.
1414
1515- Make sure the package **chmhelppkg** is installed; it should be installed automatically in newer installers. See the menu Package-\>Install Packages. It should appear in the left column and is called something like **ChmHelpPkg 0.2** (version number may differ). If not, install it and rebuild Lazarus when prompted.
1616
1717- Go to `$(LazarusDir)\docs\chm` and look for `lcl.chm` and `fcl.chm`. If they don't exist, go to <http://sourceforge.net/projects/lazarus/files/Lazarus%20Documentation/> and download the newest archive with the CHM files and unpack the files into that directory.
1818
1919- Additional Troubleshooting step (eg useful if installing from Subversion): go to Tools \> Options \> "Help Options" and select the "CHM Help Viewer". Check its properties:
2020 - "HelpExe" should be empty in order to use the lhelp you just built (ie `$(LazarusDir)\components\chmhelp\lhelp\lhelp.exe`).
2121 - "HelpFilesPath" should be where you just put the CHM files. Leave it empty (recommended) to use the default, which includes `$(LazarusDir)\docs\html and $(LazarusDir)\docs\chm`.
2222 - If you use several versions of Lazarus, or like to build new ones from time to time, you can put your help files in a different directory, probably above \$LazarusDir, and point HelpFilesPath to it.
2323- If you are on **Windows** you can also use the Windows-internal help viewer:
2424 - "HelpExe" should be `hh.exe`
2525 - "HelpExeParams" must be `"%s::%s"` (WITH QUOTES, note the double colon).
2626
27-Now context-sensitive help using <span class="kbd">F1</span> should work.
27+Now context-sensitive help using `F1` should work.
2828
2929### Notes
3030
3131- If lhelp does not appear but there are no error messages, check `$XDG_CONFIG_DIR/lhelp/lhelp-lazhelp.conf` and make sure the Width and Height are not set to 0.
3232
3333- On some systems, lhelp has problems the second and subsequent time its activated. An easy solution is to close it after each use, it will startup very quickly the next time you need it.
3434
3535- macOS: At least in Lazarus 2.0.6, lhelp opens with an error (ignore by selecting OK) and blank contents. Use the Folder Open icon to navigate to the directory where you have put the help files and select the `toc.chm` file. The issue is resolved in Lazarus 2.0.10.
3636
3737## Installing CHM help (earlier than Lazarus 1.0)
3838
3939Pre-1.0 versions of Lazarus search for CHM files only in `$(LazarusDir)\docs\html` and not in `$(LazarusDir)\docs\chm`. Therefore, please follow the instructions above with these differences:
4040
4141- When downloading/extracting the CHM files, extract into `$(LazarusDir)\docs\html\` and not `$(LazarusDir)\docs\chm\`.
4242- Note that an empty value (as recommended) in Environment Options \> Help Options \> CHM Help Viewer \> HelpFilesPath will only check `$(LazarusDir)/docs/html` and not `$(LazarusDir)/docs/chm`.
4343
4444## Installing INF help in the IDE
4545
4646If you have help files in the INF format, please see ["DocView IDE Integration"](http://fpgui.sourceforge.net/docview_ide_integration.shtml) for details on how to install such help in the Lazarus IDE. This option will use the fpGUI DocView help viewer to display and search the INF help files.
4747
4848### Where to find INF help files?
4949
5050This [SourceForge](http://sourceforge.net/projects/fpgui/files/fpGUI/Documentation/) page contains links to download ZIP archives of the FPC Language Reference, RTL, FCL, LCL and fpGUI help in the INF format.
5151
5252### Why choose INF help?
5353
5454- INF help files are much smaller than other help formats, yet contain all of the same information. eg: LCL in HTML format is 187MB, LCL.CHM is 11.6MB, and LCL.INF is only 3.9MB. These sizes are all uncompressed sizes on your hard drive. So if you are limited to internet bandwidth, this is a good option to choose.
5555- fpGUI DocView in an optimised help viewer with many advanced features. For example:
5656 - Loading help files (even multiple help files) are extremely fast
5757 - You can do full text searches across all help files.
5858 - Advanced search terms are possible.
5959 - Search results are based on an advanced algorithm that takes alternative spelling in consideration, and uses a ranking system to give you the best possible results.
6060 - Help files can be annotated (inline end-user comments can be added)
6161 - Help topics can be bookmarked, so they can easily be found again.
6262 - If you are visually impaired (or just prefer a specific font family), you can customise the fonts and font sizes to use when displaying help text.
6363
6464### Why avoid INF help?
6565
6666- The INF files available in the above link are from 2010 - they are very out of date, and the INF format is not being regularly maintained for FPC/Lazarus help.
6767
6868## Installing Kylix Help in the Lazarus IDE
6969
7070For users who have a legal copy of Kylix, it is possible to add Kylix 3 context-sensitive help files to Lazarus IDE running on Linux x86. The benefit from those help files is that they are very detailed, and also contain the Object Pascal Language Reference help - most of which is applicable to FPC's Object Pascal syntax or the Lazarus LCL. Note that this uses the proprietary HyperHelp program, so is not portable to other platforms.
7171
7272For instructions, please see [[Kylix|instructions in the Kylix article]]
7373
7474## fpdoc entries of RTL and FCL
7575
7676The fpdoc entries for the FPC sources can be downloaded from svn:
7777
7878``` bash
7979 cd /home/username/yourchoice/
8080 svn co https://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs
8181```
8282
8383Add the path `/home/username/yourchoice/fpcdocs` to Tools \> Options \> Environment \> FPDoc Editor
8484
8585The source editor hints (eg as displayed by hovering your mouse over a function/procedure/property) should now show help for TComponent.Name.
8686
8787---
8888*From the Free Pascal wiki, page "Installing Help in the IDE", as it stood on 2023-09-03 after a change by Myrmidon, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
8989Category: CHM
9090Category: Help and Docs
9191Category: Lazarus

Back to history