Hi,
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/.
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 # > overwrites contents but keeps resource fork mv foo.png ~/Desktop/foo.command # .command is the finder's suffix for executable shell scripts chmod a+x foo.command
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.
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.
What do you think? Jörg Höhle PS: You can wrap up the whole thing into a single shell script using the cat <<EOF syntax.
Hi,
On Mon, Sep 14, 2009 at 1:13 PM, Joerg-Cyril.Hoehle@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 =)
On Mon, Sep 14, 2009 at 5:33 PM, Steven Edwards winehacker@gmail.com wrote:
Do you mean >> ? wouldn't the > just overwrite the foo.png?
Sorry for the noise, I hit send too soon. I mean don't you mean >> rather than just > which would just overwrite the icon you just converted.
<snip>
"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?
What I mean here, is there a switch or resource fork or xattr you can set that implies Cmd-I for this given *.command? I mean, I am sure we don't want to try to enforce that for all other *.command scripts, just ones we create.
On Mon, Sep 14, 2009 at 5:33 PM, Steven Edwards winehacker@gmail.com wrote:
Right but what happened to the png image?
OK so I looked at it a bit more in depth and understand what your going for now. So you are embedding the png as a resource fork of the png image but then using the png as a script. You kind of lost me before but it makes sense now. It's creative but not the correct way to do what we want.
All that really needs to be done to fix the patch I have is to convert the raw C io-ops to use the Carbon functions for writing out the plist and add a helper to function do the conversion from png to icns. I suspect we might be able to go from png to tiff to icns using OS X builtin tools and spawn* to do the magic. At the worst case we need to write a helper function to convert the format.
Thanks