Macdeployqt on installed servers

I am trying to deploy an application using macdeployqt. All Qt frameworks are correctly copied to the application package. The problem I am facing is that macdeployqt does not have write permissions for the copied frameworks that are originally located in / usr / local / lib. This is because I installed qt with homebrew, which seems to install everything that is readable. My question is if there is a better way to fix this problem and then manually change all qt library permissions inside / usr / local / lib so that I can use macdeployqt from the qt.pro project. (I don't want to use macdeployqt manually with sudo or such)

The reason why I ask is because I use many third-party libraries in the project (they are copied normally, etc.), which I need to update frequently with homebrew and, therefore, I need to redo their permissive change.

Thanks in advance!

+6
qt homebrew deployment bundle macos
source share
1 answer

Just in case, someone will find this old post looking for information about macdeployqt:

Use a script to do macdeployqt, preferring to write macdeployqt commands in your .pro file. This will allow you to change file permissions on the fly.

Here is the [snippet] from the script that I use for one of my applications:

https://bugreports.qt-project.org/browse/QTBUG-23268

If you are running Windows and do not have bash, you can use perl or python. The above script modifies files on the fly to get around the error - you can put whatever you want here, including changing file permissions.

Using a script also means that you have the ability to add commands later to sign code, packaging, or whatever you need.

The Qt.pro scripting language "actually generates Makefile commands under the hood and can be rather obscure if you want to perform deployment tasks that relate to paths and file sets.

You also need to create an additional goal or include it in the build target - in any case, the build process becomes more complex and more error prone.

Disclaimer: I worked on Qt for 8 years as a senior engineer for Nokia / Trolltech, and also published a commercial cross-platform application using Qt.

+1
source share

All Articles