Creating a standalone eto.forms app

55 views
Skip to first unread message

Andrew Broughton

unread,
Jan 8, 2019, 11:28:35 PM1/8/19
to Eto.Forms
I've been able to create a simple app that works on Mac and PC using Eto.Forms (via the Eto add-on), but it requires mono to be installed on a destination Mac.

Is there a walkthrough (step by step) on how to create an Eto.Forms app that imbeds Xamarin or mono into the app? The instructions say to create a Xamarin.Mac app, change the app to "executable + gui", add the Nuget packages and so on, but once that's done, what's next? There's a ton of extra code in a Xamarin.Mac app and I don't know what to do to make it into an Eto.Forms app from there.

Thank you!

curtis

unread,
Jan 9, 2019, 11:27:51 AM1/9/19
to Eto.Forms
Hey Andrew,

To create a Xamarin.Mac app that runs without mono installed, check the "Include Xamarin.Mac project" when creating your app using the Eto add-on in VS 2017 or VS for Mac.

Then, compile "YourAptlyNamedApp.XamMac" on a Mac using VS for Mac (yes, you need a Mac).  You can distribute the .app and optionally generate a .pkg for users to install the app.  Take a look at project options > Mac build for options on what you can do.

As for creating a standalone .app on Windows or Linux, the develop branch of Eto.Forms (2.5) can use mkbundle to embed mono in the generated .app when compiling for Release mode, that is if mono is installed.  You can use the pre release nuget packages from the myget feed to try it out.

Hope this helps!
Curtis.

Andrew Broughton

unread,
Jan 9, 2019, 12:05:33 PM1/9/19
to Eto.Forms
Hi Curtis;

Thank you for the quick reply. Your answer is exactly what I thought the solution was. However, when I did that, the only .app created (under MyApp.desktop/bin/debug/net461still asks for mono when run on a clean machine that has nothing else installed. Is there another .app hidden somewhere that gets created?

I tried setting the XamMac project as the startup, and changing it's properties to executable + gui, that didn't work...


Note that when I ran the .app in the video, I was running it on my MacBook that has mono installed. When I try it on a clean Mac, it says that I need to install Mono.

curtis

unread,
Jan 9, 2019, 12:32:21 PM1/9/19
to Eto.Forms
Hey Andrew,

One thing to check is that you have the latest version of Xcode installed on your machine, and run it once to install its prerequisites (it should prompt you).  Also as a test, you can try creating a new project with Mac > Cocoa App, and running that.  If that works, there may be something wrong with the Eto addin or the xammac project it is creating.

When I try it on a clean Mac, it says that I need to install Mono.

Yes, this is expected for the .Desktop project, it only embeds mono when building with the .XamMac project.

Also, you shouldn't need to change the project properties to executable + gui (but it shouldn't hurt either).

Hope this helps!
Curtis.

Andrew Broughton

unread,
Jan 9, 2019, 12:52:10 PM1/9/19
to Eto.Forms
You were right (of course). I had never installed Xcode on this new machine. Once I installed it, the xammac app was created. Set the xammac project as startup, and away she went! Works fine on the clean machine.

Very happy when a solution is as simple as that.

Thank you so much for your support!

This is a simply amazing package that you (and others?) have put together. I really never imagined there would be a cross-platform forms creation system that didn't look like complete crap (GTK). Had given up waiting for Xamarin.Forms for Mac and finally stumbled across this clean, elegant solution that even allowed me to work in a way that is very similar to WinForms, which I've been working with for many many years. Thank you thank you thank you!!

curtis

unread,
Jan 10, 2019, 7:27:48 PM1/10/19
to Eto.Forms
Hey Andrew,

Great!  I'm glad it's working for you.  I've added a note to the Quick Start guide regarding Xcode to help others in the future.

Thanks for the kind words, I hope you find Eto.Forms useful!  I had the same issues with cross platform development when I first started this project, so I'm glad it is still relevant today.

Cheers!
Curtis.
Reply all
Reply to author
Forward
0 new messages