Putting exe on the dock?

Questions about Wine on macOS.
Locked
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Putting exe on the dock?

Post by Dewdman42 »

I am wondering if anyone has figured out a good way to put icons on the doc for each exe that I want to launch with wine. I have a feeling this needs to be done with applescript so that it can be saved as an "applet", which can be placed in the dock, with a unique icon even.

I love that WineHQ is providing mac binaries now! and the WineXX.app that is provided is great for launching exe's manually. Just trying to figure out the best way to put something in the dock for an exe.

In the past I created some applescript applet's that could launch on exe using wine built from source in a standard location (ie, /usr/local/bin) with libs in expected location, etc.. This worked great, but now that wine comes prebuilt inside an app bundle, and particularly since the location of that app bundle might change in the future...I'm trying to figure out the best way to get something in the dock again.

since the Wine app bundle can open exe files and run them, this is probably the easiest thing to do, create some kind of applescript that will just basically open an exe file, either using the currently defined default app in the finder, or by specifying what app bundle to use, but when I tried this, I sometimes get errors and sometimes it opens, but only after first opening a terminal window.

anyway, any general suggestions for the task....getting exe's into the dock...would be appreciated.
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Re: Putting exe on the dock?

Post by Dewdman42 »

This is more or less what I am doing now.

applescript:

Code: Select all

tell application "Finder"
	open POSIX file "/Users/me/.wine/drive_c/Program Files/xyz.exe"
end tell
assign whatever icon you want to the applescript applet and add to the dock.
DarkPlayer
Level 2
Level 2
Posts: 23
Joined: Sun Mar 13, 2016 11:15 am

Re: Putting exe on the dock?

Post by DarkPlayer »

Wine does not support this yet on OS X. As far as I know only Cocoa apps can be added to the dock which does not apply to the Wine executable. It wold not be very hard to write a wrapper executable though and generate new entries in the Application folder of the user in winemenuibuilder. There is actually not much missing since most of the logic was already implemented for Linux, FreeBSD etc. Until you can convince someone to work on this, you need to use your workaround.
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Re: Putting exe on the dock?

Post by Dewdman42 »

its not the wine executable you put in the dock. you create an applescript with the code above, save the applescript as an applet and drag that to the dock.
Locked