[Lazarus] Cross platform 'open file with default program'
Juha Manninen
juha.manninen at phnet.fi
Sun Jan 24 12:08:34 CET 2010
Amazing,
OpenURL already implements what you are asking!
I tested with a local '.patch' file and it opened nicely in Kompare (KDE prog
for diffs).
OpenURL uses ShellExecuteW for Windows, 'xdg-open' for *nix and some API
functions for Darwin.
There seems to be lots of quality code in FPC/Lazarus. Good!
One thing is missing though. There is no portable way of getting application's
icon like ExtractAssociatedIcon does in Windows? This is somewhat related to
opening the file.
I asked about it some time ago in FPC mailing list and didn't get answers, so
I guess there is no such function. Does anyone have an idea about how to
implement it (except for Windows)?
Regards,
Juha Manninen
More information about the Lazarus
mailing list