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
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