Have now used pkgbuild/productbuild to create a product archive, consisting of three packages (application, uninstaller, KEXT), that according to installer installs fine, no errors.
The KEXT is correctly placed in /Library/Extensions and postinstall script loads it nicely.
But my applications are not moved to the /Applications/Company/ folder. The folder is created, but the applications are not placed there.
The process of doing the component plist + distribution XML is so utterly simple so I just cannot fathom what the h*ll can go wrong ?
The package can be "installed" via Pacifist, albeit then the postinstall script is not executed.
Analyze phase (application resides in ./pkgbuild/app_path/ folder):
pkgbuild --analyze --root "./pkgbuild/app_path/" app.plist
pkgbuild --root "./pkgbuild/app_path/" \ --component-plist ./app.plist \ --install-location "/Applications/Company/" \ --identifier "com.company.myapp.pkg" \ --version "1.0" \ app.pkg
Then the product archive, step 1:
productbuild --synthesize --package app.pkg distribution.xml
distribution.xml is then modified with correct background image, license, etc.
productbuild --distribution ./distribution.xml output.pkg
(I omitted the KEXT package as that works perfectly)
When installing "output.pkg", folder /Applications/Company/ is created but is empty.
SOLVED (see Grahams answer below):
By setting BundleIsRelocatable in the component plist files to false, the applications are put into the correct place.
Viewing the installer log, the application got "relocated" to where my Xcode project built the app, but still create the /Application/Company folder. A "slightly" peculiar behaviour I would say.
OSX version is 10.11.1.
app.pkgthe expected size after calling
app.pkgwork when installed on its own?