I cannot deploy Qt framwork on Mac.
-
You have to tell macdeployqt that you want to sign your application bundle.
-
@ostrichking371 Hi,
macdeployqt will work for simple apps, most of the heavy lifting.
As you progress and start including 3rd party libraries, it will not be sufficient any more. Do yourself a favour and learn to work with codesign and friends from the start. That would be also beneficial should you try to port your code to run on multiple Apple platforms or experiment with the AppStore - macdeployqt is not very flexible when working with codesign.
What worked for me is I wrote myself shell script handling deployment (calling macdeployqt and other tools) with parameters etc. A bit of work but once done is just a single call from the terminal to have signed installation package for the destination of my choice...Having said all that, Apple didn't create the most user friendly dev environment but it's manageable, just lots of learning from the start.
-
See the macdeployqt documentation and the
-codesign
option. -
@ostrichking371 how do I link a Apple developer account so macdeployqt knows what sign to use? Again… I am new to c++ building and development.
-
@ostrichking371 It has nothing to do with C++. You need to create an account in apple developer console, create yourself appropriate certificates, import them to your wallet (I usually import whole bunch to Xcode too). Then you can use them with tools.
It should all be described in the Apple Developer documentation linked above. -
@ostrichking371 that's identity defined by your developer certificate for a given action type (certificates come in a few flavours: Mac development, distribution, etc.). As I wrote above, you'd need at least Mac Developer one, probably distribution - should you pack your program into dmg; probably more. Please familiarise yourself with Apple development process.
Just a note: for the purpose of using Qt on Mac, developing and running your software from Qt (macOS) or a simulator or associated developer device (iOS, iPadOS, etc) you should not need any certificates. Those come in handy just when you try to run your code independently or submit to AppStore. -
@artwaw that’s why I’m wondering. The error I posted at the top was on my own MacBook, the same one I deployed with. I don’t have an Apple developer subscription but I shouldn’t need one only my own laptop right? It works to just run an exe, but the bundle that includes the libraries gives this error.
-
I am writing these posts from my Mac, on which I am actively programming with Qt and never ever have I had the need to sign anything that I run from Qt Creator, also no need for deployment steps. If, however, you run standalone app package - yes, you need to do both.
I am unable to say how does CLion come into the equation as I never used it.