GNOME Bugzilla – Bug 118478
Show Windows application icons in thumbnails
Last modified: 2010-12-21 08:23:27 UTC
Microsoft(r) Windows(r) binaries have icons embedded in them. It'd be nice if Nautilus would show them. You can extract them using the icoutils at: http://www.student.lu.se/~nbi98oli/icoutils.html I have created a simple shell script that uses these utils to extract an icon from a program. Together with some gconf entries this makes nautilus show the icons.
Created attachment 18674 [details] shell script to extract an icon from a windows binary
Created attachment 18675 [details] schema file to make nautilus run the script on application/x-msdos-executable files
Notes: This works for me, it is not completely correct though as it should extract the largest icon from the program. I have not checked this for security implications at all. The icoutils programs might be unsafe to use on various binaries, and the script itself creates directories in /tmp in a way that I cannot guarantee to be completely safe. Feedback, anyone?
The shell script and schema file are similar in nature to a PATCH, so I'm going to set the PATCH keyword and mark priority as high. I'm also going to change severity to enhancement.
This should really go in in the next cycle.
Created attachment 24430 [details] c code that does this faster and better
whoa, never thought anyone would be interested anymore :) I did write a small c program that does the same thing as the script, but in one program. - It can use a better selection algorithm than the script can. - It does not use temporary files - It's built with gnome-vfs, so it works on all filesystems
I dunno where to put these things. I don't think it makes sense in Nautilus, we ship no other thumbnailers with nautilus. I'm reassigning this to libgnomeui, which is where the thumbnailer code is. Although I don't really think it makes sense there either...
Martijn: Thanks for your efforts! It looks like nobody is interested in picking this up. If you want me, I can package it for you so that you can distribute it and publish it on gnomefiles.org.
There's a few compiler warning in there that would be nice to have fixed if we were to ship this as part of libgnomeui: In file included from ./getico.c:8: ./getico.h:179: warning: ‘packed’ attribute ignored for field of type ‘struct Win32CursorIconDirEntry[]’ ./getico.c: In function ‘main’: ./getico.c:561: warning: pointer targets in passing argument 1 of ‘simple_vec’ differ in signedness ./getico.c:578: warning: pointer targets in passing argument 1 of ‘simple_vec’ differ in signedness ./getico.c:581: warning: pointer targets in passing argument 2 of ‘png_write_row’ differ in signedness
And I'm not sure relying on libpng directly is a good idea either (even if lower levels in the stack do). Finally, the code is far from being integrated into libgnomeui. That would need to be done before it can be merged.
Martijn, would you be willing to spend time integrating this further?
Closing as obsolete.