Thursday, July 28, 2011

How To: QT openSSL problem

0 comments

Steps I have followed for Qt development:

·         Installed the Qt SDK 4.7.3 open source.
·         Installed the MingW compiler and put it in path = c:\Qt\4.7.3\
·         Installed openSSL(not reconfigured this time as this one is binary version).
·         Installed Visual Studio 2008
·         Installed QT plugin for VS 2008.
·         Installed Intel AppUp SDK

·         Configured MingW for openSSL by following steps:
·         Assuming a default installation (C:\OpenSSL), go to 'C:\OpenSSL\lib\MinGW' and copy all of the files to your MinGW 'lib' directory.
·         Next, copy everything in the 'C:\OpenSSL\include' directory to your MinGW 'include' directory.

·         Configured Visual Studio 2008 for openSSL support by following steps:
·         from 'C:\OpenSSL\lib\VC' copy all of the files to your Visual C++ 'lib' directory 'C:\Program Files\Microsoft Visual Studio\VC\lib'.
·         Next, copy everything in the 'C:\OpenSSL\include' directory to Visual C++ 'include' directory.

·         Creation of MSI installer:
·         From VS  'Tools' menu option click on 'Generate setup project for intel AppUp(SM) center application and follow the successive UI steps that are easy one.

·         In installer Application Directory I have put following openSSL related dlls that shipped with openSSL installation : ‘libeay32.dll’, ‘libssl32.dll’ and ‘ssleay32.dll’.
·         If you are using SQLite database in your app then in Application Directory create a folder named "plugins\sqldrivers" and put "qsqlite4.dll" file inside sqldrivers folder.
·         For image format supports put "qgif4.dll", "qico4.dll"..etc ( as required by the application) on "plugins\imageformats"
·         For different language support with Webkit add the codec plugins too. For that put "qcncodecs4.dll", "qjpcodecs4.dll", "qkrcodecs4.dll", "qtwcodecs4.dll" files inside "plugins\codecs" folder in installer Application Directory.

Note: all these plugins you can find inside Qt Sdk path. ('C:\Qt\4.7.3\plugins' in my case).

Following dlls we are adding with MSI now:
       QtCore4.dll, QtGui4.dll, QtNetwork4.dll, QtSql4.dll, QtWebKit4.dll, phonon4.dll, libgcc_s_dw2-1.dll, mingwm10.dll, libeay32.dll, libssl32.dll, ssleay32.dll.
                (also windows system related dlls: CRYPT32.dll, PSAPI.DLL, and WSOCK32.dll      --These are added bydefault by MSI creator)

The silent installer runs with openSSL like a charm.

Enjoy!