How does Wine extract icons?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
cedricmc
Newbie
Newbie
Posts: 3
Joined: Fri Sep 10, 2010 7:05 pm

How does Wine extract icons?

Post by cedricmc »

I've researched on Google, Wine's wikki and Wine's forum, but I did not find how exactly does Wine to extract the icons from the exe binaries. The only thing that I've found are mentions to third party programs, but anything about Wine itself. May anyone bring some light about the subject?

Thanks.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

Wine actually does that? must be a Linux thing? I always have to manually pull them out using other apps for OSX.
madewokherd
Level 4
Level 4
Posts: 149
Joined: Mon Jun 02, 2008 5:03 pm

How does Wine extract icons?

Post by madewokherd »

Wine extracts icons using the windows API, which it also happens to
implement. The code for this (based on windows libraries) is in
winemenubuilder:
http://source.winehq.org/source/program ... ubuilder.c
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: How does Wine extract icons?

Post by doh123 »

madewokherd wrote:Wine extracts icons using the windows API, which it also happens to
implement. The code for this (based on windows libraries) is in
winemenubuilder:
http://source.winehq.org/source/program ... ubuilder.c
there is no winemenubuilder for Macs.. is why I haven't seen this I guess. Macs using vanilla Wine its all command line only.

thanks for the info though.
cedricmc
Newbie
Newbie
Posts: 3
Joined: Fri Sep 10, 2010 7:05 pm

How does Wine extract icons?

Post by cedricmc »

Thank you very much, madewokherd.

Do you know if this can be used through the command line? When one installs a win32/64 program, wine does extract the icons, but sometimes there is no installation program, which is one of the cases where one would like to use this extraction method.
Addys
Level 2
Level 2
Posts: 47
Joined: Tue Nov 25, 2008 11:33 am

Post by Addys »

madewokherd
Level 4
Level 4
Posts: 149
Joined: Mon Jun 02, 2008 5:03 pm

How does Wine extract icons?

Post by madewokherd »

From looking at the source, there is a command that extracts the icon
from a .lnk file:

wine winemenubuilder -t filename.lnk output.png

However, there is no way (yet) to do this for a .exe or .ico file directly.
cedricmc
Newbie
Newbie
Posts: 3
Joined: Fri Sep 10, 2010 7:05 pm

How does Wine extract icons?

Post by cedricmc »

Wow, madewokherd! You're awesome. Thank you again.

Addys, I was looking for something closer to what madewokherd posted, but your link will be surely useful. Thanks.
Locked