tags:

views:

3457

answers:

7

I sell a C#/WPF application (targeting .net 3.0 at the moment) and people keep asking me for a Mac version.

The application is a time tracking application with a good GUI, there isn't that much business logic in a time tracking application so most of the application is GUI - rewriting just the GUI is equivalent to rewriting the entire application

I don't have the resources to rewrite the application or maintain two different code bases, so I need a way to run the same code on a Mac (I know I'll have to debug and modify the code, what I mean is I can support only one code base, I can't split the project into different Mac and Windows projects - I just don't have the time to work on two projects).

Porting the application to a cross-platform UI library, to a different programing language or to Silverlight are all not relevant - it will take too much time and I think I'll get more sales by investing this time in new features.

Does anyone know of a tool that can run or port C#/WPF to the Mac?

+7  A: 

There's absolutely no way you can run full-fledged WPF app on Mac. I'm not even sure if this is possible in Parallels. The best thing you can do is to use Silverlight, which was previously named "WPF/E" and does run on Macintosh.

Anton Gogolev
A: 

It cannot be done. But since your UI is in WPF, what you could do is transform XAML into something else - like GTK# for example. Of course, if you're like me and use lots of .NET 3.5 functionality, that won't help you much.

One more reason to keep your UI in plain, simplistic XML to start with.

Dmitri Nesteruk
A: 

You want a new feature (support a entire different platform) and you wish to put no effort in it. Sorry, most of the time that will not work.

Besides the most basic (native) .NET stuff with mono, I do not think you can run a WPF application natively on MacOSX.

If you think you can make more money by gaining Mac users. You might consider using other presentation methods. Due to your current 'investment' I'd say try Silverlight (yes, I read your rant about not doing so). Another option could be Adobe AIR / Flex.

If you port your application this way. You can maintain a single codebase.. one that runs on both platforms.

If you wish to spend more time on new features in your current codebase: ignore the Mac users.

Rick
+3  A: 

We were in a similar situation. We had a working Windows project and wanted a Mac version.

Our product was in two parts, one a .Net application, the other a Director projector app.

The Director app should be easy right, cross platform and all? Well nope, it rarely is that easy, we ended up with two versions of the Director source file.

Getting the .Net app running required using Mono for the underlying engine, which worked well for us as we were only number crunching byte arrays really. The UI on the otherhand we had to rewrite in Cocoa. It cost us nearly as much as making the Windows version did, as we also had to learn all the Mac stuff as we went.

Since then we've only updated the Windows version.

Iain M Norman
+1  A: 

We had a similar issue. We wrote a Mac version in Silverlight 3 (which supports quite alot of WPF .NET stuff). It was sandboxed but if this isn't a problem, you can do some nice stuff. Our codebase is now on WPF and Silverlight 3 and is the same, when we compile it produces the SL3 and Desktop apps.

Thanks, this sounds like a good possibility (silverlight 3 didn't exist when I asked the question), do you use the same xaml and cs files on both platforms?
Nir
A: 

I can't understand how people are brainwashed that Mono is somehow a cross-platform .NET Framework, if basic WPF GUI stuff don't work on platforms other than M$ windoze.

eponymous
A: 

Actually, there's a CrossOver for you. Other people who answer view from programmer's point. IF I were you, I'll install CrossOver then install .NET 3.5 inside CrossOver and happily run the WPF software.

http://www.codeweavers.com/products/cxmac/

or if you prefer a free (but more difficult) solution, try wine.

http://davidbaumgold.com/tutorials/wine-mac/

VOX
This is a good idea from the customer point of view - I don't know if my software runs under CrossOver but I know some people run my software under Parallels -- but -- from a software vendor point of view (especially with inexpensive software) I can't just install CrossOver on my customer's computer (especially when CrossOver Pro is more expensive than my software)
Nir
Humm yea. :D then try Wine. http://davidbaumgold.com/tutorials/wine-mac/
VOX
Just want to clarify difference between Parallels/VMWare and Wine/CrossOver. Parallels or VMWare is a virtual hardware emulators that can boot Windows. They emulate hardware. Which you need to boot Windows (require Windows license too) and then run your software on emulated hardware that is running windows. Wine/Cross over is about something that rewrote Windows environment on Mac/Linux. It gave your program everything your program expect from a Windows OS. And your program runs at native speed without needing to boot Windows nor require it's license.
VOX