LoginSignup
11
9

More than 5 years have passed since last update.

pkgbuildでインストーラ(.pkg)作ったけどあれ上手くアプリがインストールされないなーって時にはBundleIsRelocatableがfalseになっているかチェックしましょう

Posted at

まとめ

BundleIsRelocatable = trueとなっているcomponent plistを使ってインストーラを作成すると、インストール先にoverwriteすべきappがない場合に新規にアプリがインストールされないみたい。

はまった…orz

すでにインストールした.appをコピーして、同じappをインストールするインストーラを作成しようとすると、pkgbuild --analyzeで作ったplistにはBundleIsRelocatable = true が書き出される様子。

英語つらいけど、本家のマニュアル読みましょう…
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pkgbuild.1.html

以下、plistのプロパティ一覧を引用

Key Description
RootRelativeBundlePath Path to bundle relative to the destination root (string)
BundleIsRelocatable Install bundle over previous version if moved by user? (bool)
BundleIsVersionChecked Don't install bundle if newer version on disk? (bool)
BundleHasStrictIdentifier Require identical bundle identifiers at install path? (bool)
BundleOverwriteAction How to treat existing on-disk version of bundle (string)
BundlePreInstallScriptPath Relative path to bundle-specific preinstall script
BundlePostInstallScriptPath Relative path to bundle-specific postinstall script
ChildBundles Bundles under this bundle (array of dictionaries)

参考

Mac用Installerの作り方

11
9
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
9