问题
I see so many questions and posts asking about this, and almost everywhere I see the op
being asked to refer to http://doc.qt.io/qt-5/osx-deployment.html
But the problem for someone who is new to Qt is difficult to understand there how to generate the dmg file.
Let's not go in depth of having external libraries, plugins etc in a project.
If we create a totally new QWidget program, without a single line of code, the default project that just shows a window, then how will someone generate the dmg file.
If we do macdeployqt yourProjectName.app -dmg
inside the debug build
folder, without doing anything then it will of course create dmg file but it fails to open and now if you try to run the default project then will face this error :
This application failed to start because it could not find or load
the Qt platform plugin "cocoa"
in "".
Available platform plugins are: cocoa.
Reinstalling the application may fix this problem.
The program has unexpectedly finished.
So, what is the process of generating a dmg file for a Qt application?
Edit : Detailed discussion in here : https://forum.qt.io/topic/82746/creating-dmg-for-qt-app-mac-osx
来源:https://stackoverflow.com/questions/45858376/creating-dmg-for-qt-app-mac-osx