[Mono-osx] MonoMac CreateMacInstaller - Packaging error

Zsolt Molnar zsolt at traderklub.com
Fri Mar 11 03:22:06 EST 2011


Hi Guys,

I'm trying to create a very simple WinForms project to get packaged to a Mac App that does not need the installation of the Mono Framework to be run on.

Using Mono Framework 2.10.1, MonoDevelop 2.4.2 with MonoMac development add-in 2.4.2.1, I create a new empty MonoMac Project.
I remove change the referenced assemblies to these:

System
System.Drawing
System.Windows.Forms

Next, I create a single empty cs file, and enter this code:

using System;
using System.Drawing;
using System.Windows.Forms;

namespace Test6
{
	public class Form1 : Form
	{
		public Form1 ()
		{
			this.Text="Hello world";
			this.Size=new Size(400,400);
		}
		
		public static void Main(string[] args)
		{
			Form1 f = new Form1();
			f.ShowDialog();
		}
	}
}


The code compiles and runs under MonoDevelop.

When I try to use Project/Create Mac Installer, I leave the "Include Mono in Application bundle" checkbox checked (the rest of the dialog box is disabled).
I get the following in the Packaging Output log:


Creating app bundle
Contents/Info.plist
Contents/PkgInfo

Merging Mono into app bundle
mmp -o "/tmp/monomac-build-634349986898190410" -n "Test7" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.Drawing.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.Windows.Forms.dll" "/Users/zsolt/Projects/Test7/Test7/bin/Debug/Test7.exe"
Process exited with code 1, command:
gcc -m32 /tmp/monomac-build-634349986898190410/Test7.app/Contents/MacOS/driver.m -o /tmp/monomac-build-634349986898190410/Test7.app/Contents/MacOS/Test7 -D_THREAD_SAFE -I/Library/Frameworks/Mono.framework/Versions/2.10.1/include/mono-2.0   /Library/Frameworks/Mono.framework/Versions/2.10.1/lib/libmono-2.0.a -framework AppKit -liconv

Upon examining the created files and directories, the MacOS directory is competely empty, MonoBundle seems to contain the packaged mono dll-s, the Resources directory contains libMonoPosixHelper.dylib and libgdiplus.dylib

The other annoying bug is that whenever I restart MonoDevelop, and re-load this same project, the Create Mac installer menu item is missing from the Project menu. Only if I create a very new empty project, and repeat the process, then the menu item reappears.



Please let me know what I'm doing wrong.

Thanks,

Zsolt Molnar











More information about the Mono-osx mailing list