Results 1 to 4 of 4

Thread: qt deployment problem on windows xp

  1. #1
    Join Date
    Feb 2006
    Posts
    23
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default qt deployment problem on windows xp

    hi,

    i have a real strange problem with deployment of my qt 4.2.3 application on windows xp.
    i made a setup.exe which copies the application, the qt dlls, the runtime as well as the imageformats folder containing qjpeg1.dll alsong with the manifest to a local folder on the destination system.

    in most cases, the program runs fine.

    however, on some windows xp systems the program fails to load jpeg images, thus the plugin qjpeg1.dll is either not loaded or not working.

    qt on my development system is configured with the -qt-libjpeg switch.

    main.cpp set's the library path as follows:

    Qt Code:
    1. paths.append(app.applicationDirPath());
    2. app.setLibraryPaths(paths);
    To copy to clipboard, switch view to plain text mode 

    thus, any other qt plugins which might be on the destination system should not interfere.

    does anybody has a clue what's going wrong here?

    thanks

    sebastian

  2. #2
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt deployment problem on windows xp

    Try finding out qjpeg1.dll's dependencies using depends.exe(available in the PSDK). Do you include both msvcpXX.dll and msvcrXX.dll in your installer? Maybe you forgot the c runtime dll(as opposed to the c++ one) and qjpeg1.dll needs it.

    P.S.
    If everything else fails, try FileMon from sysinternals and see what file access is going on when your application fails.
    Last edited by spud; 28th May 2007 at 14:09. Reason: updated contents

  3. #3
    Join Date
    Feb 2006
    Posts
    23
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt deployment problem on windows xp

    hi spud,

    that was a good tip...
    anyway, it lead to something completely different: to use depends, i had to install vc++ on the destiantion system. after installing vc++, the problem was gone. i think the following is going wrong here:

    i deploy the application like described in the Qt docs ('Deploying an Application on Qt/Windows'), having the qt dlls and the c/c++ runtimes in the applications directory and the plugins in an ./imageformats subfolder. with a prior version of my app (based on qt 4.1, i think), that worked on xp destination systems without c/c++ runtimes installed into the winsxs side-by-side cache through other applications.

    however, with this version based on 4.2.3, the app starts on a system without other c/c++ runtimes, i.e. uses the runtimes i install locally, but the plugins don't. strange. i'll be after that.

    thanks,

    sepp

  4. #4
    Join Date
    Feb 2006
    Posts
    23
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt deployment problem on windows xp

    hi,

    meanwhile, trolltech has confirmed that this is a bug.

    the problem is that when deploying a qt/win 4.2.x application which needs (imageformats) plugins and which is build with Visual Studio 2005, the plugins will fail to load on a 'fresh' windows xp/server2003 system, even if the application is deployed as trolltech itself recommends (that is, deploying the microsoft vc 8.0 runtimes as 'application local' inside the applications directory).

    the reason seems to be that the plugins (which in turn need the runtimes) don't get the runtimes from the applications folder AND that the runtimes are not in the WinSxS folder on a fresh system.

    the workaround is not really easy, because you cannot simply copy the runtimes to WinSxS.

    anyway, there is a good article as well as a bootstrapper for the runtimes here:

    http://www.codeproject.com/cpp/vcredists_x86.asp

    i have solved the problem with the approach given there by adding a slightly modified bootstrapper to my setup executable...

  5. The following user says thank you to sepp for this useful post:

    spud (5th July 2007)

Similar Threads

  1. Qt + Portmidi in Windows... libraries problem
    By hipogrito in forum Newbie
    Replies: 2
    Last Post: 19th June 2009, 00:01
  2. VS2005 Deployment Problem
    By musaulker in forum Installation and Deployment
    Replies: 6
    Last Post: 20th July 2008, 19:43
  3. Application deployment problem
    By shapirlex in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 13th April 2007, 00:11
  4. Thread problem with windows
    By vratojr in forum Qt Programming
    Replies: 17
    Last Post: 16th June 2006, 08:34
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.