macos - 如何禁止在我的 OS X 安装程序包中选择备用卷?

标签 macos installation package productbuild pkgbuild

我正在为 OS X 整理一个安装程序包,但我不知道如何禁用询问用户要安装到哪个卷的屏幕。我希望它安装到 /没有提示。

这是我构建包的方式:

pkgbuild --root build/staging/ --identifier xxxx --scripts InstallerOSX/resources/ --scripts InstallerOSX/scripts/ ${OBJROOT}/AgentPayload.pkg

productbuild --distribution InstallerOSX/distribution.dist --package-path ${OBJROOT} --resources InstallerOSX/resources/ ${BUILT_PRODUCTS_DIR}/AgentInstaller.pkg

这是我的 distribution file :

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <title>xxxx</title>
    <background file="background.png" mime-type="image/png" scaling="tofit"/>
    <pkg-ref id="xxxx"/>
    <options customize="never" require-scripts="false"/>
    <choices-outline>
        <line choice="xxxx"/>
    </choices-outline>
    <choice id="xxxx" title="title" description="desc">
        <pkg-ref id="xxxx"/>
    </choice>
    <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
    <pkg-ref id="xxxx" version="0" onConclusion="none">AgentPayload.pkg</pkg-ref>
</installer-gui-script>

<domains>元素似乎无法解决问题...

最佳答案

我最终将以下内容添加到分发定义中:

<options rootVolumeOnly="true"/>

rootVolumeOnly 已弃用,但目前可以使用,而 domains 似乎不行。

关于macos - 如何禁止在我的 OS X 安装程序包中选择备用卷?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14074866/

相关文章:

macos - 使 Mac Popover 出现在应用程序区域内

c - ubuntu 中的警告返回值为 'fscanf'

package - 如何理解 Common Lisp 包的行为?

macos - Quicktime 音频 channel 分配 - 左、右、左前、LFE 等

macos - Nginx + PHP-FPM 在 Mountain Lion 上非常慢

asp.net - Visual Studio 2015 下载在应用 Microsoft ASP.net 时遇到困难

linux - 在 Linux 上将 Google Plugin for Eclipse 安装到/opt 时出错

java - 以编程方式选择要参加哪个类(class)包

r - 库/软件包开发-加载时的消息

swift - 在 NSCollectionViewDiffableDataSource 中追加部分