Reputation: 103
I am testing the command "productbuild" to archive my application bundle CEMHapp. The idea is to submit the built .pkg file to Mac App Store. At the moment, I am having the following problem:
When I try to run the basic command:
productbuild --component "CEMHapp.app" /Applications CEMHapp.pkg
I get the following error message:
productbuild: error: The component at "CEMHapp.app" is not a bundle.
I also tried the command "pkgbuild", i.e.
pkgbuild --component CEMHapp.app --version 1 --install-location /Applications CEMHapp.pkg
But the following error appears
pkgbuild: Adding component at /Users/wilsondasilva/Desktop/Aplk/CEMHapp.app
pkgbuild: error: Path "/Users/wilsondasilva/Desktop/Aplk/CEMHapp.app" is not a valid bundle component (using destination path "/Users/wilsondasilva/Desktop/Aplk")
The strange thing is that the CEMHapp.app file works runs like a charm, so I do not understand why the system gives me the above presented error. Can anybody shed light on this topic and give me some guidance?
The CEMHapp is a open-source free application that was developed using QtCreator and Python. The bundle (CEMHapp.app) was created using pyinstaller and can be downloaded at http://concrete.fsv.cvut.cz/~wilson/Software/CEMHapp_v.1.0_MacOSX_10.9.2.dmg
Best regards and thanks in advance, W.
Upvotes: 2
Views: 2376
Reputation: 103
I guess I found a solution for one of the problems, which partially answers my question.
I changed some parts of the command pkgbuild and the CEMHapp.pkg file was successfully created.
Here is the command I used:
pkgbuild --identifier com.CEMHapp.pkg.app --install-location /Applications --root /Users/wilsondasilva/Desktop/Aplk CEMHapp.pkg
after the process is finished, the message in terminal reads
pkgbuild: Wrote package to CEMHapp.pkg
I installed the CEMHapp.pkg and it worked. Nonetheless, the .icns file that was related to the CEMHapp was somehow lost and replaced with the default icon file. Also, a copy of CEMHapp.pkg (with Zero-bytes) appeared in /Applications. Does anybody have a clue on what is wrong?
Furthermore, I still do not know how to use the productbuild properly. Like pkgbuild, it always works when I use the argument --root, but the same is not true when using --component, see error message below:
pkgbuild --identifier com.CEMHapp.pkg.app --install-location /Applications --component /Users/wilsondasilva/Desktop/Aplk CEMHapp.pkg
pkgbuild: Adding component at /Users/wilsondasilva/Desktop/Aplk
pkgbuild: error: Path "/Users/wilsondasilva/Desktop/Aplk" is not a valid bundle component (using destination path "/Users/wilsondasilva/Desktop")
Remember that according to Mac Developer's Library,
"When creating product archives for submission to the Mac App Store, use only the --component mode of productbuild. The other modes will create product archives that are compatible with the OS X Installer, but are not necessarily acceptable for the Mac App Store."
Cheers, W.
Upvotes: 2