Results 1 to 5 of 5
  1. #1


    Member Since
    May 20, 2009
    Posts
    7
    How to define a new file association with a binary application (not a .App) ?
    Hello !

    I installed wine from MacPorts (the only one to work) and I'm a bit tired to open a Terminal to open Wine, is there a way to define a new file association to automatically open *.exe file with /opt/local/bin/wine (it's not possible with the built-in application selector on MacOSX) ?

    Cheers,
    Vianney

  2. #2

    Lifeisabeach's Avatar
    Member Since
    Sep 30, 2007
    Location
    The Republic of Neptune
    Posts
    7,730
    You could probably create an Automator workflow to automate this somehow. I'm not near my Mac at the moment so I can't give any more specific ideas on how to configure that workflow for now.

    Please verify and include the exact model/year of your Mac and OS X version number (available from "About This Mac", then "More Info" on the Apple menu).
    ------
    Links: Onyx | EasyFind | Apple Hardware Test | How to test your hard drive | The Safe Mac Adware Removal Guide | Uninstall MacKeeper
    ------
    Lifeisabeach - Mac-Forums Member of the Month June 2009, Feb 2012, and March 2013.

  3. #3


    Member Since
    May 20, 2009
    Posts
    7
    I tried to do it with Automator but I'm a kind of noob in AppleScript

  4. #4


    Member Since
    Mar 24, 2008
    Posts
    6
    I'd like to bump this to see if anyone has any ideas or sample scripts. I don't really know what I'm doing with AppleScript to be honest, though it seems like it should be simple enough I don't really want to have to learn AS just to get it done.

    Being able to double-click .exe files and then create a dummy drive for WINE are my two main wishes for making integration almost seamless, and IMO what they need for any binary distributions that come along in the future, as navigating to ~/.wine/ to get at your "C:" drive is a bit of a pain, and having to fire into the terminal to open an application is a bit too. The drive one is solved easily enough by throwing it in the sidebar and giving it a nice OS X drive icon though, but me being picky I'd prefer to see it under the devices heading

    Though on the plus side everything I want to run seems to run much better in WINE than it ever has in VMWare Fusion or Parallels, so it's been worth the effort so far!
    "Early 2008" MacPro: 2 x 3.2ghz Quad-Core Xeons (12mb cache)
    10gb DDR2 800mhz RAM (ECC)
    4 x 750gb SATA 2 drives (32mb cache) - RAID 0
    NVidia GeForce 8800GT (512mb)

  5. #5


    Member Since
    Mar 24, 2008
    Posts
    6
    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
    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.
    "Early 2008" MacPro: 2 x 3.2ghz Quad-Core Xeons (12mb cache)
    10gb DDR2 800mhz RAM (ECC)
    4 x 750gb SATA 2 drives (32mb cache) - RAID 0
    NVidia GeForce 8800GT (512mb)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Application file association preference
    By stereodan98 in forum OS X - Operating System
    Replies: 0
    Last Post: 11-19-2010, 05:02 PM
  2. Excel File Association?
    By Dillinger-63 in forum Running Windows (or anything else) on your Mac
    Replies: 0
    Last Post: 04-13-2006, 11:48 AM
  3. Is .app the binary execute file?
    By AlexN in forum Switcher Hangout
    Replies: 3
    Last Post: 09-23-2005, 11:11 AM
  4. file type association
    By gdestiny in forum Switcher Hangout
    Replies: 3
    Last Post: 01-28-2005, 10:34 AM
  5. File association errors
    By pixelmaven in forum Apple Notebooks
    Replies: 4
    Last Post: 04-09-2004, 07:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •