[Interest] [Qt-interest] Latest on Mac App Store + sandboxing?

NoRulez norulez at me.com
Mon Feb 13 23:48:39 CET 2012


I tried it also this way, but i want to be able to generate packages on a build server, so in my case the command line tools are simpler ;-)

I had made a mistake in the example (point 2) in the last mail, here are "all" steps copied from my project

So, let's say the bundle indentifier in this example is called BUNDLE (bundle.app) and the project PROJECT

The APPLICATION_CERTIFICATE and INSTALLER_CERTIFICATE are the certificates which you have installed from http://developer.apple.com.
APPLICATION_CERTIFICATE is something like "3rd Party Mac Developer Application: YOUR NAME"
INSTALLER_CERTIFICATE is something like "3rd Party Mac Developer Installer: YOUR NAME"

I use the following steps (Maybe you can handle this in a qmake's project file (*.pro) as a post build process, I use CMake as the build system so that way it is easier for me):

1.) macdeployqt BUNDLE
2.) remove unnecessary directories and files (plugins, frameworks and so on)
3.) unlock the keychain (/usr/bin/security unlock-keychain $HOME/Library/Keychains/login.keychain)
4.) Sign all frameworks (/usr/bin/codesign --force --verbose --verify --sign "APPLICATION_CERTIFICATE" BUNDLE/Contents/Frameworks/QtGui.framework/Versions/4/QtGui)
5.) Sign all plugins (/usr/bin/codesign --force --verbose --verify --sign "APPLICATION_CERTIFICATE" BUNDLE/Contents/PlugIns/imageformats/libqgif.dylib)
6.) Sign the application bundle (/usr/bin/codesign --force --verbose --verify --sign "APPLICATION_CERTIFICATE" BUNDLE)
7.) Run productbuild (/usr/bin/productbuild --component "BUNDLE" /Applications --sign "INSTALLER_CERTIFICATE" --product "BUNDLE/Contents/Info.plist" PROJECT.pkg)
8.) Try it with the installer (/usr/sbin/installer -store -pkg PROJECT.pkg -target /)

That's it

Best Regards
NoRulez

Am 13. Feb 2012 um 23:22 schrieb Paul Miller <paul at fxtech.com>:

> On 2/13/2012 4:14 PM, norulez at me.com wrote:
> > Hi,
> >
> > I had also troubles with this after lion comes out last year.
> > In short words... You must use codesign for each file which is in your bundle, except for frameworks (see point 1)
> >
> > 1.) use codesign for all your frameworks (e.g. Bundle/Contents/Frameworks/QtGui.framework)
> > 2.) use codesign for all your plugins (e.g. Bundle/Contents/PlugIns/imageformats/libqgif.dylib)
> > 3.) use codesign with the entitlements file on your bundle
> > 4.) run productbuild
> > 5.) test the created package with the installer
> >
> > I hope this helps
>
> Yes - that stuff makes sense (and I'm glad there is a manual way to sign
> the Qt frameworks). However, I've always just used Build+Archive and the
> Organizer to do this stuff. Can you outline how I would replace those
> steps with manual codesign and productbuild commands?
>
> Cheers!
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120213/eb9f364e/attachment.html>


More information about the Interest mailing list