From 3a0e7e4224850ed111428ebf5cfb4b77498ba399 Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 26 Jun 2011 21:08:58 +0000 Subject: [PATCH] chmhelp: help for compiler directives git-svn-id: trunk@31411 - --- components/chmhelp/README.txt | 6 ++---- .../chmhelp/packages/idehelp/chmhelppkg.lpk | 15 +++++++++++---- .../chmhelp/packages/idehelp/chmhelppkg.pas | 2 +- .../chmhelp/packages/idehelp/lazchmhelp.pas | 6 +++++- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/components/chmhelp/README.txt b/components/chmhelp/README.txt index 0c6cebf9fc..a3508405c6 100644 --- a/components/chmhelp/README.txt +++ b/components/chmhelp/README.txt @@ -29,8 +29,8 @@ This is a basic HOWTO for integrating lhelp into the Lazarus IDE. and select the lhelp executable. HelpFilesPath: - This is the directory that contains the lcl.chm fcl.chm and rtl.chm files. - You can download them from the download page of www.lazarus.freepascal.org. + This is the directory that contains the help files in CHM format (lcl.chm, fcl.chm, rtl.chm etc.). + You can download them from http://sourceforge.net/projects/freepascal/files/Documentation/ HelpLabel Name and Tag do not need to be altered. The HelpLabel is the name of the named pipe that lazarus will use to communicate with lhelp. @@ -43,8 +43,6 @@ This is a basic HOWTO for integrating lhelp into the Lazarus IDE. 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 paths become: "lcl-fcl-rtl.chm://rtl/" diff --git a/components/chmhelp/packages/idehelp/chmhelppkg.lpk b/components/chmhelp/packages/idehelp/chmhelppkg.lpk index 8d39fddb1e..4b31da41dc 100644 --- a/components/chmhelp/packages/idehelp/chmhelppkg.lpk +++ b/components/chmhelp/packages/idehelp/chmhelppkg.lpk @@ -1,6 +1,6 @@ - + @@ -13,11 +13,14 @@ + + + - + @@ -29,8 +32,12 @@ - + + + + + @@ -52,7 +59,7 @@ - + diff --git a/components/chmhelp/packages/idehelp/chmhelppkg.pas b/components/chmhelp/packages/idehelp/chmhelppkg.pas index 6bd547c995..2b6ad0b383 100644 --- a/components/chmhelp/packages/idehelp/chmhelppkg.pas +++ b/components/chmhelp/packages/idehelp/chmhelppkg.pas @@ -7,7 +7,7 @@ unit ChmHelpPkg; interface uses - LazChmHelp, ChmLangRef, ChmLcl, LazarusPackageIntf; + LazChmHelp, ChmLangRef, ChmLcl, ChmProg, LazarusPackageIntf; implementation diff --git a/components/chmhelp/packages/idehelp/lazchmhelp.pas b/components/chmhelp/packages/idehelp/lazchmhelp.pas index 642aa615f6..c878b3fc0d 100644 --- a/components/chmhelp/packages/idehelp/lazchmhelp.pas +++ b/components/chmhelp/packages/idehelp/lazchmhelp.pas @@ -24,7 +24,7 @@ interface uses Classes, SysUtils, FileUtil, LazHelpIntf, HelpIntfs, LazConfigStorage, - PropEdits, LHelpControl, Controls, ChmLangRef, ChmLcl; + PropEdits, LHelpControl, Controls, ChmLangRef, ChmLcl, ChmProg; type @@ -118,6 +118,8 @@ begin fChmsFilePath := AppendPathDelim(AValue); if Assigned(LangRefHelpDatabase) then LangRefHelpDatabase.LoadKeywordList(fChmsFilePath); + if Assigned(FPCDirectivesHelpDatabase) then + FPCDirectivesHelpDatabase.DocsDir := fChmsFilePath; end; function TChmHelpViewer.GetHelpEXE: String; @@ -430,6 +432,8 @@ begin LangRefHelpDatabase.OnFindViewer := @ChmHelp.DBFindViewer; RegisterLclHelpDatabase; LCLHelpDatabase.OnFindViewer := @ChmHelp.DBFindViewer; + RegisterFPCDirectivesHelpDatabase; + FPCDirectivesHelpDatabase.OnFindViewer := @ChmHelp.DBFindViewer; end; initialization