Question concerning creating .exe shorcuts.

Questions about Wine on Linux
Locked
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Question concerning creating .exe shorcuts.

Post by r2rX »

Hey guys,

I was curious about something. When Wine installs a program, that creates a shortcut after installation, it is usually placed on the desktop (as it would in Windows).

So how I can create the same type of shortcut which will use the .exe's inbuilt icon; as Wine does? I know how to create a shortcut but i'd manually need to search for a .png file to use as that shortcuts icon.

The advice is appreciated. :)

r2rX :D
User avatar
dimesio
Moderator
Moderator
Posts: 13207
Joined: Tue Mar 25, 2008 10:30 pm

Re: Question concerning creating .exe shorcuts.

Post by dimesio »

r2rX wrote: So how I can create the same type of shortcut which will use the .exe's inbuilt icon; as Wine does?
Never tried it myself, but icoutils is supposed to be able to extract icons from exe files. http://www.nongnu.org/icoutils/
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

Thanks for the response, dimesio. :)

But how does Wine do it? Can I not imitate the command line? I'll look into icoutils.

r2rX :)
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

Hey guys,

Alright, I have icoutils installed and I successfully extracted the icon/s:

Code: Select all

wrestool --raw 'file'.exe --output=/path/to/extract/
I then opened the .ico file in Image Viewer and saved as .png.

So that's definitely some progress. :)

r2rX :D
Bruno Jesus

Question concerning creating .exe shorcuts.

Post by Bruno Jesus »

Maybe you could use imagemagick to convert the ico to png
automatically. Something like:

convert "file.ico" -alpha on -background none -flatten "file.png"
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

Thanks for the suggestion, Bruno. :)

Maybe a script can be written to incorporate the extraction and conversion (via GUI as well) with a sample shown through it.

Would it be worth incorporating it into Wine?

r2rX :)
KenSharp
Level 4
Level 4
Posts: 120
Joined: Mon Jul 13, 2009 8:52 pm

Post by KenSharp »

jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

Question concerning creating .exe shorcuts.

Post by jjmckenzie »

On Tue, Jun 12, 2012 at 6:16 AM, r2rX <[email protected]> wrote:
Hey guys,

I was curious about something. When Wine installs a program, that creates a shortcut after installation, it is usually placed on the desktop
(as it would in Windows).
I'm assuming you are using a Mac. There was an effort to do this and
I don't know where it stands today. I might 'resurrect' the old
WineHelper project to see if we can get a launcher with icons
attached...

If you want to look at it, the Darwine project included this code and
was on-hold the last I checked.

James
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Re: Question concerning creating .exe shorcuts.

Post by r2rX »

jjmckenzie wrote:On Tue, Jun 12, 2012 at 6:16 AM, r2rX <[email protected]> wrote:

I'm assuming you are using a Mac. There was an effort to do this and
I don't know where it stands today. I might 'resurrect' the old
WineHelper project to see if we can get a launcher with icons
attached...

If you want to look at it, the Darwine project included this code and
was on-hold the last I checked.

James
It's would be nice for Mac users...although i'm on Linux. :)

I'll take a look at the winemenubuilder, KenSharp.

r2rX :D
Locked