[SOLVED][PRB] Deploying Qt-quick applications under Windows
-
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.
-
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.
-
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.
-
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.
-
Thank you Tobias, I try it just now. :)
-
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/a10: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/a10:58:32.7216986 RCHobbyStream.exe 3888 CreateFile
C:\Windows\System32\wintab32.DLL
NAME NOT FOUND10:58:32.7221146 RCHobbyStream.exe 3888 CreateFile
C:\Windows\system\wintab32.DLL
NAME NOT FOUND10:58:32.7225744 RCHobbyStream.exe 3888 CreateFile
C:\Windows\wintab32.DLL
NAME NOT FOUND10:58:32.7228825 RCHobbyStream.exe 3888 CreateFile
C:\Users\Tech Consulting\Desktop\RCHS4.7.0\wintab32.DLL
NAME NOT FOUND10:58:32.7231359 RCHobbyStream.exe 3888 CreateFile
C:\Windows\System32\wintab32.DLL
NAME NOT FOUND10:58:32.7233804 RCHobbyStream.exe 3888 CreateFile
C:\Windows\wintab32.DLL
NAME NOT FOUND10:58:32.7236212 RCHobbyStream.exe 3888 CreateFile
C:\Windows\System32\wbem\wintab32.DLL
NAME NOT FOUND10:58:32.7238662 RCHobbyStream.exe 3888 CreateFile
C:\Windows\System32\WindowsPowerShell\v1.0\wintab32.DLL
NAME NOT FOUND10:58:32.7242461 RCHobbyStream.exe 3888 CreateFile
C:\Users\Tech Consulting\Desktop\RCHS4.7.0\wintab32.dll
NAME NOT FOUND10:58:32.7358445 RCHobbyStream.exe 3888 CreateFile
C:\Windows\System32\wintab32.dll
NAME NOT FOUND10:58:32.7364306 RCHobbyStream.exe 3888 CreateFile
C:\Windows\system\wintab32.dll
NAME NOT FOUND10:58:32.7370243 RCHobbyStream.exe 3888
CreateFile C:\Windows\wintab32.dll
NAME NOT FOUND10:58:32.7374545 RCHobbyStream.exe 3888 CreateFile
C:\Users\Tech Consulting\Desktop\RCHS4.7.0\wintab32.dll
NAME NOT FOUND10:58:32.7378780 RCHobbyStream.exe 3888 CreateFile
C:\Windows\System32\wintab32.dll
NAME NOT FOUND10:58:32.7382795 RCHobbyStream.exe 3888 CreateFile
C:\Windows\wintab32.dll
NAME NOT FOUND10:58:32.7386717 RCHobbyStream.exe 3888 CreateFile
C:\Windows\System32\wbem\wintab32.dll
NAME NOT FOUND10: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? -
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: qmldirInvestigating 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 :)
-
No Problem Hedge. Remain the unsolved question on why I need these folders and when I should include or not...