Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
Originally Posted by
mentalmushroom
I didn't build it.
So please open the Visual Studio command prompt and build your application from within the command line, as requested.
Quote:
If something is done wrong in Qt binaries, I hope it to be fixed. Otherwise, I'd like to know how to run those samples, because as you can see it is not that easy to run when Visual C++ Redistributable is not installed.
Strangely it works for thousands if not millions of people but not you. Probably Qt binaries have a special "if" block detecting your machine so that loading images fails on your machines only.
Re: QWebView doesn't show JPEG images on a clean XP machine
Ok, I've built it. It works with the same result. By the way, I am wondering why should I rebuild Qt samples, aren't those binaries correct?
Quote:
Strangely it works for thousands if not millions of people but not you. Probably Qt binaries have a special "if" block detecting your machine so that loading images fails on your machines only.
I think, most people use it along with Visual C++ Redistributable package, so they don't have this problem, or even with some another compiler. Unfortunately, I can't use redistributable package.
I extracted manifest from imageviewer.exe:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
Here goes manifest from crt folder:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable></noInheritable>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
<file name="msvcr90.dll" hashalg="SHA1" hash="98e8006e0a4542e69f1a3555b927758bd76ca07d"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>+CXED+6HzJlSphyMNOn27ujadC0=</dsig:DigestValue></asmv2:hash></file> <file name="msvcp90.dll" hashalg="SHA1" hash="3aec3be680024a46813dee891a753bd58b3f3b12"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>MyKED+9DyS+1XcMeaC0Zlw2vFZ0=</dsig:DigestValue></asmv2:hash></file> <file name="msvcm90.dll" hashalg="SHA1" hash="0195dd0896d74b62531e4f3c771904a3d996450e"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>EeyDE7og6WoPd2oBhYbMEnpFHhY=</dsig:DigestValue></asmv2:hash></file>
</assembly>
Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
Originally Posted by
mentalmushroom
I think, most people use it along with Visual C++ Redistributable package, so they don't have this problem, or even with some another compiler. Unfortunately, I can't use redistributable package.
Why so ?
From Qt docs (here) it seems it's necessary; not sure you have the choice
Re: QWebView doesn't show JPEG images on a clean XP machine
It is possible to distribute the application with crt folder. But in my case I have to distribute imageformats folder also and those plugins don't work unless I include crt folder duplicate inside.
Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
Originally Posted by
mentalmushroom
Ok, I've built it. It works with the same result. By the way, I am wondering why should I rebuild Qt samples, aren't those binaries correct?
I think, most people use it along with Visual C++ Redistributable package, so they don't have this problem, or even with some another compiler. Unfortunately, I can't use redistributable package.
The problem is with your machine and with your machine only. There is a trio here that needs access to the C runtime:
1) Qt libs
2) Qt plugins
3) your application
Furthermore Qt plugins depend on Qt libs. If all those components required the same C runtime, you'd only need one runtime. If they somehow require different runtimes then they have not been built using the same settings. Furthermore if Qt libs and Qt plugins require a different runtime then apparently they haven't been built together. You can see that in QtSDK where there are loads of plugins for Creator (which is built with MSVC), there is no runtime in each plugin directory and strangely enough everything works fine even on a "clean XP" machine. I don't know what you did, I don't know how you deployed your program to the target machine but apparently you didn't do it correctly. That's the whole story and putting the blame on Qt libraries is a silly thing to do. After all you don't need a copy of Qt libs in the "imageformats" directory even though the plugins depend on Qt, right? So where is the difference between plugins requiring Qt libs and plugins requiring the C runtime? Welcome to DLL hell!
Here is a fragment of the docs you should read too:
Quote:
Visual Studio 2008 And Manual Installs
As well as the above details for VS 2005 and onwards, Visual Studio 2008 applications may have problems when deploying manually, say to a USB stick.
The recommended procedure is to configure Qt with the -plugin-manifests option using the 'configure' tool. Then follow the guidelines for manually deploying private assemblies.
In brief the steps are
create a folder structure on the development computer that will match the target USB stick directory structure, for example '\app' and for your dlls, '\app\lib'.
on the development computer, from the appropriate 'redist' folder copy over Microsoft.VC80.CRT and Microsoft.VC80.MFC to the directories '\app' and '\app\lib' on the development PC.
xcopy the \app folder to the target USB stick.
Your application should now run. Also be aware that even with a service pack installed the Windows DLLs that are linked to will be the defaults. See the information on how to select the appropriate target DLLs.
Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
The problem is with your machine and with your machine only
No, I tried it on a different machine. It was a different computer with a different version of XP. Only it was on the virtual machine also, but I think it should not cause problems, because I tried both VMWare and VirtualBox.
Quote:
I don't know what you did, I don't know how you deployed your program to the target machine but apparently you didn't do it correctly.
Well, I told you several times how I did it, even posted screenshots yesterday. I installed Qt binaries downloaded from Qt site and copied demo application along with imageformats and crt folder. Yes, I understand very well it should work without imageformats inside each directory, but the problem is it doesn't work otherwise.
Quote:
The recommended procedure is to configure Qt with the -plugin-manifests option using the 'configure' tool
I guess this can be done when you build qt yourself. I use ready-made binaries, but as long as they are intended to be used with visual studio, I think it should be configured properly.
Quote:
create a folder structure on the development computer that will match the target USB stick directory structure, for example '\app' and for your dlls, '\app\lib'.
on the development computer, from the appropriate 'redist' folder copy over Microsoft.VC80.CRT and Microsoft.VC80.MFC to the directories '\app' and '\app\lib' on the development PC.
xcopy the \app folder to the target USB stick.
I think, I did what was said here, but I didn't copy mfc directory. As long as it works without it when I include crt inside imageformats, I think mfc is not needed.
Perhaps all test systems I tried were incorrectly configured or I did something wrong in deploying, I would be highly appreciated if somebody could show how to do it right. I think for those who also use compiled binaries from qt site it is not that much work to try, because enough is to test the demo application (e.g. imageviewer). But important thing is the target system (XP) should be clean without vcredist and other optional software.
Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
Originally Posted by
mentalmushroom
Well, I told you several times how I did it, even posted screenshots yesterday.
I know a picture can speak one thousand words, but definitely not in this case.
Quote:
I guess this can be done when you build qt yourself. I use ready-made binaries, but as long as they are intended to be used with visual studio, I think it should be configured properly.
So stick to the rules and deploy dependencies properly.
Quote:
I think, I did what was said here, but I didn't copy mfc directory. As long as it works without it when I include crt inside imageformats, I think mfc is not needed.
I have no idea why this section of docs mentions MFC. "Just in case", probably. Nevertheless you didn't teach your bundle to look for the crt in a proper directory.
Quote:
Perhaps all test systems I tried were incorrectly configured or I did something wrong in deploying, I would be highly appreciated if somebody could show how to do it right.
Launch vcredist install from your installer, use a different compiler, build Qt yourself or deploy your application statically. The choice is yours to make. Unfortunately Windows deployment model sucks but we all have to live with it.