mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 00:35:56 +02:00
* CHM: demos: cosmetic/code layout
git-svn-id: trunk@46576 -
This commit is contained in:
parent
4ebb1c0ec1
commit
9e8122ea01
@ -7,7 +7,7 @@ Abstract:
|
|||||||
|
|
||||||
TLHelpConnector starts "lhelp" a chm viewer written in pure pascal.
|
TLHelpConnector starts "lhelp" a chm viewer written in pure pascal.
|
||||||
|
|
||||||
How to run this program
|
How to run this program:
|
||||||
Make sure the example.chm file is created
|
Make sure the example.chm file is created
|
||||||
You can create the example.chm with
|
You can create the example.chm with
|
||||||
../../../tools/chmaker/chmmaker.lpi
|
../../../tools/chmaker/chmmaker.lpi
|
||||||
|
@ -55,7 +55,7 @@ begin
|
|||||||
try
|
try
|
||||||
if Help.ServerRunning = false then
|
if Help.ServerRunning = false then
|
||||||
Help.StartHelpServer(IPCFile, GetLHelpFilename);
|
Help.StartHelpServer(IPCFile, GetLHelpFilename);
|
||||||
Res :=Help.OpenFile(OpenDialog1.FileName);
|
Res := Help.OpenFile(OpenDialog1.FileName);
|
||||||
finally
|
finally
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
@ -69,7 +69,7 @@ begin
|
|||||||
{$IFDEF Unix}
|
{$IFDEF Unix}
|
||||||
DeleteFile('/tmp/'+IPCFile);
|
DeleteFile('/tmp/'+IPCFile);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
LHelp:=GetLHelpFilename;
|
LHelp := GetLHelpFilename;
|
||||||
if not FileExistsUTF8(LHelp) then
|
if not FileExistsUTF8(LHelp) then
|
||||||
MessageDlg('Missing lhelp','Can not find the lhelp application "'+LHelp+'"',
|
MessageDlg('Missing lhelp','Can not find the lhelp application "'+LHelp+'"',
|
||||||
mtError,[mbOk],0);
|
mtError,[mbOk],0);
|
||||||
@ -84,11 +84,11 @@ end;
|
|||||||
|
|
||||||
function TForm1.GetLHelpFilename: string;
|
function TForm1.GetLHelpFilename: string;
|
||||||
begin
|
begin
|
||||||
Result:='../lhelp/lhelp';
|
Result := '../lhelp/lhelp';
|
||||||
{$IFDEF Windows}
|
{$IFDEF Windows}
|
||||||
Result:='..\lhelp\lhelp.exe';
|
Result := '..\lhelp\lhelp.exe';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF darwin}
|
{$IFDEF darwin} //OS X
|
||||||
Result:=Result+'.app/Contents/MacOS/'+ExtractFilename(Result);
|
Result:=Result+'.app/Contents/MacOS/'+ExtractFilename(Result);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user