[Lazarus] Building help files: the nitty-gritty

Reinier Olislagers reinierolislagers at gmail.com
Tue Jul 17 12:51:22 CEST 2012


On 17-7-2012 12:06, Mark Morgan Lloyd wrote:
> Reinier Olislagers wrote:
> 
>> Ok, this would mean the xdg-open tools don't allow context-sensitive
>> help... and end of discussion on that front as far as LCL application
>> help is concerned, I suppose.
<snip>
> The only relevance is that this- in my opinion at least- should be the
> primary way that a program tries to locate subsidiary file viewers etc.
> It's the unix answer to ShellOpenEx() (or whataver the Windows API's
> function is).

Ah, ok.

AFAIU, LCLIntf.OpenDocument('thedocument.chm'); would open the CHM file
with the system viewer (if present) in a cross-platform way.
On Windows (sysenvapis_win.inc) it uses ShellExecute/ShellExecuteW.

On Unix, Linux (sysenvapis_unix.inc), it looks for xdg-open, kfmclient,
gnome-open and tries those.

On OSX (sysenvapis_mac.inc), it runs
RunCmdFromPath('open',ResultingPath);
too lazy to look up what that does.

There seems to be an implementation for Android customdrawn as well.




More information about the Lazarus mailing list