QPixmap load fails on WinXP SP3?
-
I looked at the InnoSetup script. You should add the image format plugins to your installer package.
You should add this to your InnoSetup script:
@
Source: C:\Code\PhotoResizerQt-build-desktop\release\plugins\imageformats\qgif4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: C:\Code\PhotoResizerQt-build-desktop\release\plugins\imageformats\qico4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: C:\Code\PhotoResizerQt-build-desktop\release\plugins\imageformats\qjpeg4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: C:\Code\PhotoResizerQt-build-desktop\release\plugins\imageformats\qmng4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: C:\Code\PhotoResizerQt-build-desktop\release\plugins\imageformats\qsvg4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: C:\Code\PhotoResizerQt-build-desktop\release\plugins\imageformats\qtiff4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
@Are you really sure your Qt libs are in "C:\Code\PhotoResizerQt-build-desktop\release"? That seems to be the build directory of your application, not the install dir of the Qt libs.
-
Ok. I spaced that...
When I ran the app with a double click from the release folder, of course some DLLs were missing.
Soooo... I figured that when I resolved all of those, I had it ready to go. I'll check into this.I test to make sure I have all the DLLs I need by copying them to the Release folder. When the app runs I figure I have all that I need and then I build the installer from there. Looks like either I didn't completely test the app from the release folder or it found the plugins anyway.
Thanks,
windy -
Woops...
This does not work.
I installed the program on a Vista x64 system where Qt has not been installed and it fails.
The plugins are as you suggest. But no dice.Based on this page: http://doc.qt.nokia.com/latest/plugins-howto.html
It looks like I can statically link against the plugins, so I'm going to try that next.- windy
-
For my projects it is sufficient to include this into the InnoSetup script:
@
#define QtDir "C:\Qt\4.7.0"Source: {#QtDir}\bin\QtCore4.dll; DestDir: {app}; Flags: ignoreversion
Source: {#QtDir}\bin\QtGui4.dll; DestDir: {app}; Flags: ignoreversionSource: {#QtDir}\plugins\iconengines\qsvgicon4.dll; DestDir: {app}\plugins\iconengines; Flags: ignoreversion
Source: {#QtDir}\plugins\imageformats\qgif4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: {#QtDir}\plugins\imageformats\qico4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: {#QtDir}\plugins\imageformats\qjpeg4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: {#QtDir}\plugins\imageformats\qmng4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: {#QtDir}\plugins\imageformats\qsvg4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
Source: {#QtDir}\plugins\imageformats\qtiff4.dll; DestDir: {app}\plugins\imageformats; Flags: ignoreversion
@Does the program actually start on the other windows box? If not you should check if the C++ runtimes are installed there.
-
Make sure the installer copy the dll's in proper folder settings, because your project works for me (on Xp without Qt)
take a look here: !http://i.imgur.com/wjgXC.jpg(http://i.imgur.com/wjgXC.jpg)!
LE: Looks like the folder imageformats should be directly in the same folder as the application, not in the plugins folder. -
Maybe. Or you can qApp.addLibraryPath( qApp.applicationDirPath + QString("/plugins") ); and put them in plugins/imageformats.
When I copied them manually to the app dir, it did not work under Vista x64. Not sure why.
But this method works under Vista x64. Now for a Win 7 x64 test.Yep. Works fine on Win 7 x64 too.
- windy
-
@Volker: i though the same, but the default behavior seem to be imageformats folder direct in the same folder as application (it doesn't work if i put them in the plugins/imageformats) //see the print-screen above - that's on a brand-new installation of Xp, i just built an Xp machine to test my apps, no Qt installed yet ;)
-
So I guess we agree that Nokia or TrollTech or whoever needs to update the docs to make this more clear. Seems that they have not covered all the bases re the Deployment of applications.
Thanks for your help,
windy -
Windy, that's all explained in the "Deploying an Application on Windows":http://doc.trolltech.com/stable/deployment-windows.html page of the docs, there's a dedicated section regarding the "Qt plugins":http://doc.trolltech.com/latest/deployment-windows.html#qt-plugins at the end.