tags:

views:

1412

answers:

9

I am responsible for a Delphi/Win32 project management application. I have just completed a move to Delphi 2009.

More and more US based users want to use the application on their Mac computers, while the majority are Windows users.

Are there solutions out there to easily build a Delphi app that will natively run on MacOS?

+14  A: 

Mac OS X doesn't run Windows programs. It doesn't provide any of the API you'd need, such as the functions in kernel32, user32, etc.

You could try running your program via Crossover. Other options include virtual machines, such as VMware Fusion and Parallels.

Another thing you might try is to use .Net. Convert your program to use the .Net version of Delphi and then run it on Mono on the Mac. I wouldn't put a lot of confidence in this method, though.

Rob Kennedy
+15  A: 

You might try Lazarus: http://www.lazarus.freepascal.org/
http://wiki.lazarus.freepascal.org/index.php/OS_X_Programming_Tips

Best Regards

Sestrem
+2  A: 

I listened in on one of the recent Delphi 2009 show-off conference calls and they said that it was possible to run on a Mac using Delphi Prism and there is an automatic conversion utility called Oxidizer. I'm not sure if you'd call that native since you'd need Mono, but I think it's better than Wine.

Peter Turner
Small correction: RemObjects Oxygene is the previous name of the Prism compiler, the conversion tool is called Oxidizer. The Prism implementation of Delphi's RTL is called ShineOn.
Paul-Jan
+1: Prism definatly does do the Delphi on the Mac thing via Cocoa!
Robert MacLean
+6  A: 

Your options to run native Delphi code on OSX are pretty limited. You can use Lazarus/Freepascal but that is a long way behind Delphi. It will produce native code.

Alternately you can use Prism and Mono. That apparently works well. Have a look at http://devcenter.remobjects.com/osx or http://wiki.remobjects.com/. Also, check out the remobjects blogs, and the embarcadero.public.delphiprism.mono.osx newsgroup.

That needs the mono redistributable. However mono also supports linking and ahead of time compilation so you might be able to get something close to native code on it.

In either case, you will need to rewrite your ui as the osx look and feel and conventions are different.

SeanX
+1 on the last sentence alone. Everybody who sees this question as mostly a compiler and library problem is in for a world of hurt.
mghie
A: 

There's not really a good solution for this. Someone mentioned Lazurus, but it's not "there" yet. Delphi is just not a cross-platform tool. If you really want a Mac version then you probably ought to look at alternatives.

If your app is consumer-based, your users will expect lots of Cocoa goodness. Using anything else to make a Mac app will make them cranky.

However if it's more of a business app, then that's usually less important. I use REALbasic to build lots of Mac/Windows business applications. It's very similar to Delphi so it should be easy to pick up.

Paul Lefebvre
I don't know about REALbasic, but +1 for the other points.
mghie
-1 for not answering the question and also stating Delphi is not cross platform in the face of things like Prism existing
Robert MacLean
I did answer the question. My answer was "No." Just because it exists, doesn't mean Delphi Prism is a good solution for this.
Paul Lefebvre
Robert: Whether or not Delphi = Delphi Prism depends on your perspective. I'd personally say no, because of the many ways it's not source-compatible with classic Delphi code. http://prismwiki.codegear.com/en/Win32_Delphi_vs._Delphi_Prism
Mason Wheeler
I didn't even consider Delphi.NET so.
Marco van de Voort
+3  A: 

There may be some hope for the future for Delphi and the Mac.

The Podcast at Delphi.Org reviewed the closing keynote at CodeRage III (Dec 2008) when Embarcadero’s Wayne Williams talked about the Future. It said this:

I think the most exciting part of Wayne’s talk was the slide marked “The Future” which listed some of the company wide research initiatives underway. It specifically listed Mac, Linux, Cloud, Application Virtualization, FireBird, Touch, 64bit, SMP and Multi-core. When I asked about a Delphi for Mac and Linux they said that today, with Delphi Prism and Mono you could reach Mac and Linux, but in their labs they were working on native support, and that they had a significant head start.

lkessler
+2  A: 

Another alternative would be to develop a web based application. This avoids the "gui is different" problem and allows you to focus on your product. If you look at some of the latest AJAX controls, you can get pretty close to a full desktop application experience without having to sacrifice much. If your application needs to run locally, then developing a local web service in Delphi and translating it to Lazarus specifically targeting OSX seems to me to be a much easier and manageable task.

skamradt
A: 

Hello, We have released a new product for creating cross platform apps (Mac OSX) using Delphi/Free Pascal. have a look at http://twinforms.com/

+1  A: 

While the Lazarus route is not a no brainer recompile, I've good experiences with it. I tried the (Delphi).NET+mono way before (to WinCE, Linux and OS X), and failed miserably.

Codegear talks a lot, but the next Delphi version will only have a PREVIEW of 64-bit (cmdline compiler). If you assume the version after that is the full 64-bit product, you can be sure that OS X is at the earliest 2 years away.

Lazarus or recoding.