PDA

View Full Version : Help required in deploying window based qt application on non qt environment windows



fredykhan
20th February 2011, 15:33
Hello,

I urgently require help in deploying a window based qt application on a windows where qt is not installed. The application reads any file that the user wants to store and stores it in postgresql database in Bytea format. When the user wants to view the file, it imports the bytea data into a byte array in qt which in turn makes a file out of it. This file is then opened by Qt Desktop IO services. The problem is that this works perfect on my windows which has qt installed but when i try to use it on any non qt environment window, the application makes a corrupt file to view. I think i am missing some dll required to use for such action. I would appreciate all help in advance :)

kornicameister
20th February 2011, 16:56
(I am talking about default Qt's installation with shared libraries) basically You need QtGui4.dll and QtCore4.dll,libgcc_s_dw2-1.dll,mingwm10.dll these are necessity I guess and must be included along with binary.exe
From my experience they must be inserted into system32 directory. Other files you have to add along with binary.exe depends on the project specification.

You can set up testing environment in virtual machine with clean OS and install your application, check what's missing and successfully include missing dependencies.

Postresql as far as I know is not default db driver, so You need to add appropriate dll(s) as well.
Hope that helps

additionally this article is very helpful Deploying Qt Applications

schnitzel
20th February 2011, 23:37
From my experience they must be inserted into system32 directory.


This is not needed. You just have to put them in the same folder where the application executable resides.

in short, you need to deploy your app as follows:
<app>.exe
<dlls mentioned by kornicameister>
if you are using icons, then you need to create a subfolder 'imageformats' and within it, qico4.dll. If you use any other image formats, add addiontial dlls to this subfolder.
if your app uses sql, then create a subfolder 'sqldrivers' and in it the appropriate dll according to the db you are using. Look at <Qt Install folder>\qt\plugins\sqldrivers

in addition to the wiki link, I would suggest the following:
http://doc.qt.nokia.com/latest/deployment.html

kornicameister
21st February 2011, 01:20
This is not needed. You just have to put them in the same folder where the application executable resides.

in short, you need to deploy your app as follows:
<app>.exe
<dlls mentioned by kornicameister>
if you are using icons, then you need to create a subfolder 'imageformats' and within it, qico4.dll. If you use any other image formats, add addiontial dlls to this subfolder.
if your app uses sql, then create a subfolder 'sqldrivers' and in it the appropriate dll according to the db you are using. Look at <Qt Install folder>\qt\plugins\sqldrivers

in addition to the wiki link, I would suggest the following:
http://doc.qt.nokia.com/latest/deployment.html

and than I learnt something as well :)