I've created a SampleApp.app file from XCode 7.1 and converted it to pkg file and signed it using the product build command and it worked fine. But now the problem is, when I install the pkg the app does not start automatically after installation. Do I need to include any other arguments in my command to make this work? Below is the command that I use to create and sign the pkg.
productbuild --component SampleApp.app /Applications SampleApp.pkg
productsign --sign "Developer ID Installer: xxxxx" SampleApp.pkg SampleApp_signed.pkg
EDIT
I've also tried to add a postinstall script but that didnt seem to work, I'm not sure if its the problem with my script or command
pkgbuild --root SampleApp.app --identifier com.companyname.SampleApp --scripts startup.sh --install-location /Applications/SampleApp.app SampleApp.pkg
productsign --sign "Developer ID Installer: xxxxx" SampleApp.pkg SampleApp_signed.pkg
My startup.sh file
#!/bin/bash
open -a /Applications/SampleApp.app
exit 0
$ pkgbuild --root Helper.app --scripts "/Users/santanu/Documents/Adobe Flash Builder 4.7/SVNBranch/Helper/build/Scripts" --install-location /Applications/Helper.app newBoot.pkg
. Following were my output -pkgbuild: Inferring bundle components from contents of Helper.app. pkgbuild: Adding component at Contents/Frameworks/Adobe AIR.framework. pkgbuild: Wrote package to newBoot.pkg
- but these never starts postinstall script that I attached. – Joinvillepkgutil --expand newBoot.pkg expandedFolder
and I confirm I had postinstall.sh file inside it's Scripts folder. – Joinvillepreinstall
orpostinstall
. 2. Applychmod 755
andchmod a+x
to the file, 3. No need to mention absolute path inpkgBuild
command but point the folder containingpostinstall
script for--scripts
field. Finally I received "Adding top-level postinstall script" result in my packaging. – Joinville