RAD Studio XE2 –mac开发图解

本文提供了一步一步的指导,帮助您安装和配置Delphi XE2在Mac上进行开发,包括安装PAServer、设置远程配置以及部署应用到MacOSX。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.simonjstuart.com/2011/09/03/rad-studio-xe2-setting-it-up-for-a-mac-step-by-step-illustrated-guide/

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:

  1. You’ve installed Delphi (or RAD Studio) XE2 on a Windows 64bit system
  2. 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 development machine

  • Open Windows Explorer (Flag+E)
  • Go toC:\Program Files (x86)\Embarcadero\RAD Studio\9.0\PAServer
  • Copysetup_paserver.zipover 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!
  • Runsetup_paserver.exe(IMPORTANT NOTE:Should either thesetup_paserver.ziporsetup_paserver.exefiles be missing, you should contact Embarcadero support as something has gone wrong with your XE2 installation!)
PAServer Windows Setup (Step 1)

PAServer Windows Setup (Step 1)

  • PressOK
PAServer Setup Windows (Step 2)

PAServer Windows Setup (Step 2)

  • PressNext
PAServer Windows Setup (Step 3)

PAServer Windows Setup (Step 3)

  • Select “I accept the terms of the License Agreement” and pressNext
PAServer Windows Setup (Step 4)

PAServer Windows Setup (Step 4)

  • PressNext
PAServer Windows Setup (Step 5)

PAServer Windows Setup (Step 5)

  • PressInstall
PAServer Windows Setup (Step 6)

PAServer Windows Setup (Step 6)

  • Wait for the process to finish (could be anything from a minute or longer)
PAServer Windows Setup (Step 7)

PAServer Windows Setup (Step 7)

  • PressDone

On your MacOSX deployment/debugging machine

  • InFinder, locate the Folder into which you placedsetup_paserver.zip, andDouble-Clickon the zip file.
PAServer MacOSX Setup (Step 1)

PAServer MacOSX Setup (Step 1)

  • Double-Clickon the file namedsetup_paserver(noting the absence of.zip) to begin the PAServer setup on your MacOSX system.
PAServer Mac Setup (Step 2)

PAServer Mac Setup (Step 2)

  • PressOK
PAServer Mac Setup (Step 3)

PAServer Mac Setup (Step 3)

  • PressNext
PAServer Mac Setup (Step 4)

PAServer Mac Setup (Step 4)

  • Select “I accept the terms of the License Agreement” and pressNext
PAServer Mac Setup (Step 5)

PAServer Mac Setup (Step 5)

  • PressNext(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!)
PAServer Mac Setup (Step 6)

PAServer Mac Setup (Step 6)

  • PressInstall(Remember: the installation process can take anything from a few seconds to several minutes)
PAServer Mac Setup (Step 7)

PAServer Mac Setup (Step 7)

  • PressDone
  • Go back toFinder, and navigate to “/Users/%username%/Applications/Embarcadero/PAServer” (substitute%username%for your MacOSX account username)
PAServer Mac Setup (Step 8)

PAServer Mac Setup (Step 8)

  • To run PAServer on your Mac (which is necessary to deploy and debug Delphi applications for the OSX platform), you can simplyDouble-Clickon thepaserverApplication file
PAServer Mac Setup (Step 9)

PAServer Mac Setup (Step 9)

  • Simplyenter a good passwordand press theEnter/Return Key

You can also create a Desktop/Dock shortcut to thepaserverapplication 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 haveFinderopen in the “/Users/%username%/Applications/Embarcadero/PAServer” folder…
  • Bring upContext Menu(by doingControl+Click) on thepaserver.commandfile
  • Go toOpen Withand clickTextEdit
PAServer Autorun At Startup/Login (Step 1-3)

PAServer Autorun At Startup/Login (Step 1-3)

  • 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!
PAServer Autorun At Startup/Login (Step 4)

PAServer Autorun At Startup/Login (Step 4)

  • Save the file(usingCommand+S) and thenQuitTextExit
  • OpenSystem Preferences, selectUsers & Groups, then press theLogin Itemsbutton.
  • Press the+button to add a new item to your login group
  • Locate “/Users/%username%/Applications/Embarcadero/PAServer/paserver.command” and pressAdd.
  • Tick the box (in theHidecolumn) corresponding to your paserver.command entry
PAServer Autorun At Startup/Login (Step 5)

PAServer Autorun At Startup/Login (Step 5)

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 theProject Manager, you will need toRight-ClickonTarget Platforms, clickAdd Platform, and selectOS Xfrom the list, followed by clickingOK
  • Right-click on theOS Xentry underTarget Platformson theProject Managerand clickAssign Remote Profile
  • ClickAdd…
  • EnterProfile name
XE2 MacOSX FireMonkey Application Deployment (Step 1)

XE2 MacOSX FireMonkey Application Deployment (Step 1)

  • ClickNext >>
  • Enter theHost name(or IP Address) of your MacOSX machine, and yourPasswordas specified for PAServer on your Mac.
XE2 MacOSX FireMonkey Application Deployment (Step 2)

XE2 MacOSX FireMonkey Application Deployment (Step 2)

  • You may useTest Connectionto ensure that your details are correct
  • ClickNext >>, followed byFinish
  • Select your new Remote Profile from the list (e.g.My Mac Deviceas per the screenshot for Step 1) and clickOK

That’s it! Your profile will be used for all MacOSX deployments by default (unless you specify a different profile for specific projects). PressingF9will deploy your application to your MacOSX machine (presuming you have selected theOS Xentry inTarget Platformson theProject 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…

FireMonkey 3D GUI Demo on OSX Lion

FireMonkey 3D GUI Demo on OSX Lion

You can find the official PAServer documentation on Embarcadero’s Documentation Wiki.

Delphi XE2注册机!~ Delphi XE 2新功能: 1. VCL Style 如果你对Web编程很熟,VCL Style就是delphi版的css,想像一下只要换一个style,所有的按钮菜单表格都换了新的颜色和风格,十分酷。XE2中自带了预定义的几种Style,用户可以添加新的并且和其他人分享。 2. 64Bit Support 大部分人可能用不到,可对少数用大内存的程序应该就非常有用了。 3. FireMonkey 这个可能是本次升级最具亮点的东西了,会上发的笔记本上说这是下一代的业务程序平台(The Next Generation Business Application Platform)。简单来说,FireMonkey是一个新的架构,和VCL是平级的,而且是跨平台的,目前支持Win32,Win64,Mac OS, iOS. 听起来有点像Java或者.Net的意思,不过FireMonkey侧重的是图像图像方面的应用,比如HD和3D,整个实现是基于GPU的Open GL接口。会上演示了3D版本的程序,类似Mac的图片浏览器,光影处理等等。因为界面是矢量图形的,可以任意放大等等。 可以看出这个技术是颇具雄心的,它不再像VCL一样调用Windows的API,每个Button和Label都是重新实现,实时绘制的。因为不用Windows API,切换平台只要重新编译一下就可以了。同时也支持1中的Style技术。可以预见在图像处理和游戏领域,特别是平板电脑上有所作为。 4. Data Snap 简单说就是Server可以了给指定客户端发消息了 5. Fast Report集成 Fast Report是我用过最好用的报表组件了,单买也得200刀,新版中已经集成了 6. Live Binding 动态绑定 同样你如果熟悉ASP.NET这个就很容易理解,就是所有的组件属性都可以动态的和数据源绑定。类似以前的Data-Aware组件,现在所有的组件都具备这个能力了,而且不限于此。比如你可以将button的width属性绑定到数据源。 7. 移动平台的支持 会上很多关于iOS和Android的内容,特别是Rad PHP程序可以直接编译发布到iPhone,iPad或者Android设备,未来可能会增加对BlackBerry的支持。 8. Cloud支持 主要针对Amazon和MS的云平台,国内估计还没有开始普及 另外,会上很多白头发,鲜见年轻面孔,有三分之一的人竟然用过delphi 1. 国内的delphi用户群应该好一点,但也应该都不年轻了。技术虽好,用户群还是很重要。我想Embarcadero应该想更多的办法吸引学生,比如对学生推出免费版本等等。对老用户而言,如果还在用旧版本,是时候升级到新版了。当然了,公司有能力的话请买正版。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值