Search code examples
wpfmacoswine

WPF Application on Mac using WineBottler


The company i work for has a application developed in the 90's in Delphi for managing employees. Because the company has no delphi developers available i was assigned to develop it in C#/WPF using the mvvm pattern.

After 5 months of development, the .NET version had the same functionality as the old application, with less bugs and some nice additions. So i tagged the release, got it tested in my department and send it to the other departments in other locations....

And then i got a email from the CEO with the frightning question: How does this work on my MAC?

Apparently the product owner was forgotten to mention that only our department worked with Windows PC's and all other departments worked with Mac PC's. The old delphi application worked under Winebottler at these departments and the product owner thought this was no problem for the .NET application.

When you look at different websites, you can see it could work using Winebottler, but this is not guarenteed. And ofcourse after wrapping it in Whinebottler, it did not work. I have no MAC PC, so i need to send the code to a colleage in another department (and city) so he can bottle it and see if the changes work.

So my question is, what libraries/practices do I need to avoid when develop a application?

The following things i have researched:

  • It only works for 32bit applications
  • My version of .NET is supported (And included in the prefix)
  • Mono or .NET Core does not work because WPF are not supported in these applications.

The following practises i'm not sure if they could break Winebottler:

  • Using Environment.SpecialFolder
  • Starting processes with Process.Start()
  • Print with DymoPrinter labels
  • Wix Toolset Installer
  • MySQL.Data (MySql .NET Connector)
  • Nlog

So my question is, is there somewhere best practices to develop a .net application for winebottler and libraries/functionality to avoid?

Or else, tips to make my application to work on Mac.


Solution

  • How about GTK#?

    The Gtk# installer for the .NET Framework gives .NET developers all of the pieces they need to build and run Gtk#-based applications, the same set of libraries that are used to build Unix applications on Mono.

    http://www.mono-project.com/docs/gui/gtksharp/installer-for-net-framework/