Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
How to define a new file association with a binary application (not a .App) ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Haravikk" data-source="post: 1042366" data-attributes="member: 51625"><p>Okay, so I went ahead and made something myself. All you have to do is open a new Automator application workflow, throw in a shell-script task, and copy/paste the following code:</p><p></p><p>[code]source ~/.profile</p><p>if test $# = 0</p><p> then</p><p> winefile C:</p><p> exit</p><p>fi</p><p></p><p>for f in "$@"</p><p>do</p><p> d=`dirname "$f"`</p><p> f=`basename "$f"`</p><p> cd "$d"</p><p> wine "$f" &</p><p>done[/code]</p><p></p><p>You can then save your app, associate .exe files with it (using Finder's get-info), and WINE should run with very little fuss as you can now just double-click .exe files, create aliases to your favourite ones etc.</p><p></p><p>If you open the app without a .exe argument then you get the default file-browser. You can also go a step further and associate files in the info.plist within the .app, and provide icons and so-on as well, but I won't describe that here.</p></blockquote><p></p>
[QUOTE="Haravikk, post: 1042366, member: 51625"] Okay, so I went ahead and made something myself. All you have to do is open a new Automator application workflow, throw in a shell-script task, and copy/paste the following code: [code]source ~/.profile if test $# = 0 then winefile C: exit fi for f in "$@" do d=`dirname "$f"` f=`basename "$f"` cd "$d" wine "$f" & done[/code] You can then save your app, associate .exe files with it (using Finder's get-info), and WINE should run with very little fuss as you can now just double-click .exe files, create aliases to your favourite ones etc. If you open the app without a .exe argument then you get the default file-browser. You can also go a step further and associate files in the info.plist within the .app, and provide icons and so-on as well, but I won't describe that here. [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
How to define a new file association with a binary application (not a .App) ?
Top