mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +02:00
chmhelp: auto compile lhelp when showing all help, patch #23411
git-svn-id: trunk@40593 -
This commit is contained in:
parent
07867f2b3a
commit
1b37181d38
@ -419,23 +419,25 @@ end;
|
|||||||
procedure TChmHelpViewer.ShowAllHelp(Sender: TObject);
|
procedure TChmHelpViewer.ShowAllHelp(Sender: TObject);
|
||||||
var
|
var
|
||||||
SearchPath: String; //; delimited list of directories
|
SearchPath: String; //; delimited list of directories
|
||||||
LHelpFilename: String;
|
HelpExeFileName: String;
|
||||||
begin
|
begin
|
||||||
|
// Make sure the lhelp help viewer exists; build it if doesn't and it is lhelp
|
||||||
|
HelpExeFileName:=GetHelpExe;
|
||||||
|
if (not FileExistsUTF8(HelpExeFileName)) and
|
||||||
|
((ExtractFileNameOnly(HelpExeFileName) = 'lhelp') and (CheckBuildLHelp <> mrOK)) then begin
|
||||||
|
IDEMessageDialog(HELP_MissingLhelp, Format(
|
||||||
|
HELP_UnableToFindTheLhelpViewerPleaseCompileTheLhelpPro,
|
||||||
|
[#13, HelpExeFileName, #13, #13, #13,
|
||||||
|
SetDirSeparators('components/chmhelp/lhelp/lhelp.lpi')]),
|
||||||
|
mtError,[mbCancel]);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
SearchPath := GetHelpFilesPath;
|
SearchPath := GetHelpFilesPath;
|
||||||
// Start up server if needed
|
// Start up server if needed
|
||||||
if not(fHelpConnection.ServerRunning) then
|
if not(fHelpConnection.ServerRunning) then
|
||||||
begin
|
begin
|
||||||
LHelpFilename:=GetHelpExe;
|
fHelpConnection.StartHelpServer(HelpLabel, HelpExeFileName);
|
||||||
if not FileExistsUTF8(LHelpFilename) then
|
|
||||||
begin
|
|
||||||
IDEMessageDialog(HELP_MissingLhelp, Format(
|
|
||||||
HELP_UnableToFindTheLhelpViewerPleaseCompileTheLhelpPro,
|
|
||||||
[#13, LHelpFilename, #13, #13, #13,
|
|
||||||
SetDirSeparators('components/chmhelp/lhelp/lhelp.lpi')]),
|
|
||||||
mtError,[mbCancel]);
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
fHelpConnection.StartHelpServer(HelpLabel, LHelpFilename);
|
|
||||||
end;
|
end;
|
||||||
// Open all chm files after it has started
|
// Open all chm files after it has started
|
||||||
OpenAllCHMsInSearchPath(SearchPath);
|
OpenAllCHMsInSearchPath(SearchPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user