3

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

これが私の配布ファイルです

<?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>トリックをしていないようです...

4

3 に答える 3

2

結局、ディストリビューション定義に以下を追加しました。

<options rootVolumeOnly="true"/>

rootVolumeOnlyは非推奨ですが、今のところは機能しますが、そうでdomainsはないようです。

于 2012-12-31T22:44:33.463 に答える
1

UIが最適ではないため、ドメインアプローチの使用は機能しないようです。[インストール場所の変更...]ボタンは引き続き表示されますが、クリックすると、[このコンピューターのすべてのユーザーにインストールする]オプションのみが有効になります。

于 2013-07-19T17:20:58.643 に答える
1

2019アップデート:

<options rootVolumeOnly="true"/>それでも正常に動作し、インストール中に宛先選択オプションをスキップします。

は非推奨であるため、Distribution.xmlの次のオプションは同じ動作をし、宛先rootVolumeOnlyもスキップします。

<domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
于 2019-06-13T12:23:44.210 に答える