【问题标题】:How to distinguish OS X version in pkgbuild and productbuild如何区分 pkgbuild 和 productbuild 中的 OS X 版本
【发布时间】:2013-11-26 13:41:02
【问题描述】:

是否可以在安装 PKG 的过程中区分当前的 OS X 版本。 喜欢: 如果操作系统 >= 10.9.0 安装 pkg_for_mavericks.pgk else if

过去,使用旧的 PackageMaker,可以将要求映射到包,例如所需的大小、目标 OS X 版本等。

我没有找到任何使用命令行实用程序 pkgmaker 和 productbuild 样式创建新 PKG 文件的示例

有什么建议吗?

【问题讨论】:

    标签: macos osx-mavericks productbuild pkgbuild


    【解决方案1】:

    使用带有 --distribution 参数的 productbuild 构建包。 在分发文件中使用 'choice' 和 'selected' 参数,如下所示: selected="system.compareVersions(system.version.ProductVersion, '10.9') >=0" 分发文件的文档在这里:https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html

    【讨论】:

      猜你喜欢
      • 2023-02-17
      • 1970-01-01
      • 2013-08-25
      • 2013-08-17
      • 2013-03-17
      • 1970-01-01
      • 2014-12-20
      • 1970-01-01
      • 2012-12-21
      相关资源
      最近更新 更多