我当前的工作目录(CWD)中有以下目录结构:
MyAppBundle / MyApp.app
MyAppBundle.plist
MyAppBundle.plist包含以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>BundleHasStrictIdentifier</key>
<true/>
<key>BundleIsRelocatable</key>
<true/>
<key>BundleIsVersionChecked</key>
<true/>
<key>BundleOverwriteAction</key>
<string>upgrade</string>
<key>RootRelativeBundlePath</key>
<string>MyApp.app</string>
</dict>
</array>
</plist>
当我从CWD运行以下命令时:
pkgbuild --root ./MyAppBundle --component-plist 'MyAppBundle.plist' MyApp.pkg
...我得到以下输出:
pkgbuild: Reading components from MyAppBundle.plist
pkgbuild: Adding component at MyApp.app
pkgbuild: error: (null)
答案 0 :(得分:1)
好的,我已经弄明白了。如果我将--identifier <unique identifier>
添加到上面的pkgbuild
命令,则可以正常工作。