Answer the question
In order to leave comments, you need to log in
Building .app on Mac with Python, Qt, PyQt, MySQL using py2app?
Hello!
There is a problem with building an application on a Mac written in Python + Qt + MySQL, the bundle is built using py2app
Frequent Qt problem - missing libqsqlmysql.dylib solved - compiled and everything worked on the development machine. Now the task is to build a standalone app.
Current state - the app builds and runs on another machine, but can't find that damn QMYSQL from the bundle
I found two potential solutions
1) using macdeployqt in the build script - it creates a folder xxxx.app/Contents/PlugIns with Qt plugins but it's not there plugins from sqldrivers/*. If I put them there manually - then accordingly - on the development machine, the bundle started up perfectly, on a clean machine - no, the error is “no QMYSQL”
2) put the plugin library in Contenst/Frameworks/* as described here
but after execution
# install_name_tool -change /Developer/Applications/Qt/plugins/sqldrivers/ @executable_path/../Frameworks/libqsqlmysql.dylib ./dist/MyApp.app/Contents/MacOS/MyApp<br/>
Answer the question
In order to leave comments, you need to log in
In the second case, your new install path is longer than the old one - nothing will work. There is stupidly no place for a longer path. You need to recompile the library and relink what is linked with it. Or, easier, make the path shorter - put the library next to executable, and not in Frameworks (it's not a framework anyway); then install
path will be @executable_path/libqsqlmysql.dylib
:)
-headerpad_max_install_names
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question