chmhelp: unregister default LCL help, search in docs/chm first

git-svn-id: trunk@50697 -
This commit is contained in:
mattias 2015-12-06 15:04:31 +00:00
parent 2fe0fde59e
commit 29fe61bfd2
4 changed files with 11 additions and 3 deletions

View File

@ -102,7 +102,7 @@ begin
fCHMSearchPath := Path;
if fCHMSearchPath = '' then
begin
fCHMSearchPath := '$(LazarusDir)/docs/html;$(LazarusDir)/docs/chm';
fCHMSearchPath := '$(LazarusDir)/docs/chm;$(LazarusDir)/docs/html';
IDEMacros.SubstituteMacros(fCHMSearchPath);
fCHMSearchPath := MinimizeSearchPath(SetDirSeparators(fCHMSearchPath));
end;

View File

@ -55,8 +55,16 @@ procedure RegisterLclHelpDatabase;
var
FPDocNode: THelpNode;
DirItem: THelpDBISourceDirectory;
DefaultHelpDB: THelpDatabase;
begin
if Assigned(LCLHelpDatabase) then Exit;
// remove default help
DefaultHelpDB:=HelpDatabases.FindDatabase('LCLUnits');
if DefaultHelpDB<>nil then
DefaultHelpDB.Free;
// register our own help
LCLHelpDatabase := TLclChmHelpDatabase(
HelpDatabases.CreateHelpDatabase(sLclUnits, TLclChmHelpDatabase, True));

View File

@ -184,7 +184,7 @@ begin
Result:=FCHMSearchPath;
if Result='' then
begin
Result := '$(LazarusDir)/docs/html;$(LazarusDir)/docs/chm';
Result := '$(LazarusDir)/docs/chm;$(LazarusDir)/docs/html';
IDEMacros.SubstituteMacros(Result);
Result:=MinimizeSearchPath(SetDirSeparators(Result));
end;

View File

@ -273,7 +273,7 @@ function TChmHelpViewer.GetHelpFilesPath: String;
begin
Result:=fCHMSearchPath;
if Result='' then
Result:='$(LazarusDir)/docs/html;$(LazarusDir)/docs/html/lcl;$(LazarusDir)/docs/chm';
Result:='$(LazarusDir)/docs/chm;$(LazarusDir)/docs/html;$(LazarusDir)/docs/html/lcl';
IDEMacros.SubstituteMacros(Result);
Result:=MinimizeSearchPath(SetDirSeparators(Result));
end;