23
votes

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?

With the release of RAD Studio XE2 in late 2011, Delphi developers should be able to build once and distribute on Win 32/64 and MacOS 32, with iOS support promised.

11
Just coming home from the Delphi XE2 World Tour presentation - Delphi for MacOS X and iOS is here, now, to be released in all likelihood within a month. Native Linux and Android applications to follow next year. Build the application with FireMonkey, the GPU-native GUI, and your applications can be cross-platform pretty much out of the box. You just need to leave the VCL behind.Misha

11 Answers

22
votes

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.

10
votes

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.

8
votes

This is a very old thread but for people browsing here and looking for an answer in Q3 of 2011 or later the answer is yes.

With the release of Rad Studio XE2 this year, Delphi Developers will be able to create native applications for Mac OS as well as Win32, Win64 and iOS more platforms coming soon.

4
votes

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.

4
votes

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.

3
votes

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.

2
votes

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.

1
votes

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.

1
votes

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