Executable script in OS X for standalone windo ...

Persistent Inappeasable Mind

Tuesday, March 30. 2010

Executable script in OS X for standalone windows software

Software hints

I often use Windows software on OS X and I do like PortableApps as they do not need installation. For running Windows software I use Wine (the open source version of Crossover) and I always create an icon to click on to open Windows software. This icons can be placed in the Dock or in any other folder (Applications for example). This is a simple guide on how to do it.

I used to compile Wine trough MacPorts, but that is to much of a hassle. The simple way to do it is to download WineBottler and drag both Wine and WineBottler to the Applications folder (or even just Wine).

Now we can try to run our windows software from the command line like this (in one line):

 /Applications/Wine.app/Contents/MacOS/startwine 
                /Users/mkljun/Programs/ASP32/Asp32.exe

Note that I have all my Windows software in a folder named Programs and that Asp32.exe is the Windows executable file. 

Now we need to create an AppleScript for our Windows standalone software. First open AppleScript Editor. In a new window write your command in quotes with "do shell script" in front of it (in one line):

do shell script "/Applications/Wine.app/Contents/MacOS/startwine 
                /Users/mkljun/Programs/ASP32/Asp32.exe"

Now save the script as an Application. And that's it. Double clicking on a new "application" should open our Windows software.


We can even change the icon of the new file by selecting it and clicking CMD+i (or right clicking and selecting "Get info"). Dragging the (png) image from the Finder window to the left upper corner where the AppleScript icon residues, will change it.


Note:

  • Windows software should not be moved as this would affect your newly created script that expects is in the selected folder.
  • Wine is and opensource software and is supported by donations. WineBottler is a one-man project and he likes to read (his reading wishlist). PortableApps is an open source project ass well.

Trackbacks

Weblog: en.newinstance.it
Tracked: Apr 06, 12:44
Weblog: zerohimself.dyndns.org
Tracked: Jan 13, 03:25

Comments
Display comments as (Linear | Threaded)

#1 - cavin 2010-04-16 04:51 -

how can i find startwine in the Crossover

#2 - mkljun 2010-04-16 14:34 -

Sorry but I don't use Crossover. I use Wine bottler and its precompiled Wine.dmg image.

#3 - Lev said:
2014-08-20 19:05 -

Thanks so much, this is very helpful!


Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Can you please write (or copy/paste) this text in the field below: i h a t e s p a m