how to use the macdeployqt -codesign option with Qt 5.4.1

4.1k views Asked by At

According to this Qt blog post:

The -deep option signs the app bundle recursively, including contained frameworks. While convenient to use, –deep is documented for “emergency repairs and temporary adjustments only“. As of Qt 5.4 macdeployqt has a -codesign option that recursively signs the app bundle without using –deep.

But on the Qt documentation page Qt for OS X - Deployment, the list of supported options for macdeployqt (at the bottom of the page) does not include -codesign.

So, does macdeployqt have a -codesign option for Qt 5.4.1? If so, how do I use it?

1

There are 1 answers

0
TheDarkKnight On BEST ANSWER

As the blog post references this code: -

macdeployqt foo.app -codesign=MyCertificate

It does appear that it does support the -codesign option for Qt5.4 and looks like they've not updated the docs accordingly.

To see the options for the tool, type the following in a Terminal window: -

macdeployqt --help

You shoud see that one of the options listed is

-codesign= : Run codesing with the given identity on all executables

Assuming you have an appropriate certificate in your keychain and are using Qt 5.4.x, then you should be able to codesign with the -codesign option

macdeployqt foo.app -codesign=MyCertificate

Where MyCertificate is the name of the signing certificate in your keychain