How I create wine app launcher icons on the Mac

Steven Edwards winehacker at gmail.com
Mon Sep 14 16:33:38 CDT 2009


Hi,

On Mon, Sep 14, 2009 at 1:13 PM,  <Joerg-Cyril.Hoehle at t-systems.com> wrote:
> On Linux, I have been using .desktop files that freedesktop defines to keep a directory full of icons. They all launch Wine applications.  Often enough, these desktop files are initially create by Wine in ~/.local/share/applications/wine/..., along with the icon files in ~/.local/share/icons/.

I wrote a patch to create .app bundled is winemenubuilder that was
rejected because it needs to be converted to use Carbon api's for
creation and editing of the *.plist files. I think its a better
approach/framework because it allows you to have, resource data,
multiple icons, and perhaps the ability to add drag/drop to the
helper.

I am not sure I am following this.

> Here's how I now have app launcher icons on the Mac:
>
> sips -i ~/.local/share/icons/foo.png --out foo.png
> # sips -i converts and *additionaly* adds icon resource to file
> # Alas, sips does not understand .xpm
> cat sample.command > foo.png

Do you mean >> ? wouldn't the > just overwrite the foo.png?

> # > overwrites contents but keeps resource fork
> mv foo.png ~/Desktop/foo.command

I guess the resource fork is contained in a xattr right?

> # .command is the finder's suffix for executable shell scripts
> chmod a+x foo.command

Right but what happened to the png image?

> sample.command contains:
> #!/bin/sh
> cd /User/me/xyz && WINEDEBUG=-gsm WINEPREFIX=$HOME/.wine exec wine xyz.exe
>
> Afterwards you edit foo.command and change the directory, environment variables and executable names to meet your needs.  Be careful to use an editor that keeps the resource fork.
>
> "Opening" this icon will launch a Terminal where all logs will go. Optionally you may use Cmd-I(nformation) to disable the display of the .command suffix in the finder (unless forced globally). Wine's X11 window opens above the Terminal window.

Using the sample.command or whatever is there a way to always hide the terminal?

> I wonder whether this functionality could be somehow integrated into the git (winemenubuilder?), or whether developers believe this should be left to "surrounding" projects like Darwine.

See this patch

http://www.winehq.org/pipermail/wine-patches/2009-July/076251.html

> What do you think?

I think somebody that is more familiar with Carbon should adopt my patch =)

-- 
Steven Edwards

"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo



More information about the wine-devel mailing list