Question

Hello fellow programmers!

I have written a video player using Qt. Everything works fine on my Mac, but when I use macdeployqt to deploy my application and I open the result, I am getting the following message:

WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: Phonon::createPath: Cannot connect Phonon::MediaObject ( no objectName ) to Phonon::AudioOutput ( no objectName ).
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
...

And of course it doesn't play audio (in my machine or in another). Maqcdeployqt does include the other parts of Qt and the 3 party libs wo problems. Its just the damm Phonon. I feel that i'm making a dumb mistake but i just cant find it. The otool log of my app shows:

@executable_path/../Frameworks/phonon.framework/Versions/4/phonon (compatibility version 4.4.0, current version 4.4.0)

As the only reference of phonon.

I read in the documentation of qt the following:

"The Mac deployment tool can be found in QTDIR/bin/macdeployqt. It is designed to automate the process of creating a deployable application bundle that contains the Qt libraries as private frameworks. The mac deployment tool also deploys the Qt plugins, according to the following rules:

-Debug versions of the plugins are not deployed. -The designer plugins are not deployed. -The Image format plugins are always deployed. -SQL driver plugins are deployed if the application uses the QtSql module. -Script plugins are deployed if the application uses the QtScript module. -The svg icon plugin is deployed if the application uses the QtSvg module. -The accessibility plugin is always deployed. "

Maybe i have a debug version of phonon? I don't know, i have tried to deploy the debug and the release versions and none have worked.

Also i founded a related problem in this page: http://www.justinfx.com/tag/phonon/ So i included a folder named 'PlugIns' in my bundle with the phonon_backened folder from my system inside of it after the deploy: it played audio on my machine (but it didn't play it on another) and my app crashed at the end so that cant be the way.

I'm using c++, Qt 4.8.5, the phonon from the SDK (i didn't install any version of phonon, i just installed Qt), and Mac OS X (10.6.8)

I would love to hear any idea or suggestion.

Thanks in advance.

Was it helpful?

Solution

I didn't find the source of the error, but I bypassed it by macdeploying the phonon example from the qt examples folder on another Mac (i.e. Lion). It included the folder 'Plugins' inside the bundle with all the phonon stuff, so I include now that folder into the bundles macdeployed in my Snow Leopard manually. It is ugly but it works from now.

If anyone knows the way to really fix the issue I will be happy to hear it.

OTHER TIPS

I used py2app (neither pyinstaller nor cx_freeze worked) and it created the app distribution folder almost perfectly, except it did not copy the phonon backends. Running macdeplpyqt did not help.

The location of your plugins in your app structure is MyApp.app/Contents/PlugIns so I copied over the folder from Qt install (/Developer/Applications/Qt/plugins/phonon_backend/ ) into the PlugIns folder. That still gave the same error.

Digging in further I saw that MyApp.app/Contents/Resource/qt.conf file is expecting the plugins to be in the Resource/qt_plugins folder so I made a symbolic link from from PlugIns MyApp.app/Contents/PlugIns to MyApp.app/Contents/Resource/qt_plugins and everything works now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top