Lazarus

Using the Lazarus IDE => Options => Topic started by: SunyD on November 20, 2009, 04:46:10 pm

Title: Answer to Question: How to use CHM help?
Post by: SunyD on November 20, 2009, 04:46:10 pm
I see many people have problems to configure lazarus chm-help system. Here is the way how i solved it!

Read:
c:\lazarus\components\chmhelp\README.txt

This  is modified version from readme.txt:
1 ) Start Lazarus

2 ) Install Packages:

In the Components Menu choose "Open Package File"
Open:
lazarus/components/chmhelp/packages/help/lhelpcontrolpkg.lpk

Don't click compile or install

With the lhelpcontrolpkg package still open, in the Components Menu choose "Open Package File".
Open:
lazarus/components/chmhelp/packages/idehelp/chmhelppkg.lpk

3 ) Now click "Install" on "chmhelppkg.lpk" this will automatically install the first package we opened.

4 ) Restart Lazarus(if it didn't automatically)

5 ) Open the lhelp project in lazarus/components/chmhelp/lhelp/lhelp.lpi
    Compile lhelp-programm.
(Don't forget:
lazarus\fpc\2.3.1\bin\i386-win32\strip.exe lazarus/components/chmhelp/lhelp/lhelp.exe
for smaller exe-size)

6 ) Configure the paths for the lhelp:

    From the Help menu choose "Configure Help"
    Change to the "Viewers" tab and select "CHM Help Viewer"
    in latest Lazarus version:
    Environment->Options->Help->Help Options

    HelpEXE:
    For the "HelpEXE" entry browse to the lazarus/components/chmhelp/lhelp/ folder
    and select the lhelp executable. i.e.:
    c:\lazarus\components\chmhelp\lhelp\lhelp.exe

    HelpFilesPath:
    This is the directory that contains the lcl.chm fcl.chm and rtl.chm files.
     i.e.:
     c:\lazarus\docs\
     (don't forget last '\' , when you forget it, chm-file will be not opened frrom lhelp.exe!)

    HelpLabel Name and Tag do not need to be altered.

7 ) Configure the DataBases

    Choose the DataBases tab.

    RTLUnits:
    this should be "rtl.chm://"
    FCLUnits:
    this should be "fcl.chm://"
    LCLUnits:
    this should be "lcl.chm://"

    NOTE if you have only a single lcl-fcl-rtl.chm file then then paths become:
    "lcl-fcl-rtl.chm://rtl/"
    "lcl-fcl-rtl.chm://fcl/"
    "lcl-fcl-rtl.chm://lcl/"

Now close this window and check out the integrated help :)
...
Maybe you must change lazarus-paths for your system or OS.

Here some screenshots from my working help system:
Configuration and use demo.


Edit: My Lazarus system is:
Win-Xp-32Bit
Lazarus Version 0.9.29 Beta (2009-11-19)
FPC-Version 2.3.1
SVN-Revision: 22679

Edit2:
The packages chmhelppkg.lpk and lhelpcontrolpkg.lpk must be installed.
Look my 3. post below

Edit3:
Don't open lcl.chm, rtl.chm, fcl.chm outside the IDE. LHelp can not open this files if they opened.
There are not help for reserved pascal words (unit, interface, .....). Maybe i will solve this problem.
Title: Re: Answer to Question: How to use CHM help?
Post by: picstart on November 20, 2009, 06:26:26 pm
It didn't work for me with win32 laz 9.29 fpc 2.3.1 . Anyway anything this convoluted to install is not likely to be that reliable in any case. And probably will crash future releases since few will be aware of such an arcane install process. This help needs help.
Title: Re: Answer to Question: How to use CHM help?
Post by: SunyD on November 20, 2009, 08:11:50 pm
The instruccions above are included in lazarus.

We have same Lazarus version. Don't forget to download chm-files and correct paths!
Try to compile lhelp program first (c:\lazarus\components\chmhelp\lhelp\lhelp.lpi)

I think first screenshot is enough help for configuration.

What don't work fo you?
Compiling of packages, programs or lhelp.exe don't load any chm-file?
Title: Re: Answer to Question: How to use CHM help?
Post by: JanRoza on November 20, 2009, 08:49:20 pm
As the helpsystem has never worked for me I was glad to see someone had a new solution.
Unfortunately this solution doesn't work for me, in step 5 compilation of lhelp.lpi ends with errors:

lhelpcore.pas(379,16) Error: identifier not found: srUnknown
lhelpcore.pas(379,25) Error: Identifier not found "srUnknown"
lhelpcore.pas(385,31) Error: Identifier not found "srInvalidFile"
lhelpcore.pas(392,31) Error: Identifier not found "srInvalidFile"
lhelpcore.pas(402,31) Error: Identifier not found "srSuccess"
lhelpcore.pas(405,35) Error: Identifier not found "srInvalidFile"
lhelpcore.pas(421,27) Error: Identifier not found "srSuccess"
lhelpcore.pas(424,31) Error: Identifier not found "srInvalidFile"
lhelpcore.pas(480) Fatal: There were 7 errors compiling module, stopping

Anyone any idea where those sr.... variables can be found?

 %)
Jan
Title: Re: Answer to Question: How to use CHM help?
Post by: picstart on November 20, 2009, 09:10:32 pm
My error is a lazarus feature as of late namely it is External sigsegv . Now I always get sigsegv when I hit run but many times it will run after that if I close the assembler window and hit run again. With lhelp i get a second external sigsegv error. ihelp compiled without error but that means nothing since 26.2 fpc 2.2.4. Assuming a version might work at some future time where does the ihelp icon go does it go into the IDE help menu? I still have online help.
Title: Re: Answer to Question: How to use CHM help?
Post by: SunyD on November 20, 2009, 09:19:43 pm
JanRoza:
srUnknown, srInvalidFile, ... are definied in file:
c:\lazarus\components\chmhelp\packages\help\lhelpcontrol.pas

In my lhelpcore.pas (maybe yours too) staying:
line 114: uses LHelpControl;

Maybe you must install lhelpcontrolpkg.lpk package again.

On my lazarus are installed this packages (from step 2.,3. first post):
chmhelppkg.lpk
lhelpcontrolpkg.lpk

How to check if packages are installed?
Goto: [Menu>Package>Package Graph...]
And search on the leftside under [Loaded Packages]
Title: Re: Answer to Question: How to use CHM help?
Post by: SunyD on November 20, 2009, 09:55:27 pm
picstart:
I had sigsegv-errror in summer. I started the programs after building from windows explorer or console.  Nextday i reinstalled lazarus.

There is no icon in help menu for lhelp.exe. Place the the cursor in source-editor on any word or in objectinspector in any cell then press [f1] key.
Title: Re: Answer to Question: How to use CHM help?
Post by: picstart on November 21, 2009, 03:40:37 am
Well Lhelp.exe will run outside of the lazarus IDE and will display the *.chm.
When running in the IDE it errors SIGSEGV ( the second one) if the file menu is accessed. I doesn't do this outside the IDE. The debugger is almost useless in the IDE since 26.2 (it can't be trusted). I have the paths set and the components are installed but bringing the cursor over a word and pressing f1 gives no help found message. Anyway congratulations to anyone who has the good fortune of actually having this help working.
Title: Re: Answer to Question: How to use CHM help?
Post by: dkjMusic on November 24, 2010, 09:32:53 pm
Can anyone that has followed this guide in Linux and got chm help working tell me what I should put in the Databases Start Page, RTL Units, FCL Units, and LCL Units fields?

Thanks.
Title: Re: Answer to Question: How to use CHM help?
Post by: Leledumbo on November 25, 2010, 01:29:35 am
Quote
Can anyone that has followed this guide in Linux and got chm help working tell me what I should put in the Databases Start Page, RTL Units, FCL Units, and LCL Units fields?
Err... the same on Windows?
Title: Re: Answer to Question: How to use CHM help?
Post by: dkjMusic on November 25, 2010, 09:14:44 am
Quote
Can anyone that has followed this guide in Linux and got chm help working tell me what I should put in the Databases Start Page, RTL Units, FCL Units, and LCL Units fields?
Err... the same on Windows?

What does the Start Page slot have on Windows?
Title: Re: Answer to Question: How to use CHM help?
Post by: DirkS on November 25, 2010, 09:46:58 am
What does the Start Page slot have on Windows?
BaseURL is blank
Title: Re: Answer to Question: How to use CHM help?
Post by: TurboRascal on November 25, 2010, 09:59:18 pm
Unfortunately it just wouldn't work for me on the linux machine. I reverted to HTML help. :(

It would be great if chmhelp would become a standard feature, working and  installed together with lazarus (by the Windows installer, as a deb package etc.). And WORKING :)
Title: Re: Answer to Question: How to use CHM help?
Post by: TurboRascal on December 02, 2010, 12:22:43 am
Confirming, on Windows it works fine for me too, settings being the same as for linux...
Title: Re: Answer to Question: How to use CHM help?
Post by: marcov on February 14, 2011, 04:29:11 pm
The help for reserved words is there (see index of ref.chm), but Lazarus does not support reading it.
Title: Re: Answer to Question: How to use CHM help?
Post by: TurboRascal on March 04, 2011, 12:40:34 am
That's right... there is no such item to setup in the help options.

Are there any plans to include it?
Title: Re: Answer to Question: How to use CHM help?
Post by: jamhitz on April 05, 2011, 11:28:42 am
I can confirm that the lhelp works in Linux (in my installation at least) *but* I have to provide the StartPage BaseURL.  It should be set to toc.chm - which contains links to all the other documents. Unfortunately if I set it to toc.chm:// it loads the lhelp window but at the Statusbar it fails:

Code: [Select]
ms-its:toc.chm::/docs/index.html not found!
However, because in my case I reference the RTL documentation the most, I have set rtl.chm:// as the BaseURL for StartPage. During the weekend, I will crack open toc.chm and try to create/rename the missing index.html document.... if you don't beat me to it that is.
Title: Re: Answer to Question: How to use CHM help?
Post by: TurboRascal on April 08, 2011, 07:19:14 pm
@jamhitz: that's quite an interesting work you are doing. If you succeed, you'll make some people happy ;)
Title: Re: Answer to Question: How to use CHM help?
Post by: marcov on April 08, 2011, 07:42:42 pm
The toc.chm file is not meant for Lazarus at all.

Lazarus should auto load rtl, fcl and lcl, and afaik has no facilities for anything else.
Title: Re: Answer to Question: How to use CHM help?
Post by: jamhitz on April 10, 2011, 05:06:47 pm
The toc.chm file contains only one file (toc.chm). I decompiled the CHM file, made a copy of that file as index.html.  I then recompiled the file and voila! When I click on "Online Help" the list of available documents is displayed with correct hyperlinks.

This must just be a work-around coz on the status bar it still says:

Code: [Select]
ms-its:toc.chm::/docs/index.html not found!
Please see the two attached images to see what I mean...but at least it does not fail in error, and offers links to get one started.

Attached, also find my modified toc.chm file.

@marcov: In my setup (Laz 0.9.28.2, lhelp 2009.06.08), lhelp does not autoload the chm files.
Title: Re: Answer to Question: How to use CHM help?
Post by: marcov on April 11, 2011, 10:42:30 am
The toc.chm file contains only one file (toc.chm). I decompiled the CHM file, made a copy of that file as index.html.  I then recompiled the file and voila! When I click on "Online Help" the list of available documents is displayed with correct hyperlinks.

Toc is autogenerated by a program. It can be that it contains mistakes, but it shouldn't be altered. THe generator program should be fixed.

And again: toc.chm is meant for the textmode IDE, not for lazarus.

Quote
@marcov: In my setup (Laz 0.9.28.2, lhelp 2009.06.08), lhelp does not autoload the chm files.

Sorry, don't know very old versions that well. Afaik that is a FPC 2.2.4 version, and there are dozens of patches to
the core CHM libraries in FPC alone since then. And then I'm not even counting what happened in lazarus.
Title: Re: Answer to Question: How to use CHM help?
Post by: TurboRascal on April 11, 2011, 11:08:58 pm

Toc is autogenerated by a program. It can be that it contains mistakes, but it shouldn't be altered. THe generator program should be fixed.

IIRC, all HTML and CHM documentation is created based on some XML files... Perhaps those files should be fixed...
Title: Re: Answer to Question: How to use CHM help?
Post by: marcov on April 12, 2011, 10:33:30 am

Toc is autogenerated by a program. It can be that it contains mistakes, but it shouldn't be altered. THe generator program should be fixed.

IIRC, all HTML and CHM documentation is created based on some XML files.

This is not true. Only RTL, FCL and LCL  (and some lesser ones like fpdoc and a few that are not compiled atm). These are processed by fpdoc.

prog, ref and user are in latex, exported to html and then post processed to CHM. (indexing and other little fixes)

toc is generated directly as CHM by a program, it simply opens all CHMs and provides a reference to it.

But again, TOC.chm is meant for the textmode IDE[/b\] that can only deal with one TOC.  It is a workaround to make the TOC an index page that references to the
other CHMs. It works fine for the textmode IDE, and is not important for the rest.
 
Title: Re: Answer to Question: How to use CHM help?
Post by: visualteam on January 14, 2021, 07:06:10 pm
...
7 ) Configure the DataBases

    Choose the DataBases tab.

    RTLUnits:
    this should be "rtl.chm://"
    FCLUnits:
    this should be "fcl.chm://"
    LCLUnits:
    this should be "lcl.chm://"

...

Thank you!

After Update to Lazarus 2.0.10 (deb 64), help partially was broken.
Inserting the above values revived the chm-Help.
(I didn't succeed in "reviving" html help, neither offline nor online version)

Greets

VT
Title: Re: Answer to Question: How to use CHM help?
Post by: dsiders on January 14, 2021, 07:15:43 pm
...
7 ) Configure the DataBases

    Choose the DataBases tab.

    RTLUnits:
    this should be "rtl.chm://"
    FCLUnits:
    this should be "fcl.chm://"
    LCLUnits:
    this should be "lcl.chm://"

...

Thank you!

After Update to Lazarus 2.0.10 (deb 64), help partially was broken.
Inserting the above values revived the chm-Help.
(I didn't succeed in "reviving" html help, neither offline nor online version)

Greets

VT

Do you realize you're replying to a 12 year old post?
TinyPortal © 2005-2018