gnome-exe-thumbnailer -- using embedded icons for .exe and .dll files
damjan.jov at gmail.com
Sat Jun 19 01:59:00 CDT 2010
On Fri, Jun 18, 2010 at 12:18 PM, Jerome Leclanche <adys.wh at gmail.com> wrote:
> On Fri, Jun 18, 2010 at 10:57 AM, Damjan Jovanovic <damjan.jov at gmail.com> wrote:
>> The icons look cute and I like the version numbers, but you can't
>> thumbnail all Windows files outside Wine - for example .lnk files
>> internally specify a C:\path\to\file.ico style path to the icon which
>> then requires Wine's drive settings to resolve (or worse, use the file
>> extension's default icon from the Windows registry).
> Can't this be fixed with winepath magic?
The .lnk file is opened and the icon path and index are extracted by
an IShellLink[A/W]_Xxx() function. First that icon path is opened as
an .exe or .dll and the given index in its resource table is searched
for the best looking icon. Failing that, the icon path is opened as a
.ico file and the best looking icon is searched there instead. Failing
that, the extension of the icon path (eg. .hlp) is looked up as a
subkey of HKEY_CLASSES_ROOT, and the DefaultIcon entry is used as
before (first try .exe, then .ico). Failing that, the default icon for
the open handler of that extension (eg. winhlp32.exe for .hlp) is
extracted and used. Failing even that, the wineglass icon is used.
Little of this can be done outside Wine for .lnk, which will be going
on the desktop instead of .desktop files soon enough
(http://bugs.winehq.org/show_bug.cgi?id=3548 comment 27 and later).
More information about the wine-devel