[Mono-osx] MonoMac CreateMacInstaller - Packaging error

Duane Wandless duane at wandless.net
Mon Mar 14 17:21:25 EDT 2011


That is not the intent of the "Create Mac Installer" option.... to create a
WinForm app.  It is intended to run a MonoMac application which uses Cocoa
bindings.  To do a WinForm app you might want to look at this:
https://github.com/Clancey/MonoMac.Windows.Form

If you are creating something new then you should just use MonoMac and
Interface Builder to create your UI.

Best of luck.
Duane


On Fri, Mar 11, 2011 at 3:22 AM, Zsolt Molnar <zsolt at traderklub.com> wrote:

> 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
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110314/ac1d7dbc/attachment.html 


More information about the Mono-osx mailing list