Phonon for Mac



  • I'm developing a Qt application for Windows and Mac. When I deploy the application, I can't get phonon to work on the Mac. It works fine on my Mac development machine. I figured I must be missing something in the install, but I can't figure out what. I'm including "phonon_qt7.dylib" inside the *.app package. I've tried moving it around to a bunch of different locations (myapp.app/Contents/Plugins/phonon_backend/phonon_qt7.dylib, myapp.app/Contents/Plugins/phonon_qt7.dylib, etc), but the video never plays and always get the same console error:

    Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded

    I've spent a huge amount of time searching the web to find a fix this problem, but I haven't seen anyone provide an answer. And, yes, I have taken a look at http://www.qtcentre.org/wiki/index.php?title=How_to_get_Phonon_working but didn't find any information that fixes this problem.



  • I figured it out, and I'm posting it here for everyone.

    You need to run "macdepoyqt" in the base directory of your application. (Macdeployqt should either come with qt or can be built.) More specifically, go to the directory where "MyApplication.app" is located, and call "macdeployqt MyApplication.app". This will copy all the necessary Qt frameworks and dylibs into your app folder. This is very important for phonon because the phonon backend needs lots of files and codecs. (Simply copying the phonon.framework and dylibs yourself will not work.)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.