views:

333

answers:

4

I have an app that was developed for Windows but runs fine on MacOS under mono without any modifications (yay!). However, since it's an exectutable, OSX doesn't recognize it as a native file type, meaning you have to drop to the command line to run 'mono appname.exe'. It also doesn't show the application icon. In case it matters, my test environment is Snow Leopard w/Mono 2.6.1.

As I understand it, in the Mac world, making a user drop to the command line is unconscionably rude. Is there a 'right way' to deploy a Mono app so that it can run by clicking on an icon -- perhaps the Mac equivalent of a shortcut if such a thing exists? I've heard of something called a 'bundle' but maybe those aren't for Mono/.NET apps.

So, is there a 'right way' to make running the app easier on a user?

A: 

If you look at the directory structure inside of an application, you'll see that bundles are little more than an XML (Info.plist) property list + some folders. It's not too difficult to build one by hand. Simply take any app as an example, then modify it, and drop your executable in.

Pestilence
+9  A: 

Michael Hutchinson just wrote a great article on how to do this:

http://mjhutchinson.com/journal/2010/01/24/creating_mac_app_bundle_for_gtk_app

It helped me tremendously in trying to do exactly what you are doing.

jpobst
Perfect, that's exactly what I was looking for. Thank you.
Jason Champion
A: 

Monobjc is the best route to go imo.

http://www.monobjc.net/

Lounges
A: 

You could also run macpack from the command-line.

flipdoubt