I'm attempting to deploy a Qt application in a portable manner, and I'm somewhat stuck on the plugins deployment, and the documentation isn't as clear as I was hoping.
At first, I started with macdeployqt, but I get the following message:
WARNING: Could not find any external Qt frameworks to deploy in "Utility.app"
WARNING: Perhaps macdeployqt was already used on "Utility.app" ?
WARNING: If so, you will need to rebuild "Utility.app" before trying again.
I checked versions, as suggested in Qt5 cannot find platform plugins Mac OS X, but I don't see any evidence that I'm having similar issues (versions).
So, I started working on doing things manually, and I managed to get things working on my computer after copying over the necessary frameworks (those pointed out by otool -L), and removing the LC_RPATH entry that pointed to my local Qt installation.
However, I'm having issues with the plugins: if I have no plugins bundled in the application, it works locally, but not on anyone else's machine. If I bundle libqcocoa.dylib in Utilities.app/Contents/plugins/platforms, then I get the following error:
This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".
Available platform plugins are: cocoa, minimal, offscreen.
Reinstalling the application may fix this problem.
Abort trap: 6
Particularly curious, since I did not copy the minimal or offscreen platform plugins...
I've also tried to set QT_QPA_PLATFORM_PLUGIN_PATH to "../plugins/platforms" in the build steps, but that doesn't seem to have any effect. I've also played with several different settings in the qt.conf file, to no avail.
I've been chasing several different solutions for this for a while now, but feel free to . Surely, I'm missing something.