如何为Mac OSX部署FireMonkey应用程序? [英] How to deploy a FireMonkey Application for Mac OSX?

查看:238
本文介绍了如何为Mac OSX部署FireMonkey应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用PAServer在Mac OSX上运行FireMonkey应用程序。但现在,我想部署应用程序Mac OS(类似Windows下的MSI)。如何做到这一点?

解决方案

你将会想了解更多关于应用程序包



使用Delphi通过PAServer创建和部署的应用程序包



由于您使用的是PAServer,您会发现它已经为您创建了一个应用程序包。通过PAServer运行程序后,请查看Mac上的以下文件夹中的应用程序包:


/ Users / [username] / Applications / Embarcadero / PAServer / scratch-dir / [profilename]


如果您的项目名为Project1,您将看到一个应用程序捆绑在该文件夹中名为Project1。



如果您阅读上述wiki文章,您将知道Project1具有.app的隐藏扩展名,整个事情真的是一个包含所有必需文件的文件夹来运行应用程序。



直接在Mac上运行此应用程序包。如果它抱怨丢失的dylibs,例如libmidas.dylib,只需将它们从PAServer文件夹复制到应用程序包的MacOS文件夹中。



对于Mac OS用户,应用程序软件包显示为单个程序文件,并附有图标。用户可以双击应用程序包来运行应用程序,将其拖动到其底座等。



更改图标



默认情况下,应用程序包将具有Delphi图标,但您可以用自己的图标替换它。在Mac上,只需右键单击Finder中的应用程序包,然后选择显示包内容。在那里,查看.icns文件的Contents / Resources文件夹。



使用 Icon Composer 应用程序,用于从现有映像文件创建.icns图标文件。



在包内窥视



在其余的内容中窥视内部。您将看到所需的dylib,您的程序文件和Info.plist文件,它是一个包含应用程序ID,签名和其他重要内容的文本文件。



有关部署的更多信息



如果您的应用程序可以自包含在应用程序包中,则标准方法是将应用程序包放在磁盘映像.dmg文件中,允许用户将应用程序删除应用程序文件夹。



如果您的应用程序需要安装其他文件,库,数据库或框架等,则应创建一个包。您可以使用 PackageMaker 进行这个。一个包类似于您提到的Windows上的msi安装程序。



当用户双击包时,它由安装程序。它具有向导样式界面,并通过安装应用程序来向用户展示。您也可以使用代码签名证书签署包裹。



如果您要将应用程序包包含在应用商店中,则需要标志。您还需要沙箱


沙盒和Mac App Store - 2011年11月2日



绝大多数Mac用户已经免费从恶意软件,我们是
从事技术,以帮助保持这种方式。截至2012年3月1日,
所有提交给Mac App Store的应用都必须实施沙盒。
沙盒您的应用程序是一个伟大的方式来保护系统和用户
限制了应用程序可以访问的资源,并使恶意软件
更容易损害用户的系统。了解更多
访问应用沙箱页面。



I can run a FireMonkey Application on Mac OSX with PAServer. But now, I would like to deploy the application Mac OS (something like MSI under Windows). How can I do this?

解决方案

You'll want to read more about Application Bundles.

Using the application bundle that Delphi creates and deploys via PAServer

Since you're using the PAServer, you'll find that it has already created an application bundle for you. After you run the program via the PAServer, look in the following folder on the Mac for the application bundle:

/Users/[username]/Applications/Embarcadero/PAServer/scratch-dir/[profilename]

If your project is named Project1, you'll see an application bundle in that folder named Project1.

If you read the above wiki article, you'll know that Project1 has a "hidden" extension of .app, and the whole thing is really a folder with all of the required files to run the application.

Go ahead and run this application bundle directly on the Mac. If it complains about missing dylibs, such as libmidas.dylib, simply copy them from the PAServer folder into the application bundle's MacOS folder.

To the Mac OS user, the application bundle appears as a single program file, complete with an icon. The user can double-click the application bundle to run the application, drag it to their dock, etc.

Changing the icon

The application bundle will have the Delphi icon by default, but you can replace it with your own icon. On the Mac, simply right-click on the application bundle in Finder, and select Show Package Contents. In there, look in the Contents/Resources folder for the .icns file.

Use the Icon Composer application that was installed with XCode to create your .icns icon file from existing image files.

Peeking inside the bundle

Peek around inside at the rest of the contents. You'll see the required dylib, your program file, and the Info.plist file, which is a text file with things like application IDs, signatures, and other important things.

More about deployment

If your application can be self contained in an app bundle, the standard method is to put the application bundle inside a disk image .dmg file, which allows the user to drop the application into the applications folder.

If your application requires the installation of additional files, libraries, databases, or frameworks, etc., you should create a package. You can utilize PackageMaker to do this. A package is similar to the "msi" installer on Windows that you mention.

When the user double-clicks the package, it's run by Installer. It has a wizard style interface and walks the user through installing the application. You can also sign the package with your code signing certificate.

If you want to include your application bundle in the app store, you'll need to sign it. You'll also need to sandbox it.

Sandboxing and the Mac App Store - Nov 2, 2011

The vast majority of Mac users have been free from malware and we're working on technologies to help keep it that way. As of March 1, 2012 all apps submitted to the Mac App Store must implement sandboxing. Sandboxing your app is a great way to protect systems and users by limiting the resources apps can access and making it more difficult for malicious software to compromise users' systems. Learn more by visiting the App Sandbox page.

这篇关于如何为Mac OSX部署FireMonkey应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆