Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to include Mono Runtimes in OSX .app bundle?

Tags:

c#

macos

mono

I'm looking to work on an application that needs to run on both Windows and OSX. Since I'm already very familiar with C#/.NET I thought I would take a look at using Mono. But I also want it to very easy to install and don't want the users to have to install the Mono package separately. Is it possible to create an OS X .app bundle that simply includes EVERYTHING? That is, my app, resources and the complete Mono runtime?

like image 639
Adam Haile Avatar asked Apr 15 '09 13:04

Adam Haile


1 Answers

Yes, you can do this. Pick an app, any app, and Show Package Contents. Explore around a bit and you'll see that there's a Contents/MacOS directory inside. It will contain a file with the execute bit set. This can be machine code or any old script with a #! line at the beginning. All you need to do is duplicate the directory structure with a skeleton app, shove your Mono runtime into the Resources directory somewhere, and write a bash script that initializes everything. There may be automated utilities for doing this floating around somewhere, but it's pretty easy to do this manually.

I'd recommend using your favorite build tool to automate this process.

like image 90
Bob Aman Avatar answered Oct 05 '22 18:10

Bob Aman