[Mono-winforms-list] Does X11 support imply Mac OSX support?
Baker, GJ (Gareth)
G.J.Baker@dl.ac.uk
Fri, 24 Sep 2004 11:36:04 +0100
Perhaps I should share my experiences with trying to get the Managed Windows
Forms running under X11 on Mac OSX....
There are a number of hurdles I had to clear just to get an X11 window up
(and there is still and exeption being thrown).
1) As Peter suggests I had to add a couple of lines to the 'config' file in
<prefix>/etc/mono:
<dllmap dll="libX11.so" target="/usr/X11R6/lib/libX11.dylib"/>
<dllmap dll="MonoPosixHelper"
target="/Library/Frameworks/Mono.framework/Versions/Current/lib/libMonoPosix
Helper.dylib"/>
note that I had to use the full path. I can't seem to find the right
environment variable (DYLIB_LIBRARY_PATH is set).
2) The 1.1.1 package for OSX does not include the libraries requied to get
Cairo and libgdiplus installed, so you need to install things like libpng,
freetype, fontconfig, expat (& lingif, libtiff, libjpeg if you want full
graphics support) and then cairo and libgdiplus.
3) Finally I had to hack a file in libgdiplus to get it to compile.The file
gdip_win32.h contains:
#ifdef __GNUC__
# define __stdcall __attribute__((__stdcall__))
#else
# define __stdcall
#endif
I had to reduce this to:
# define __stdcall
to get it to compile (something to do with __stdcall__ on OSX).
As I said, up to this point I can get an X11 window to appear but trying to
draw a string in it throws an exception:
Exception 'An exception was thrown by the type initializer for
System.Drawing.GDIPlus
at System.Object..ctor ()
at System.Drawing.Graphics.FromHwnd ()
at System.Drawing.Graphics.FromHwnd ()
at System.Windows.Forms.XplatUIX11.PaintEventStart ()
at System.Windows.Forms.XplatUI.PaintEventStart ()
at System.Windows.Forms.Control.WndProc ()
at System.Windows.Forms.ScrollableControl.WndProc ()
at System.Windows.Forms.ContainerControl.WndProc ()
at System.Windows.Forms.Form.WndProc ()
at System.Windows.Forms.Control+ControlNativeWindow.WndProc ()
at System.Windows.Forms.NativeWindow.WndProc ()'
An exception was thrown by the type initializer for System.Drawing.GDIPlus
at System.Object..ctor ()
at System.Drawing.Graphics.FromHwnd ()
at System.Drawing.Graphics.FromHwnd ()
at System.Windows.Forms.XplatUIX11.PaintEventStart ()
at System.Windows.Forms.XplatUI.PaintEventStart ()
at System.Windows.Fo!
rms.Control.WndProc ()
at System.Windows.Forms.ScrollableControl.WndProc ()
at System.Windows.Forms.ContainerControl.WndProc ()
at System.Windows.Forms.Form.WndProc ()
at System.Windows.Forms.Control+ControlNativeWindow.WndProc ()
at System.Windows.Forms.NativeWindow.WndProc ()
Hope this is of some help. If I get any further I'll post the results.
Regards
Gareth Baker
> ----------
> From: Peter Dennis Bartok
> Sent: Wednesday, September 22, 2004 11:41 PM
> To: mono-winforms-list@lists.ximian.com
> Subject: Re: [Mono-winforms-list] Does X11 support imply Mac OSX
> support?
>
> I'll quote from my status update:
>
> "The X11 driver has only been used/tested on Linux, due to lack of time
> and
> resources we haven't done anything on Solaris or Mac yet, maybe someone
> who
> reads this will feel compelled to volunteer :-)"
>
> In other words - we're not working on Mac support, due to lack of time and
> resources. I looked into it a bit, but I just can't find the time. If you
> would like to volunteer, I will be delighted as I would love to have Mac
> support. As for how to implement it, via X11 or natively, that is up to
> the
> implementor. AFAIK, it should be possible to run SWF as is on the Mac
> today,
> assuming that the DLL mapping tables are set up properly. (I remember
> hearing/reading something about needing translation from .so to .dylib or
> so)
>
> Hope this helps clarify things
>
> Cheers,
> Peter
>
>
> -----Original Message-----
> From: "Paul Murphy" <pmurphy@dimensional.com>
> To: <mono-winforms-list@lists.ximian.com>
> Date: 22 September, 2004 16:28
> Subject: [Mono-winforms-list] Does X11 support imply Mac OSX support?
>
>
> >Hello,
> >
> >I see that SWF currently has drivers for Win32 and X11. I also see in
> >the latest status update that Mac OSX is something that is on the "to
> >do" list. Does this mean that native OSX support is on the todo list,
> >or does it mean that X11 on Mac is on the todo list?
> >
> >Thanks,
> >Paul
> >_______________________________________________
> >Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
> >http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> >
> >
>
> _______________________________________________
> Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>