Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deploying Qt5 on Windows 7: Too Difficult
QtWS25 Last Chance

Deploying Qt5 on Windows 7: Too Difficult

Scheduled Pinned Locked Moved Installation and Deployment
26 Posts 13 Posters 37.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #2

    You do need the QtGui module, and QtQml.
    @
    QT = core gui qml quick
    @

    For QtQuick 2 apps. Normally, no plugins apart from platform plugin (qwindows.dll. Minimal plugin is not needed) are required. Optionally, image plugins and database plugins might be needed, but that depends on your Qt build and app requirements.

    I have no experience with QtMultimedia, so I can't help there. I don't have too much experience with Windows, too, to be hones. On Linux it just works.

    "link":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html.

    (Z(:^

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gilgrum
      wrote on last edited by
      #3

      Thank you very much for the response sierdzio.

      I had thought it odd that my program would compile without those modules. I wonder why I don't get a compile issue when omitting gui or qml, but I DO get a compile issue when omitting multimedia. Maybe it is because I am using multimedia components in C++.

      I discovered this morning that QT_DEBUG_PLUGINS really IS working. The issue is that I can only see the output when the program is executed by QtCreator. I was checking for output in the console with the deployed executable. I thought this would enable that behavior:
      @CONFIG += console@

      With QT_DEBUG_PLUGINS turned on, I found a nice list of plugins used when I exit the program. Each entry looks like this:
      QLibraryPrivate::unload succeeded on "D:/Programs/Development/Qt/Qt5.0.1/5.0.1/msvc2010/plugins/mediaservice/wmfengine.dll"

      Tracking down and adding these plugins to my program was pretty trivial. HOWEVER, I am still unable to deploy my program. I think it has to do with this output:
      loaded library "D:/Programs/Development/Qt/Qt5.0.1/5.0.1/msvc2010/qml/QtQuick.2/qtquick2plugin.dll"
      loaded library "D:/Programs/Development/Qt/Qt5.0.1/5.0.1/msvc2010/qml/QtMultimedia/declarative_multimedia.dll"

      These "plugins" are in a different location than the rest and are in a different format. I am sure my program is looking for them to run, but I do not know where it is looking.
      I tried pathing like this:
      myprogram/myprogram.exe
      myprogram/QtMultimedia/declarative_multimedia.dll
      myprogram/QtQuick.2/qtquick2plugin.dll

      I also tried
      myprogram/myprogram.exe
      myprogram/qml/QtMultimedia/declarative_multimedia.dll
      myprogram/qml/QtQuick.2/qtquick2plugin.dll

      But neither worked. Where do these plugins need to be placed relative to my executable? Do they have any "hidden" dependencies as with libEGL.dll for qwindows.dll?

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #4

        Plugins need to be put in <your app dir>/plugins, as outlined "here":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html#creating-the-application-package. Make sure you read the note on ANGLE if you are using prebuild packages form Downloads page.

        (Z(:^

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Gilgrum
          wrote on last edited by
          #5

          I had read that before, but I didn't notice at the time that ANGLE is included by default. I've added D3DCompiler_43.dll to my program next to my executable and placed the plugins as specified, but I'm still not able to deploy the application.

          I used depends profiling on my application on another computer and got did see some Qt error messages pointing to the lines:

          @import QtQuick 2.0
          import QtMultimedia 5.0@

          It says the modules "QtQuick" and "QtMultimedia" are not installed. I presume it really means the "QtQuick.2" and "QtMultimedia" folders I found in the directory at: Qt5.0.1\5.0.1\msvc2010\qml. However no matter where I put these folders the application cannot find them. How am I supposed to include "QML Plugins" (as opposed to regular plugins)?

          One other .dll Depends found as missing was "Qt5MultimediaQuick_p.dll". While I've heard of similar dlls and plugins for everything else from Qt 4, I haven't heard of this one. What is it used for and do I need it?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            matti-
            wrote on last edited by
            #6

            [quote author="Scorx Ion" date="1363334790"]
            Everything I try, I am stuck staring at a blank white screen with no information on what I am doing wrong. It is highly frustrating![/quote]

            Heh I know what you mean, I'm stuck with the same stuff currently, trying to run the app built on x64 machine for VS2010 x86 on the same machine.

            QtQuick 2.0 QML app, getting a full-screen window with nothing but blank white in it. Run from the QtCreator it works nicely. Sigh..

            EDIT: Oh and a funny thing. Qt Widgets test app works, also QtQuick 1.1 test app - but none of the QtQuick 2.0 ones. Not our real app, nor a test hello world app. Just white screen. Interesting.

            • Matti

            Author of <a href="http://mmark.777-team.org/">MMark13</a>

            1 Reply Last reply
            0
            • T Offline
              T Offline
              Torgeir
              wrote on last edited by
              #7

              I needed to include these files for deployment of my application:

              D3DCompiler_43.dll
              icudt49.dll
              icuin49.dll
              icuuc49.dll
              libEGL.dll
              libGLESv2.dll
              Qt5Core.dll
              Qt5Gui.dll
              Qt5Qml.dll
              Qt5Quick.dll
              Qt5V8.dll
              <DIR> QtQuick.2/(all of qml/QtQuick.2 goes here)
              <DIR> platforms/qwindows.dll

              Then I can deploy and run it on another machine.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                matti-
                wrote on last edited by
                #8

                [quote author="Torgeir" date="1363947185"]
                <DIR> QtQuick.2/(all of qml/QtQuick.2 goes here)
                [/quote]

                We're building our .qml files into the executable via .qrc. What exactly are you putting into QtQuick.2/ directory ? I would prefer not to ship the qml files separately.. :o

                • M

                Author of <a href="http://mmark.777-team.org/">MMark13</a>

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  matti-
                  wrote on last edited by
                  #9

                  Oh Eureka! There indeed was a dir QtQuick.2/ under the SDK; copying this as-is under the application directory did the trick. Sweet, thanks to this thread we even have 2 hours to spare on our deadline. :D

                  • M

                  Author of <a href="http://mmark.777-team.org/">MMark13</a>

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    matti-
                    wrote on last edited by
                    #10

                    Ahem, next issue arises. We're using SQLite from QtQuick 2.0 projects javascript (QtQuick.LocalStorage 2.0) .. and now that we're deploying on windows outside the QtCreator sandbox, none of the SQL stuff works. I havent yet figured out how to make the app log into a console (CONFIG += console does not seem to do the trick) with console.log() so Im not getting much info whats wrong - we tried adding the sqldrivers plugin directory under the app dir but that didnt help. Whats needed..?

                    While Qt/QML is sweet, building the windows deployment package is a real pain in the arse :o

                    • Matti

                    Author of <a href="http://mmark.777-team.org/">MMark13</a>

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      Nantunest
                      wrote on last edited by
                      #11

                      It's really too cumbersome to deploy a qt/qml application on Windows.

                      After a lot of googling and trying now my app is working.

                      I am using SQLite in my project, but I am using the C++ library <QtSql/QSqlDatabase>.

                      I have:

                      exedir/sqldrivers/qsqlite.dll
                      exedir/platforms/qwindows.dll
                      exedir/QtQuick.2/...
                      exedir/qml/exe_name/qmlfiles.qml
                      exedir/icudt49.dll
                      exedir/icuin49.dll
                      exedir/icuuc49.dll
                      exedir/libEGL.dll
                      exedir/libGLESv2.dll
                      exedir/Qt5Core.dll
                      exedir/Qt5Gui.dll
                      exedir/Qt5Network.dll
                      exedir/Qt5Qml.dll
                      exedir/Qt5Quick.dll
                      exedir/Qt5Sql.dll
                      exedir/Qt5V8.dll
                      exedir/D3DCompiler_43.dll
                      exedir/exe

                      I am new to qt/qml, the most difficult part was to figure out where the plugin folder had to be.

                      Each plugin folder (sqldrivers, QtQuick.2 ...) you use have to be in the exe folder, right?

                      There is a way to change search path for plugins?

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        matti-
                        wrote on last edited by
                        #12

                        Yes theres QQmlEngine::addPluginPath() for that.

                        Aha so SQLite stuff works from C++ side with those, awesome, today's task will be to make it work somehow, hopefully with the existing code (from .pragma library javascript file..)

                        • M

                        Author of <a href="http://mmark.777-team.org/">MMark13</a>

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          matti-
                          wrote on last edited by
                          #13

                          Adding QtQuick/LocalStorage did the trick for the JS part..

                          My working set now is:
                          @
                          │ D3DCompiler_43.dll
                          │ icudt49.dll
                          │ icuin49.dll
                          │ icuuc49.dll
                          │ libEGL.dll
                          │ libGLESv2.dll
                          │ log.txt
                          │ binary.exe
                          │ binary.exe.embed.manifest
                          │ Qt5Core.dll
                          │ Qt5Gui.dll
                          │ Qt5Multimedia.dll
                          │ Qt5MultimediaQuick_p.dll
                          │ Qt5Network.dll
                          │ Qt5Qml.dll
                          │ Qt5Quick.dll
                          │ Qt5Sql.dll
                          │ Qt5V8.dll
                          │
                          ├───platforms
                          │ qwindows.dll
                          │
                          ├───QtMultimedia
                          │ declarative_multimedia.dll
                          │ plugins.qmltypes
                          │ qmldir
                          │ Video.qml
                          │
                          ├───QtQuick
                          │ └───LocalStorage
                          │ plugins.qmltypes
                          │ qmldir
                          │ qmllocalstorageplugin.dll
                          │
                          ├───QtQuick.2
                          │ plugins.qmltypes
                          │ qmldir
                          │ qtquick2plugin.dll
                          │
                          └───sqldrivers
                          qsqlite.dll
                          @

                          I really find it intolerable that the plugin system just silently fails when it cannot load something instead of showing a message (at least in console, preferable in a MessageBox). Totally nasty to debug.

                          • M

                          Author of <a href="http://mmark.777-team.org/">MMark13</a>

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SlimIT
                            wrote on last edited by
                            #14

                            I had a blank screen after launching my app but when i added
                            @
                            ├───QtQuick
                            │ └───LocalStorage
                            │ plugins.qmltypes
                            │ qmldir
                            │ qmllocalstorageplugin.dll
                            │
                            ├───QtQuick.2
                            │ plugins.qmltypes
                            │ qmldir
                            │ qtquick2plugin.dll
                            @
                            the problem was resolved.

                            Thank you.

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              teemo10
                              wrote on last edited by
                              #15

                              I'm a little confused by what the docs have under: Writing a qmltypes File found here: http://qt-project.org/doc/qt-5.0/qtqml/qtqml-modules-qmldir.html

                              First it says:

                              bq.
                              As such qmltypes files have no effect on the functionality of a QML module. Their only use is to allow tools such as Qt Creator to provide code completion, error checking and other functionality to users of your module.

                              It also says:

                              bq.
                              Any module that uses plugins should also ship a type description file.

                              So should we distribute "plugins.qmltypes" files with our app, provided that I am not interested in providing any editing capabilties to my end user on the shipped files?

                              1 Reply Last reply
                              0
                              • Q Offline
                                Q Offline
                                qttester5
                                wrote on last edited by
                                #16

                                I have included all of the files and directories mentioned in this thread as well as ALL of the plugins in the mingw directory to be extra safe, and my app also just shows a white screen; in fact I am using an included Qt Quick demo app, the Minehunt application. There is just no way I can get it to actually run correctly in an environment that does not have Qt installed already. It runs fine in Creator. This is so frustrating. No errors, not crashes, just a white screen.

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SlimIT
                                  wrote on last edited by
                                  #17

                                  [quote author="qttester5" date="1377757029"]I have included all of the files and directories mentioned in this thread as well as ALL of the plugins in the mingw directory to be extra safe, and my app also just shows a white screen; in fact I am using an included Qt Quick demo app, the Minehunt application. There is just no way I can get it to actually run correctly in an environment that does not have Qt installed already. It runs fine in Creator. This is so frustrating. No errors, not crashes, just a white screen.[/quote]

                                  what is your grafic card ? have you tested it under other machines ?

                                  1 Reply Last reply
                                  0
                                  • Q Offline
                                    Q Offline
                                    qttester5
                                    wrote on last edited by
                                    #18

                                    If it was a problem with my graphics card, then why can the project run fine on the same machine, in a different VM that has Qt installed?

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SlimIT
                                      wrote on last edited by
                                      #19

                                      maybe the correct drivers are installed on the VM and not on the Real Machine.

                                      1 Reply Last reply
                                      0
                                      • Q Offline
                                        Q Offline
                                        qttester5
                                        wrote on last edited by
                                        #20

                                        No, I am using two identical VMs on same machine. One with and one without Qt.

                                        1 Reply Last reply
                                        0
                                        • Z Offline
                                          Z Offline
                                          zing0000
                                          wrote on last edited by
                                          #21

                                          In my App, I create a dialog QML object dynamically.

                                          When deploying, I found that I had to add
                                          QtQuick-->Controls
                                          The DLL is under a further subdir, "Private"

                                          I ended up deploying the whole Controls directory for an added 6MB to the package!

                                          Thanks to the contributors above, I would never have got here without their encouragement.

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved