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?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
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.
It is possible, with quite a bit of hacking and some toolchain fun to compile a .NET app statically targeted for the Mac OS platform, no need to deploy mono with it. Check out this website talking about how Mono is being used statically in some iPhone apps.
http://arstechnica.com/open-source/news/2009/01/open-source-mono-framework-brings-c-to-iphone-and-wii.ars
Another great resource is the #mono channel on irc.gnome.org or irc.gimp.net (http://mono-project.com/IRC)