Recent

Author Topic: Answer to Question: How to use CHM help?  (Read 41419 times)

SunyD

  • Guest
Answer to Question: How to use CHM help?
« 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.
« Last Edit: November 21, 2009, 02:16:00 pm by SunyD »

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Answer to Question: How to use CHM help?
« Reply #1 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.

SunyD

  • Guest
Re: Answer to Question: How to use CHM help?
« Reply #2 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?
« Last Edit: November 20, 2009, 08:19:57 pm by SunyD »

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Answer to Question: How to use CHM help?
« Reply #3 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
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Answer to Question: How to use CHM help?
« Reply #4 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.

SunyD

  • Guest
Re: Answer to Question: How to use CHM help?
« Reply #5 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]

SunyD

  • Guest
Re: Answer to Question: How to use CHM help?
« Reply #6 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.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Answer to Question: How to use CHM help?
« Reply #7 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.

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Re: Answer to Question: How to use CHM help?
« Reply #8 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.
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Answer to Question: How to use CHM help?
« Reply #9 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?

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Re: Answer to Question: How to use CHM help?
« Reply #10 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?
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

DirkS

  • Sr. Member
  • ****
  • Posts: 251
Re: Answer to Question: How to use CHM help?
« Reply #11 on: November 25, 2010, 09:46:58 am »
What does the Start Page slot have on Windows?
BaseURL is blank

TurboRascal

  • Hero Member
  • *****
  • Posts: 672
  • "Good sysadmin. Bad programmer."™
Re: Answer to Question: How to use CHM help?
« Reply #12 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 :)
Regards, ArNy the Turbo Rascal
-
"The secret is to give them what they need, not what they want." - Scotty, STTNG:Relics

TurboRascal

  • Hero Member
  • *****
  • Posts: 672
  • "Good sysadmin. Bad programmer."™
Re: Answer to Question: How to use CHM help?
« Reply #13 on: December 02, 2010, 12:22:43 am »
Confirming, on Windows it works fine for me too, settings being the same as for linux...
Regards, ArNy the Turbo Rascal
-
"The secret is to give them what they need, not what they want." - Scotty, STTNG:Relics

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: Answer to Question: How to use CHM help?
« Reply #14 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.

 

TinyPortal © 2005-2018