M
M
MichaelXIII2011-10-22 00:08:22
MySQL
MichaelXIII, 2011-10-22 00:08:22

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/>

and launching the application - this plugin is not picked up - even on a development machine
What am I doing wrong?
Thanks in advance for any help!
My original question on StackOverflow

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MikhailEdoshin, 2011-10-22
@MichaelXIII

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

A
Alexey Sidorov, 2011-10-22
@Gortauer87

and who will put libmysql.dylib in the bundle, huh?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question