PDA

View Full Version : JPEG plugin problem



AndyBrice
10th April 2012, 14:43
The JPEG .dll dynamic plugin works fine on my Windows development machine, but I can't get it to work when my software is deployed to a clean Windows machine.

I have tried searching the Qt documentation, this forum, stackoverflow.com, Google etc and fiddling with paths and qt.conf. No luck.

I am deploying like this:


myapp.exe
Qt*4.dll
\Microsoft.VC80.CRT
--- Microsoft.VC80.CRT.manifest
--- msvcp80.dll
--- msvcr80.dll
\imageformats
--- qjpeg4.dll


The .exe runs fine and can handle PNG and other formats, but QImage::load() just returns false every time for JPEG.

I have looked at qjpeg4.dll in the MS Depends tool and it only requires the same DLLs as my .exe (QtCore4.dll, QtGui4.dll, msvcp80.dll, msvcr80.dll).

I am using the standard Qt 4.8.0 Windows build downloaded from Nokia.

The main problem is the complete lack of any feedback or error message. QImage::load() just returns false for JPEG. No other clue. It is very frustrating. Any ideas?

Lykurg
10th April 2012, 15:27
Shouldn't it be plugins/imageformats?

AndyBrice
10th April 2012, 17:09
Probably should have posted this in http://www.qtcentre.org/forums/5-Installation-and-Deployment. Apologies.


Shouldn't it be plugins/imageformats?

Not from what I read in the Qt documentation. But I did try this and it didn't work.

Added after 1 15 minutes:

This is displayed in the plugin cache in the Windows registry after the .exe is run:

40800
0
Windows msvc release full-config
2012-01-19T22:18:20

So it looks like the plugin DLL is being found.

wysota
10th April 2012, 17:09
Check what QImageReader::supportedImageFormats() returns.

AndyBrice
10th April 2012, 19:40
Check what QImageReader::supportedImageFormats() returns.

Only the built in formats are listed (e.g. PNG). JPG/JPEG is not listed.

I have added:

DEFINES += QT_NO_PLUGIN_CHECK

Still no clue.

Michael Druckenmiller Sr
10th April 2012, 20:49
The first question I have is where are you running your script from.

I had a similar problem.

I had copied my entire Python 2-7-2 directory to an App directory on portable media.

Everything worked fine except for a .jpeg graphic I had included in a textBrowser to help the operator know what to do.

BTW there is a jpeg plugin that comes standard.


What I discovered is that when you install pyQT two qt.conf files are generated one in my Python root and one in pyQt4 root in site-packages.

If the paths in those .conf's are not correct QT can not find it's libraries.

They can be edited in Notepad (assuming windows).

Hopefully, your issue is this simple.

AndyBrice
10th April 2012, 23:22
I found the problem:

http://lists.qt.nokia.com/pipermail/qt-interest/2009-October/013783.html

I just rebuilt the plugin with:

CONFIG-=embed_manifest_dll

Another one of these stupid side-by-side assembly/manifest issues that have wasted so much of my time. I must have spent 8 hours trying to work this out. How is that an improvement over 'DLL Hell'? <Thinks dark thoughts about Microsoft>