PackageMaker的“在包中包含根"是什么?选项实际上在做什么? [英] What does PackageMaker's "Include root in package" option actually do?

查看:125
本文介绍了PackageMaker的“在包中包含根"是什么?选项实际上在做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为OS X应用程序安装程序,但是在了解PackageMaker的UI时遇到了麻烦.我的PackageMaker版本是3.0.4,可与Lion和Xcode 4.1一起运行.

I'm making an installer for an OS X application, but have trouble understanding PackageMaker's UI. My version of PackageMaker is 3.0.4, running along Lion and Xcode 4.1.

一个选项特别让我感到困惑.编辑软件包内容时,它是在软件包中包含根目录"复选框.根据是否检查,我的软件包中的某些内容永远不会安装在任何地方.

One option in particular gets me confused. It's the "Include root in package" checkbox when editing the package's contents. Depending on whether it is checked, some of my package's contents are never installed anywhere.

例如,假设我的内容是一个.app捆绑包,Confused.app.我想将其安装到/Applications(目标).在这种情况下,在包中包含根"到底是什么意思?据我所知,如果不检查它,安装程序将完全不执行任何操作.

For example, let's say that my content is a single .app bundle, Confused.app. I want to install it to /Applications (the Destination). What exactly does "Include root in package" mean in this case? If it is left unchecked, the installer does absolutely nothing, as far as I can see.

是否有一个更好的示例案例可以阐明该选项的含义?

Is there a better example case that would clarify the option's meaning?

推荐答案

鉴于有效负载(即要安装的源项目)是Confused.app(可能包含Contents子文件夹以及Info.plist,MacOS和Resources)的情况,等等),安装目标为/Applications:

Given the case where the payload (i.e. source item to be installed) is Confused.app (which presumably contains a Contents subfolder with Info.plist, MacOS, Resources, etc inside that), and the install destination is /Applications:

  • 如果您选中在程序包中包含根目录"选项,它将执行您可能期望的操作,即将Confused.app安装到/Applications中.
  • 如果您未选中在软件包中包含根目录"选项,则会将Confused.app的内容安装到/Applications中-即,您将看到一个/Applications/Contents文件夹.这可能是没有选项的测试所做的.

禁用包括根目录.."的预期用法是,您将在构建计算机上创建代理应用程序文件夹,将其指定为有效负载源,然后将应用程序放置在该文件夹中.如果您要一次安装多个应用程序,或者将其安装到/Applications以外的地方(例如,创建代理根文件夹,创建Applications和Library/Application Support子文件夹并将安装目标设置为"/"),则此功能将更为有用.

The intended usage with "Include root.." disabled is that you'd create a proxy Applications folder on your build machine, designate that as the payload source, and place the app into that folder. This is more useful if you're installing multiple apps at once, or installing to places other than /Applications (i.e. make a proxy root folder, create Applications and Library/Application Support subfolders, and set the install destination as "/").

这篇关于PackageMaker的“在包中包含根"是什么?选项实际上在做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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