mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:55:58 +02:00
chmhelp: search prog.chm in docs/chm
git-svn-id: trunk@37717 -
This commit is contained in:
parent
cded73efc9
commit
76c8f89cb3
@ -6,7 +6,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
Dialogs, FileUtil, LazFileUtils,
|
Dialogs, FileUtil, LazFileUtils, LazLogger,
|
||||||
LazHelpIntf, HelpIntfs,
|
LazHelpIntf, HelpIntfs,
|
||||||
IDEHelpIntf, MacroIntf;
|
IDEHelpIntf, MacroIntf;
|
||||||
|
|
||||||
@ -50,8 +50,9 @@ uses chmreader, chmFiftiMain;
|
|||||||
procedure RegisterFPCDirectivesHelpDatabase;
|
procedure RegisterFPCDirectivesHelpDatabase;
|
||||||
begin
|
begin
|
||||||
if not Assigned(FPCDirectivesHelpDatabase) then
|
if not Assigned(FPCDirectivesHelpDatabase) then
|
||||||
FPCDirectivesHelpDatabase := TFPCDirectivesHelpDatabase(HelpDatabases.CreateHelpDatabase(sFPCCompilerDirectives,
|
FPCDirectivesHelpDatabase :=
|
||||||
TFPCDirectivesHelpDatabase, true));
|
TFPCDirectivesHelpDatabase(HelpDatabases.CreateHelpDatabase(
|
||||||
|
sFPCCompilerDirectives, TFPCDirectivesHelpDatabase, true));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFPCDirectivesHelpDatabase }
|
{ TFPCDirectivesHelpDatabase }
|
||||||
@ -146,6 +147,7 @@ begin
|
|||||||
and (LeftStr(HelpDirective, Length(FPCDirectiveHelpPrefix)) = FPCDirectiveHelpPrefix) then
|
and (LeftStr(HelpDirective, Length(FPCDirectiveHelpPrefix)) = FPCDirectiveHelpPrefix) then
|
||||||
begin
|
begin
|
||||||
Filename:=FindCHMFile;
|
Filename:=FindCHMFile;
|
||||||
|
debugln(['TFPCDirectivesHelpDatabase.GetNodesForDirective ',Filename]);
|
||||||
if (Filename='') then
|
if (Filename='') then
|
||||||
begin
|
begin
|
||||||
Result := shrDatabaseNotFound;
|
Result := shrDatabaseNotFound;
|
||||||
@ -181,7 +183,7 @@ function TFPCDirectivesHelpDatabase.GetCHMSearchPath: string;
|
|||||||
begin
|
begin
|
||||||
Result:=FCHMSearchPath;
|
Result:=FCHMSearchPath;
|
||||||
if Result='' then begin
|
if Result='' then begin
|
||||||
Result := '$(LazarusDir)/docs/html';
|
Result := '$(LazarusDir)/docs/html;$(LazarusDir)/docs/chm';
|
||||||
IDEMacros.SubstituteMacros(Result);
|
IDEMacros.SubstituteMacros(Result);
|
||||||
Result:=MinimizeSearchPath(SetDirSeparators(Result));
|
Result:=MinimizeSearchPath(SetDirSeparators(Result));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user