Skip to content

Instantly share code, notes, and snippets.

@AlbertoCasasOrtiz
Created October 15, 2020 01:11
Show Gist options
  • Save AlbertoCasasOrtiz/b243e83b8a361677f0d8cdf9a0d2bd44 to your computer and use it in GitHub Desktop.
Save AlbertoCasasOrtiz/b243e83b8a361677f0d8cdf9a0d2bd44 to your computer and use it in GitHub Desktop.
Deployment Qt Mac
1. Build in release mode.
2. Execute macdeployqt. My project is formed by 2 subprojects. one of them containing the gui components (qrc, qml...), and other containing all the logic.
The project with the gui is in <Dir_to_gui_project>. <Dir_to_release> must contain the library generated by Qt from the logic project.
<Dir_to_Qt>/5.15.1/clang_64/bin/macdeployqt <app_name>.app -qmldir="<Dir_to_gui_project>" -libpath=<Dir_to_release>
3. Test that all Qt libraries are inside the bundle.
Use otool to see which libraries are required, then test if they are inside of <app_name>.app/Contents/Frameworks.
4. Copy third party libraries inside <app_name>.app/Contents/Frameworks.
use otool to see which libraries are not inside <app_name>.app/Contents/Frameworks, and copy then inside that folder.
5. Execute application for console and test, just in case the third party libraries require more libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment