OSX .pkg installer sometimes does not install .app file

前端 未结 2 2079
臣服心动
臣服心动 2021-01-04 07:07

My Java application has a launcher which is a .app and a helper app which is bundled with it.

I am trying to make .pkg installer with a background image using the fo

2条回答
  •  春和景丽
    2021-01-04 07:34

    If you don't want to (or can't expect other users to) hunt down and delete all existing copies of the app as described by villintehaspam, or just really need the app not to be relocated, you can provide a Component Property List file with BundleIsRelocatable set to false.

    An easy way to create a valid version of the plist file is with pkgbuild --analyze; then you can edit the one property and use the file. E.g.:

    pkgbuild --root myapp.root --analyze myapp.plist
    /usr/libexec/PlistBuddy -c 'set :Dict:BundleIsRelocatable false' myapp.plist
    pkgbuild --root myapp.root --component-plist myapp.plist [...other options...] myapp.pkg
    

提交回复
热议问题