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. [SOLVED][PRB] Deploying Qt-quick applications under Windows
QtWS25 Last Chance

[SOLVED][PRB] Deploying Qt-quick applications under Windows

Scheduled Pinned Locked Moved Installation and Deployment
12 Posts 3 Posters 5.9k 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.
  • AlicemirrorA Offline
    AlicemirrorA Offline
    Alicemirror
    wrote on last edited by
    #1

    Ref.: previous posts, not solved:
    "Compiled application don’t find QML elements":http://developer.qt.nokia.com/forums/viewthread/4670
    "QT SDK 1.1 beta and rc… All works, but I can’t deploy":http://developer.qt.nokia.com/forums/viewthread/5137

    After other in-depth analisys of the question – this is the third post I start – searching for a solution – last try was to do a downfrade. As a matter of fact, this project was completed and finished as a Qt-quick project with sdk 1.1 beta before and the recent 1.1 rc.
    Working on a fresh Windows 7 I setup Qt creator 2010.05, besides the same version Andre suggested as the development platform (those he is developing on).
    Then after the Qt installation (I don’t installed sdk because I will use only for windows desktop deployment) I put the Qt-quick project where I simply changed a couple of things:

    Cpp sources was opened as qt project. Main.cpp that exec qml main file (formerly rchs.qml) was left untouched.
    In the qml directory I created an independent qml project to which I added all the previous versions of my qml sources. All remained unchanged with the esception of the initial import clause:

    “Import Qt-quick” became “import Qt 1.0”

    Then qml main source was tested under qmlviewer from the ide to be sure that everything was working again.
    At this point, I recompiled the application (both qt development directory and my qt project was installed on drive E:) and put the executable code on the windows desktop – drive C:\ – in a release folder with the exe, the qml files structure, the needed dll copied from E:\qt\2010.05\… And the same for the plugins in the “plugin” directory.

    At this point, running the application in the C:\…\release directory it works. Note that the sole exe and qml files generate errors for missing mingw10 and othe essential dll.

    At this point, I uninstalled the Qt creator envirionment following the uninstall procedure. And launching the application it never works.

    My actual conclusion is that for some reason, regardless of the components I put in the release folder together my program, qml etc. There is some component that is instqlled by Qt in the windows environment tha i need to have.

    The questions are:

    Is there a way to set this component in the installation of my application?
    Is theree something obvious that I don’t know that must be deployed with the windows desktop applications?

    Any help is appreciated.

    Enrico Miglino (aka Alicemirror)
    Balearic Dynamics
    Islas Baleares, Ibiza (Spain)
    www.balearicdynamics.com

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Have you considered to run a file system tracer (filemon, psmon or however those are called) to find out whether files are missing?

      I would guess there are some plugins to Qt that you did not deploy along with your application.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hedge
        wrote on last edited by
        #3

        I've got exactly the same problem and its driving me nuts. Can't give much input though as I'm new to QT.

        1 Reply Last reply
        0
        • AlicemirrorA Offline
          AlicemirrorA Offline
          Alicemirror
          wrote on last edited by
          #4

          Hi, thank you very much to both.

          @Hedge: I am not so new on Qt but I think that in cases like this, experience is meaningles... As i solve - becuase I SHOULD SOLVE - I notify you asap.

          @Tobias: Tobias, we also discussed in the other thread about this problem, that I started in a thread before, and over and over... When the problem is solved, I should write a wiki page "Once upon a time..." Your advice is good to check what is needed that I surely miss because it is a fact that the release works only in the case that Qt is installed somewhere in the computer. There are two astonishing strange things for me:

          Qt as I know is closed and don't install special components under windows system, but as a matter of fact this seems not true.

          In the tests descibed in this post and in the last previous tests I put a release directory containing ALL the dlls that are under the installation directory and all the plugins in the plugins directory.

          Regarding point 2 I am thinging to some possible issues:

          Is it possible that I install a wrong Qt? It seems me very strange, but to be sure and exclude all the possibilities, I have tried with Qt SDK 1.1beta and Qt SDK 1.1RC online installation.
          Then to downgrade the project from Qt-quick to Qt-Creator + QML Project I used Qt-creator-win-opensource-2.10.exe that as I know it is a stable version. The result I obtain in all cases is the same.

          When the exe stup of the released application starts, as I know it search for components first in its directory (where I put also the dll) then in the windows system directories. Is it possible that for some strange matter there is some dll library of an unaccepted version? I think no, but at this point everything is possible.

          Enrico Miglino (aka Alicemirror)
          Balearic Dynamics
          Islas Baleares, Ibiza (Spain)
          www.balearicdynamics.com

          1 Reply Last reply
          0
          • AlicemirrorA Offline
            AlicemirrorA Offline
            Alicemirror
            wrote on last edited by
            #5

            A detail: The project and the downloadable compiled version, all last updated sources and some informations can be found at

            http://projects.forum.nokia.com/rchobbystream

            I am searching for a file system tracer. Hope that can help in someway.

            Enrico Miglino (aka Alicemirror)
            Balearic Dynamics
            Islas Baleares, Ibiza (Spain)
            www.balearicdynamics.com

            1 Reply Last reply
            0
            • AlicemirrorA Offline
              AlicemirrorA Offline
              Alicemirror
              wrote on last edited by
              #6

              I found for windows DimichSoft scan. It is not realtime but is useful at least for our case. It is not simple to download because a lot of sites for the freeware download of this program send to a site whose domain is expired so if someone want this can send me a mail. It works fine on Windows 7 and Xp.

              Well I have created a snapshot of the drive C with and without the Qt-sdk-win-2010.05-open-source installed. The only difference (excluding the log updates and other windows stuff not related with Qt), seems the installation of the file QTLIBSPATCHER.EXE somewhere in the filesystem. At the actual date I have not yet clear where this file is located, because after the install/uninstall this remain the C:\WINDOWS\PREFETCH. Now I am doing a complete search of the file to see where it can be.

              Enrico Miglino (aka Alicemirror)
              Balearic Dynamics
              Islas Baleares, Ibiza (Spain)
              www.balearicdynamics.com

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on last edited by
                #7

                I usually use something like "ProcMon":http://technet.microsoft.com/en-us/sysinternals/bb896645 or one of the other former sysinternals tools straight from the microsoft website.

                I just run it on the not-working case and check which files are reported as failed to open.

                1 Reply Last reply
                0
                • AlicemirrorA Offline
                  AlicemirrorA Offline
                  Alicemirror
                  wrote on last edited by
                  #8

                  Thank you Tobias, I try it just now. :)

                  Enrico Miglino (aka Alicemirror)
                  Balearic Dynamics
                  Islas Baleares, Ibiza (Spain)
                  www.balearicdynamics.com

                  1 Reply Last reply
                  0
                  • AlicemirrorA Offline
                    AlicemirrorA Offline
                    Alicemirror
                    wrote on last edited by
                    #9

                    Tom, good advice and strange things. I checked filtering all the events (profiling and register too) about the specific process "RCHobbyStream.exe"
                    The program reports tons of minor problems on registry, but Ithink this is normal because the software is not installed and any reg keys are written.

                    (FYI The program is under the user desktop/RCHS4.7.0)

                    Then I filtered only filesystem events and all the files that usually we expetct the program try to get like Qt framwork dll are correctly found. For every searched file it reports a series of SUCCESS events and END OF FILE as last.

                    The files that are NOT FOUND are those searched before in the program directory, then in the windows system folders. For example,

                    @10:58:32.2541783 RCHobbyStream.exe 3888 CreateFile
                    C:\Users\Tech Consulting\Desktop\RCHS4.7.0\WINMM.DLL
                    NAME NOT FOUND
                    Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a@

                    is immediately followed by

                    @10:58:32.2573206 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\winmm.dll
                    SUCCESS
                    Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened@

                    But with the plugins I find the first trouble:

                    @10:58:32.6607087 RCHobbyStream.exe 3888 CreateFile
                    C:\Users\Tech Consulting\Desktop\RCHS4.7.0\qt.conf
                    NAME NOT FOUND
                    Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

                    10:58:32.6609546 RCHobbyStream.exe 3888 QueryOpen
                    E:\Qt\2010.05\qt\plugins
                    PATH NOT FOUND@

                    E:\Qt\2010.05\qt\plugins is the folder where Qt is installed and the original plugins resides.
                    The second trouble is different and involve a strange behavior on dll. In sequence searches and can't find the following (all the lines reports the same desired access text, so I removed from the list):

                    @10:58:32.7212823 RCHobbyStream.exe 3888 CreateFile C:\Users\Tech Consulting\Desktop\RCHS4.7.0\wintab32.DLL
                    NAME NOT FOUND
                    Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

                    10:58:32.7216986 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7221146 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\system\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7225744 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7228825 RCHobbyStream.exe 3888 CreateFile
                    C:\Users\Tech Consulting\Desktop\RCHS4.7.0\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7231359 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7233804 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7236212 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\wbem\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7238662 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\WindowsPowerShell\v1.0\wintab32.DLL
                    NAME NOT FOUND

                    10:58:32.7242461 RCHobbyStream.exe 3888 CreateFile
                    C:\Users\Tech Consulting\Desktop\RCHS4.7.0\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7358445 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7364306 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\system\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7370243 RCHobbyStream.exe 3888
                    CreateFile C:\Windows\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7374545 RCHobbyStream.exe 3888 CreateFile
                    C:\Users\Tech Consulting\Desktop\RCHS4.7.0\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7378780 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7382795 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7386717 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\wbem\wintab32.dll
                    NAME NOT FOUND

                    10:58:32.7391374 RCHobbyStream.exe 3888 CreateFile
                    C:\Windows\System32\WindowsPowerShell\v1.0\wintab32.dll
                    NAME NOT FOUND@

                    About plugins, I don't used a qt.config file but i wrote in the main.cc the following statement:
                    @QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/plugins");@

                    That I undrstood from the documentation that it is an alternative to the qt.config file.
                    Regarding the other dll it seems that the program is searching for something that Qt sdk installs in the windows system folders. Do you have some ideas about these two issues?

                    Enrico Miglino (aka Alicemirror)
                    Balearic Dynamics
                    Islas Baleares, Ibiza (Spain)
                    www.balearicdynamics.com

                    1 Reply Last reply
                    0
                    • AlicemirrorA Offline
                      AlicemirrorA Offline
                      Alicemirror
                      wrote on last edited by
                      #10

                      Where is the truth? [formerly: SOLVED!!!]

                      I update this post few days after I finally found the solution. I also tested in a lot of way if it works. So, this is the good news.

                      Thanks to:
                      Volker, Tobias Hunger, Tom, Andre and all other members that posted ideas and advices about this strange problem.

                      The resolutive support was the last advice of Tobias, that got me the address to download a process viewer for Windows. Seeing the running application I saw that the function addLibraryPath does not refers to the running application path - as I interpreted reading the Qt documentation - but refers to the Qt installation path. As a matter of fact, in the documentation I read too that the Qt installation is hardcoded in the compiled program, but it seems that this is also the real application path. If Qt sdk is not installed, the running program ignore its running path and search in the (Qt sdk installation) path from where it was compiled.

                      Using ProcMon suggested by Tobias I thought that the only solution was to remove the following line of code from the main.cpp:

                      @QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/plugins");@

                      After this change I added a qt.config file with these few lines:

                      @[Paths]
                      Plugins = plugins
                      @

                      But the program wasn't still working. But I was sure that all the needed components (dll and plugins folders) was in the right place.
                      checking again with ProcMon I saw a strange thing: there was messages of files not found all with the same name: qmldir

                      Investigating on these files I saw that they are in the Qt sdk installation, in the import folder, that contains QtLabs components (never mentioned, for my knowledge) Thus I tested empirically to add the following line to the qt.config file:

                      @[Paths]
                      Plugins = plugins
                      Imports = imports@

                      At this point the program started working.

                      The actual scenario
                      At the actual date the program is working tested under Windows 7 and XP desktops on my machines and other computers. I created a simple setup.exe program delivering the application to other test users that confirmed that installs and works fine.

                      The full project sources and documentation, wiki pages and the downloadable setup can be found on

                      http://projects.forum.nokia.com/rchobbystream

                      Thanks to all :)

                      Enrico Miglino (aka Alicemirror)
                      Balearic Dynamics
                      Islas Baleares, Ibiza (Spain)
                      www.balearicdynamics.com

                      1 Reply Last reply
                      0
                      • H Offline
                        H Offline
                        Hedge
                        wrote on last edited by
                        #11

                        Thanks a lot Alicemirror.

                        I'll try this out and confirm whether it works for me as well.

                        1 Reply Last reply
                        0
                        • AlicemirrorA Offline
                          AlicemirrorA Offline
                          Alicemirror
                          wrote on last edited by
                          #12

                          No Problem Hedge. Remain the unsolved question on why I need these folders and when I should include or not...

                          Enrico Miglino (aka Alicemirror)
                          Balearic Dynamics
                          Islas Baleares, Ibiza (Spain)
                          www.balearicdynamics.com

                          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