With Delphi XE2 now available for everyone to enjoy, I figured it’s time I start providing some useful information to help you make the most of it!
One of the primary new features of XE2 is the ability to produce MacOSX applications, and to do that, there are additional steps you must take in order to prepare both your Windows development system, and your MacOSX deployment/testing system for this task.
This document makes the following assumptions:
- You’ve installed Delphi (or RAD Studio) XE2 on a Windows 64bit system
- You’ve installed Delphi (or RAD Studio) XE2 to the default paths
So you’ve just installed Delphi (or RAD Studio) XE2… congratulations and welcome to the new and exciting world of cross-platform Delphi development!
Still, you’re not quite ready to start deploying your applications to your MacOSX machine just yet! Fear not, however, as the remaining steps should take you just a few additional minutes and you’ll be good to go!
On your Windows 64bit deployment/testing machine
- Open Windows Explorer (Flag+E)
- Go to C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\PAServer on your Development system.
- Copy setup_paserver.zip over to your MacOSX device. You can do this any way you like: Share a folder on your PC and copy it from the Mac, place the file on a Mac-compatible USB flash drive and copy it that way…. whatever works best for you!
NOTE: The remaining steps in this section are only necessary if you’re running Delphi (or RAD Studio) XE2 on a 32bit system, and wish to deploy/debug 64bit Windows applications. If you’re developing on 64bit Windows, skip to the MacOSX section!
- Copy setup_paserver.exe to your 64bit Windows deployment/testing machine (again, via network or whatever method works best for you)
- Run setup_paserver.exe on your 64bit Windows deployment/testing machine (IMPORTANT NOTE: Should either the setup_paserver.zip or setup_paserver.exe files be missing, you should contact Embarcadero support as something has gone wrong with your XE2 installation!)
- Press OK
- Press Next
- Select “I accept the terms of the License Agreement” and press Next
- Press Next
- Press Install
- Wait for the process to finish (could be anything from a minute or longer)
- Press Done
On your MacOSX deployment/debugging machine
- In Finder, locate the Folder into which you placed setup_paserver.zip, and Double-Click on the zip file.
- Double-Click on the file named setup_paserver (noting the absence of .zip) to begin the PAServer setup on your MacOSX system.
- Press OK
- Press Next
- Select “I accept the terms of the License Agreement” and press Next
- Press Next (Note: This guide presumes that you’re installing PAServer on your MacOSX machine using the default location. If you elect to install to a different location, you will need to accommodate for that in future portions of this guide!)
- Press Install (Remember: the installation process can take anything from a few seconds to several minutes)
- Press Done
- Go back to Finder, and navigate to “/Users/%username%/Applications/Embarcadero/PAServer” (substitute %username% for your MacOSX account username)
- To run PAServer on your Mac (which is necessary to deploy and debug Delphi applications for the OSX platform), you can simply Double-Click on the paserver Application file
- Simply enter a good password and press the Enter/Return Key
You can also create a Desktop/Dock shortcut to the paserver application to make it easier to run on demand…. or, if you’re clever…..
Make PAServer start automatically on your Mac when you switch it on (or log in)
- Since you already have Finder open in the “/Users/%username%/Applications/Embarcadero/PAServer” folder…
- Bring up Context Menu (by doing Control+Click) on the paserver.command file
- Go to Open With and click TextEdit
- Modify the second line so that it resembles the following:
“/Users/%username%/Applications/Embarcadero/PAServer/paserver” -password=S0m3Gr8tP455w0rd
Including quotes, and remembering to substitute %username% with your MacOSX user account name! Essentially you’re just adding -password=… to the end of the line!
- Save the file (using Command+S) and then Quit TextExit
- Open System Preferences, select Users & Groups, then press the Login Items button.
- Press the + button to add a new item to your login group
- Locate “/Users/%username%/Applications/Embarcadero/PAServer/paserver.command” and press Add.
- Tick the box (in the Hide column) corresponding to your paserver.command entry
PAServer will now automatically start (and hide itself) whenever you log in to your Mac, eliminating the annoyance of forgetting to start it before attempting to deploy/debug a Delphi application to the OSX platform.
Deploying your first FireMonkey application to your MacOSX machine
- Open or create your FireMonkey project
- On the Project Manager, you will need to Right-Click on Target Platforms, click Add Platform, and select OS X from the list, followed by clicking OK
- Right-click on the OS X entry under Target Platforms on the Project Manager and click Assign Remote Profile
- Click Add…
- Enter Profile name
- Click Next >>
- Enter the Host name (or IP Address) of your MacOSX machine, and your Password as specified for PAServer on your Mac.
- You may use Test Connection to ensure that your details are correct
- Click Next >>, followed by Finish
- Select your new Remote Profile from the list (e.g. My Mac Device as per the screenshot for Step 1) and click OK
That’s it! Your profile will be used for all MacOSX deployments by default (unless you specify a different profile for specific projects). Pressing F9 will deploy your application to your MacOSX machine (presuming you have selected the OS X entry in Target Platforms on the Project Manager), and you’ll be able to debug your application from Delphi whilst it is running on your Mac!
Just because pictures speak louder than words…
You can find the official PAServer documentation on Embarcadero’s Documentation Wiki.























September 3, 2011 at 5:12 am
Hi,
nice tutorial.
however, you don’t need to run the pa_server.exe on your development machine. You need this, if your development machine is 32bit. then you install the pa-server on a 64bit machine to remote debug your win-64bit app.
September 3, 2011 at 10:03 am
You’re quite right, and that is quite a glaring omission on my part… I shall have to edit the article to reflect that!
September 3, 2011 at 7:58 am
Nice article. I didn’t have time to play with XE2 yet but I’m very interested to see that and try it for myself. I’m especially wondering about screen size and scrollbars between native win/mac and IPad or IPhone: does the interface scale to be exactly as designed ? Are scrollbars introduced over a certain form size ? Hopefully I’ll have time soon
On a side note, you might consider using 7capture for your Windows screen-shots as they are not as nice as the Mac ones: http://www.7capture.com
September 3, 2011 at 10:17 am
I haven’t played enough with FireMonkey on the Mac to answer those questions yet… best bet is to grab the trial (if you haven’t already) and give it a go yourself.
September 3, 2011 at 9:00 am
Everyone is showing that Delphi can do basic controls in MAC but what about the main thing, how does it do with Cocoa, is there any example how to use the OSX API or the iOS API, using the camera, the accelerometer, copying a file …
September 3, 2011 at 10:05 am
At this time, XE2 does not provide any Cocoa libs, however you should be able (theoretically at least) to produce your own Cocoa lib for Delphi if you really can’t live without it. Personally I don’t see the need for it!
September 3, 2011 at 3:23 pm
As I understand the Cocoa & CocoaTouch is the API for OS X and iOS, how can I access the device hardwares like camera and so or at least can you show me how I can copy a file using XE2 without using the Cocoa? I don’t see how you can’t see the need for it.
September 3, 2011 at 6:46 pm
I was of the belief that Cocoa was just the GUI/widgetset portion of MacOSX.
As regards demonstrating how to access things like the camera, I only have the Mac Mini (so no webcam built in). Personally I’m VERY new to MacOSX, let alone Delphi apps running on a Mac!
With that said, I’ve put a team together and we’re starting up an entirely new website devoted to providing tutorials, guides and demos for Delphi (focusing heavily on XE2 and cross-platform). In the mean-time, I’d suggest StackOverflow would be the best bet for solving specific problems.
September 3, 2011 at 6:52 pm
Thank you.
September 3, 2011 at 6:59 pm
You’re welcome
September 3, 2011 at 9:45 pm
If you’re new to OS X and iOS development, you may find this series of short articles of value:
http://web.me.com/macpgmr/ObjP/Xcode4/ObjP_Intro.html
Thanks.
-Phil
September 3, 2011 at 9:41 pm
Yikes. See XE2 wiki:
http://docwiki.embarcadero.com/RADStudio/en/Mac_OS_X_Application_Development#Mac_Objective-C_Frameworks
“Cocoa” includes AppKit and Foundation frameworks, both of which are available.
One glaring omission is no Webkit framework – this provides Webview class, which can be used for Web browsing as well as rich text editing.
Thanks.
-Phil
September 3, 2011 at 10:18 pm
Funny you should mention WebKit….
I haven’t announced yet but I’ve been developing a WebKit library for Delphi (Win32, Win64, OSX) for the last several months! It’s been slow going (particularly WebKit on Windows, which is a freaking nightmare), but I suppose I could always just open the project up and let everyone chip in!
September 3, 2011 at 10:41 pm
In iOS, UIWebView is part of the core UIKit framework, but in OS X, WebView is in its own WebKit framework. I think this indicates its increasing importance. Still, for it to be missing from the OS X units is quite odd – this is one of the first frameworks after AppKit and Foundation that programmers often use since it also support rich text editing.
Embarc has made a good start with these dozen or so frameworks, although there’s about 60 more or so and if you need one of the others, nothing else will do.
Despite what the XE2 wiki says, several of these are not ObjC frameworks, but just plain C libraries. I haven’t looked at the header files for all of them, but I would guess that’s the case for most of the frameworks that have “Core” in the name.
What I can’t find is any information about which of the 39 frameworks in iOS 4.3 are available. Unfortunately I don’t have XE2 so I can’t determine this for myself. But the almost complete lack of information about iOS development with XE2 is pretty breathtaking.
Thanks.
-Phil
September 3, 2011 at 10:47 pm
That’s a very good question… and yes, I totally agree that the documentation from EMB is sorely lacking! Since I have access to do so, I’m going to start contributing heavily to the XE2 wikidoc!
As per the question, I’m going to send a few e-mails and see what I can find out in terms of assembling a “comprehensive list” of what is and is not available in terms of libs/apis/frameworks!
September 3, 2011 at 9:07 am
Hi! Good article, but why you install paserver on win? IMHO-no need for this, only Mac should run PAServer))
September 3, 2011 at 10:04 am
Yes, I’ve made an error in this article…. you only need to install PAServer for Windows if you’re developing on a 32bit system, and want to remotely debug 64bit applications on a different machine! About to edit the article to reflect this info
September 3, 2011 at 1:49 pm
Hi , i followed all the steps , but i’m not able to run my app on MAC , when i take a look the PAServer * in terminal windows in MAC * i see this msg :
Starting Platform Assistant Server on port 64211.
>listen
listen
Process Control Server Started pid 34283 exe built Aug 23 2011
sentinelFun 34287
dyld: Library not loaded: @rpath/libcgunwind.1.0.dylib
Referenced from /User/mac/Applications/Embarcadero/PAServer/scatch-dir/randy-my mac device/Project1.app/Contents/MacOS/Project1
Reason: image not found
So please is there any step i missed ? and how to fix this .
many thanks
September 3, 2011 at 1:56 pm
Since I cannot replicate this issue (I’m presuming it might have something to do with OSX Leopard/Snow Leopard, but genuinely don’t know) I recommend you follow the discussion here: http://stackoverflow.com/questions/7271317/delphi-xe2-firemonkey-sample-app-not-running-on-a-mac
September 3, 2011 at 3:07 pm
I have the same problem as Randy. Which version on MacOSX do you use ?
I have a macbook pro with MAcOSX 10.5.8
Thanks
September 3, 2011 at 6:44 pm
I’m running MacOSX Lion (10.7 I think that is)
You guys should get a hold of Embarcadero Support to see if they have any pointers for you!
September 9, 2011 at 9:58 pm
The support for Mac OS X requires 10.6+. !0.5.x (Leopard) is not supported. See http://dn.embarcadero.com/article/41513
September 3, 2011 at 4:34 pm
Nice work. Looks like a good entry to submit to the Delphi Doc Wiki.
September 4, 2011 at 3:49 pm
Hi RBS and Randy, the problem is in the icon. It is not available. If you specify another icon for the app it will build and run
Pingback: Esmamuljed Delphi XE2 Win32/64/OS X …nice ! « Ingmar Tammeväli
September 8, 2011 at 5:31 pm
Thanks Simon! This is very helpful.
September 8, 2011 at 6:25 pm
No worries! I’ll type up the next illustrated guide for XE2 tonight
Pingback: Delphi XE2(Delphi 2012)的 Lite 系列下载 | 愚人笔记|www.foolcode.com
Pingback: 03/09/11 | Новости FireMonkey
September 15, 2011 at 4:05 pm
I’ve setup the paserver on my OSX seem’s all right.
And the “hello world” compiled succefull,
But I got this message in my IDE’s output window:
—-output window—————————————————————————–
Project “C:\Users\gxy\Documents\RAD Studio\Projects\Project3.dproj” (Deploy target(s)):
Target _DeployFiles:
c:\program files\embarcadero\rad studio\9.0\bin\CodeGear.Deployment.targets : warning : Local file “” not found. Skipping deployment.
Done building target “_DeployFiles” in project “Project3.dproj”.
Done building project “Project3.dproj”.
Build succeeded.
c:\program files\embarcadero\rad studio\9.0\bin\CodeGear.Deployment.targets : warning : Local file “” not found. Skipping deployment.
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.00
——————————————————————————————
Then I got the message in a popup dialog with a big red cross:
———message in dialog box—————————————-
Unable to lunch process on ’192.168.0.177′ using the parameters from the ‘mba’ profile.
The following error was returned:’Could find program, ‘/users/gxy/Applications/Embarcadero/Paserver/…
——————————————————————————-
Anybody help?
October 23, 2011 at 2:02 am
Are there any issues that might occur if I use a Mac mini running Lion OSX Server as opposed to the standard Lion OSX ?
October 23, 2011 at 2:23 am
I haven’t the foggiest! You’ll have to try it out and see, but there’s no reason I can think of that Lion Server shouldn’t work!
Pingback: Compilation sous Mac OSX | FireMonkey.fr
Pingback: Compilation on Mac OSX | DelphiOnFire.com
November 29, 2011 at 12:33 pm
Dang it. Good guide, regrettably the paserver application does not work for me, because I appear to be running an older version of Mac OSX. I’m running 10.5.8 and it seems I need 10.6 or 10.7, according to the Firemonkey Datasheet (http://www.embarcadero.com/images/FireMonkey_datasheet.pdf). I guess I’m going to have to upgrade
December 14, 2011 at 11:03 pm
Don’t go through a lot of work to make FireMonkey work, as it still lacks basic functionality on the Mac, for example, there is no print function at all, and Embarcadero has no prediction of when it might exist. Unfortunately, if you expect FireMonkey to work as advertised, as being a fast way to generate applications for both platforms, at least for now you will be disappointed, as the increasing frustration on the developer forum shows.
December 14, 2011 at 11:30 pm
They say every journey starts with a single step! Even as an Embarcadero Technology Partner, I’m going to honestly say I think the marketing team has not been so up-front about FireMonkey’s readiness.
Is it ready to start experimenting with and planning for? Yes, it is!
Is it ready to commit your resources (developers) to converting your existing projects over to, with the promise of absolute stability and performant suitability? At this moment, I say no…. but it will be in the not-so-distant future!
Once MonkeyGroomer (for VCL) is available, however, the overhead on experimenting with existing projects being migrated from VCL to FireMonkey will certainly be low enough that we’ll all be able to at least BEGIN PREPARING for it!
January 15, 2012 at 4:09 am
Using FM to build Delphi apps that will port over to OS X makes sense. Doing such a conversion for a quick-and-dirty port potentially reduces your time-to-market significantly. However, I don’t know many folks who use only the basic Delphi components, and avoid the ones that are Windows-specific. If you look at any decent app, it’s got TListViews, TTreeViews, and all sorts of library calls to file-system stuff that won’t convert over easily. Not to mention all of the various third-party component libs.
(I’m a big fan of Raize Components, and I use them instead of the basic Delphi components in virtually every app I create. I like them because they expose just enough extra stuff that I usually want, without overloading me with tons of things I’ll never use — like what TMS tends to do. That said, almost every long-time Delphi developer I’ve met seems to have his/her own favorite library that they use whenever they can. Some libs are built on the same TCustomXxxx layers as common Delphi components, while others are rebuilt from the ground-up. Either way, the fact that so many component vendors are hanging back and “studying the market” before deciding what to do as far as FM support goes, well … it makes me a bit nervous. FM right now is like what the components were like in Delphi 1. There’s a ways to go before FM is going to be really viable for both Windows and OS X apps.)
As far as iOS goes, I think porting existing Delphi apps over is not very smart. I’ve been reading a couple of books on designing for the iPad, and I’m leaning increasingly in the direction that simply porting a typical Delphi app over to iOS is not going to result in a very interesting app, especially for small-screen devices like iPhones and iPods.
Even with iPads, the layouts of common Windows idioms like menus and toolbars aren’t well-designed for use with fingers as pointing devices. The navigation mechanisms need to be completely re-designed for best results. And from what I can tell after using my iPad for a few months, even pop-up dialog boxes and overlaid forms that are commonly used in Windows apps don’t “feel right” in the iPad environment.
February 4, 2012 at 12:43 am
“Available to everyone”?! Have you not seen the price they put on it? Ouch!
February 4, 2012 at 7:35 am
Well, there’s that!
February 15, 2012 at 3:27 pm
Great, wonderful guide, thanks very much.
February 26, 2012 at 2:58 pm
is it possibile to deploy apps on iPad 2 ? I’ve it since 1 week and I’m not familiar with OsX can anyone help me ?
best regards
February 26, 2012 at 3:12 pm
Yes, you can develop iPad 2 apps with XE2. Personally I’m the last person to ask about this subject as I not only don’t develop for iOS, I don’t own any iOS devices at all.
February 29, 2012 at 2:30 pm
I installed without problems.
Thanks a lot.
February 29, 2012 at 2:42 pm
Simon a question, i tried run a simple form with a sqlconnection, and got the error:
[DCC Fatal Error] Unit1.pas(8): F1026 File not found: ‘Data.DBXMSSQL.dcu’ (unit scope “Data” indicates Win64, OSX32, Win32 only)
Do I need transfer all dcu to macOS? if yes, what it is the path?
February 29, 2012 at 2:56 pm
I have not encountered this issue. Presumably this is occuring on compile…
What platform are you building for? Presumably OSX, but I want to be sure.
The error suggests that Delphi’s Search Paths/Library Paths are incorrect. You can check these in Tools > Options > Delphi Options > Library > Selected Platform = “OS X”
March 13, 2012 at 4:52 am
Can one run XE under Parallels and target the OSX on the host machine rather than hitting an external Mac?
March 13, 2012 at 10:37 am
Yes, this can be done in almost exactly the same way…. except with XE2 running in the VM and targeting the host’s IP.