I have an OSX application built with Qt. It is codesigned, packaged up to fit macstore and has been approved by apple and it is ready for sale in the mac store.
Though after installing it, it is installed into the location where it was residing during the packaging process instead of /Applications.
Alternatively I'm creating a .dmg package of the file, which I can install into /Applications.
At the end of the build procedure I'm running these commands:
codesign --force --deep --verify MyApp.app/ --entitlements ${INSTDIR}/Entitlements.plist -s "3rd Party Mac Developer Application: Company Name"
productbuild --component MyApp.app /Applications --sign "3rd Party Mac Developer Installer: Company Name" MyApp.pkg
The result of which is the pkg, which I'm attempting to install via installer:
$ sudo installer -store -pkg MyApp.pkg -target /
installer: Note: running installer as an admin user (instead of root) gives better Mac App Store fidelity
installer: MyApp.pkg has valid signature for submission: 3rd Party Mac Developer Installer: Company Name (key)
installer: Installation Check: Passed
installer: Volume Check: Passed
installer: Bundle com.CompanyName.MyApp will be relocated to /Users/peti/dev/build/bin/Mac/release/MyApp.app
installer: Starting install
installer: Install 0.0% complete
installer: Install 17.1% complete
installer: Install 96.4% complete
installer: Install 100.0% complete
installer: Finished install
Right after productbuild the relocation was saying /Applications, but it didn't install it there!! On a subsequent run it will say the incorrect path. I've also tried installing from different locations.
I've also tried installing the app from Mac Store which does the same... It goes into the incorrect path.
I've used:
pkgutil --expand
To extract the package. PackageInfo file says this:
<pkg-info overwrite-permissions="true" relocatable="false" identifier="com.CompanyName.MyApp" postinstall-action="none" version="3.0.0" format-version="2" generator-version="InstallCmds-502 (14F1605)" install-location="/Applications" auth="root" preserve-xattr="true">
Any ideas what could be going wrong? I've tried to google for solutions, but no luck. Where could this incorrect path be stored? I don't see the path embedded into any file before productbuild. Is productbuild doing something weird?
.dmg
is a disk image, not a package, but you can certainly store a.pkg
on it. – Wendacd /Applications
and execute the productbuild command. After that move the .app and created .pkg out of there (if the pkg was saved there) and then try running the installer. – Wendadrwxr-xr-x+ 3 root wheel 102 Apr 13 2015 TextEdit.app/
– Crossbreeddrwxr-xr-x
user staff (my system uses that). If the app launches after it installs then you should be good to go I would think :) Some of my applications in /Applications do have root wheel set though too. All installer packages require authorization from the user before installing anyway, so it's essentially up to you. Since you're creating an AppStore app I would archive and have it just install in /Applications, then run productbuild. – Wendamv MyApp.app /Applications
. Trying tocp -r
an app bundle will likely screw things up. – Wenda