Brett Veenstra
Brett Veenstra

Reputation: 48474

How to create OSX Package that runs Mono application "natively" (Bootstrapper)

Instead of requiring my users to drop to Terminal and start my app via mono <x> command, I'd like to give them an experience of clicking on "X.app" and Mono runtime launches my .NET assemblies.

Anyone done this?

Upvotes: 4

Views: 2903

Answers (3)

Bob Denny
Bob Denny

Reputation: 1303

FYI, MonoDevelop 2.2 (Dec, 2009) has a command line tool called macpack which will build a working Finder ".app" folder structure for you, with the bootstrapper and the correct filter hierarchy. See the MonoDevelop online docs or Google for macpack etc. MonoDevelop itself is pretty far along on OS X, so it's worth the download. The debugger isn't working on OS X yet though.

Upvotes: 5

miguel.de.icaza
miguel.de.icaza

Reputation: 32694

As the other posting indicates, all you need to do is package your software following the .app layout for the software.

In general, you need to provide a bash script that does something as simple as:

#!/bin/sh
exec /Library/Frameworks/Mono.framework/Versions/Current/bin/mono YourApp.exe

That is all you need, but you could spice that script up to probe for Mono being installed, and if not, offer for it to be installed. See how Monodevelop does it:

http://anonsvn.mono-project.com/viewvc/trunk/monodevelop/main/build/MacOSX/monodevelop?revision=148173&view=markup

Upvotes: 5

Jonatan Lind&#233;n
Jonatan Lind&#233;n

Reputation: 1485

See this question for a solution. Your users don't even have to have mono preinstalled.

Upvotes: 5

Related Questions