Following a post I made on the MWF official blog site, and the helpful and prompt response I got, I have an SWF mono app running on OS X.
It turns out that there are a few environment variables that need to exist in order for the correct code path to run within the MWF libraries so that the OS X Carbon libraries are used. There is a very cool little tool called macpack that allows you to package your mono asseblies into an OS X .app bundle. You can specify what type of application it is too, Cocoa# based or SWF. This little beauty comes as standard in 1.1.4.
It basically creates a bundle directory structure ( Resources, MacOS etc ), creates the info.plist file and creates a shell script that is the executable referenced by the info.plist file. Normal OS X application bundle, and there is a good article here about bundles and how to create them
It is responsible for setting up the relevant OS X specific environment and then launching your exe assembly using the mono loader.
It would have be nice if this information was sort of available from the get go on the mono-project site but I eventually got pointed in the right direction.
The OS X stuff in WMF is still in alpha according to one site I visited, and still has dependencies on X11 libraries being present, but not actually having to be running in the background which is a little more palatable.
If you are looking for a completely native looking managed OS X application in mono, then I can't recomment Cocoa# highly enough. It's an amazing system, and very clean and logical to use, and now that the libraries come with the 1.1.4 mono installer for OS X, getting your applications to run on other peoples macs is a no-brainer. No more having to include them in the Resources area in your application bundle as the dylibs are installed in Mono.framework and the Apple.*.dll assemblies are strong named and in the GAC where they belong. Also, it's now possible to create custom NSViews in Cocoa# as a bug that was preventing them from init'ing is now squashed.
I will be writing some tutorials on how to program OS X applications in Mono using Cocoa# in the coming weeks, and I hope I can do a good enough job to be of some help to others.
It turns out that there are a few environment variables that need to exist in order for the correct code path to run within the MWF libraries so that the OS X Carbon libraries are used. There is a very cool little tool called macpack that allows you to package your mono asseblies into an OS X .app bundle. You can specify what type of application it is too, Cocoa# based or SWF. This little beauty comes as standard in 1.1.4.
It basically creates a bundle directory structure ( Resources, MacOS etc ), creates the info.plist file and creates a shell script that is the executable referenced by the info.plist file. Normal OS X application bundle, and there is a good article here about bundles and how to create them
It is responsible for setting up the relevant OS X specific environment and then launching your exe assembly using the mono loader.
It would have be nice if this information was sort of available from the get go on the mono-project site but I eventually got pointed in the right direction.
The OS X stuff in WMF is still in alpha according to one site I visited, and still has dependencies on X11 libraries being present, but not actually having to be running in the background which is a little more palatable.
If you are looking for a completely native looking managed OS X application in mono, then I can't recomment Cocoa# highly enough. It's an amazing system, and very clean and logical to use, and now that the libraries come with the 1.1.4 mono installer for OS X, getting your applications to run on other peoples macs is a no-brainer. No more having to include them in the Resources area in your application bundle as the dylibs are installed in Mono.framework and the Apple.*.dll assemblies are strong named and in the GAC where they belong. Also, it's now possible to create custom NSViews in Cocoa# as a bug that was preventing them from init'ing is now squashed.
I will be writing some tutorials on how to program OS X applications in Mono using Cocoa# in the coming weeks, and I hope I can do a good enough job to be of some help to others.
Comments