Here's specifically how I was able to cure my phonon backend plugin error (on Mac OS X, etc., all listed above):
In the main method of my application's script, I added a library path to include a folder named "Plugins." Thus my main method looks like this:
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
QtGui.QApplication.addLibraryPath(QtGui.QApplicati on.applicationDirPath() + "/../Plugins")
app.setApplicationName("Music Player")
form = radioUI()
form.show()
sys.exit(app.exec_())
Then I manually copy (every time I run py2app) the phonon_backend directory into a Plugins directory in my application. There may be a better way to do this, but this is how I do it.
What this means in practice:
- Search for the "phonon_backend" directory in your Qt installation. On my machine, it was in "~/Trolltech/Qt-4.4.3/plugins/phonon_backend." This directory should contain two files:
------ libphonon_qt7_debug.dylib
------ libphonon_qt7.dylib
(I'm not sure if you need both of these -- I take both just for safety.)
- Make a folder named "Plugins" somewhere and copy the "phonon_backend" directory into it. I make the "Plugins" folder on my desktop, so the resulting directory is "~/Desktop/Plugins/phonon_backend/" and contains the two *.dylib files listed above.
- Run py2app normally (assuming it runs normally for you).
- "Show Package Contents" of the resulting application. You should see a structure like
Contents
--- Frameworks
--- info.plist
--- MacOS
--- PkgInfo
--- Resources
- Copy your "Plugins" directory into the Contents folder. The resulting structure should look like
Contents
--- Frameworks
--- info.plist
--- MacOS
--- PkgInfo
--- Plugins
--- Resources
That should do it.
Let me know if this is unclear or doesn't work for you. I was so happy to get past the backend plugin error.
Of course, now I'm on to a threading error...![]()
Bookmarks