[SOLVED] How to deploy QtMobility together with an application



  • Hi,

    my application uses the media player from the multimedia part of QtMobility. The media plaqer requires the QtMobility Direct Show service plugins. If I compile QtMobilty, the service plugins are installed into prefix\plugins\mediaservice. The default prefix is C:\QtMobility. That means the plugins are located in C:\QtMobility\plugins\mediaservice. The application only finds the service plugins if they are located in this directory that was configured during QtMobility build process.

    Now I wonder, how I can deploy the required QtMobility service plugins together with my application. Normally my installer installs the application together with all required DLLs into a certain folder under C:\Programm Files<myapp>. Buth where should I install the media service plugins or how can I tell my application that the service plugins are not located in C:\QtMobility\plugins\mediaservice? I don't want to create a C:\QtMobility\plugins\mediaservice from my installer and would prefer a location inside of the install folder of my application. Is this possible? I did not find any hint about this in the QtMobility documentation.

    Thanks, Uwe



  • Ok, I solved the problem from reading the source code (this is the advantage of open source :O).

    In file qmediapluginloade.cpp I found the following lines:

    @
    #ifdef QTM_PLUGIN_PATH
    // Mobility's plugin directory
    paths << QLatin1String(QTM_PLUGIN_PATH);
    #endif

    // Qt paths
    paths << QCoreApplication::libraryPaths();
    @

    The plugin loader searches in the QTM_PLUGIN_PATH C:\QtMobility\plugins and in the QCoreApplication library paths. These library paths also contain the path to the application binary. So I simply need to install the mediaservice plugin into myapp/mediaservice/. I tested this and it works.


Log in to reply
 

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