QPSQL driver not available nor loaded on deployment tests.



  • Hello.

    I am running into issues when trying to run deployment tests on my executables with the QPSQL drivers are not being found or loaded when run on a system that did not build the exes, but are otherwise identical in setup.

    I've compiled a list of DLLs to copy over for post-build events, and even though I've added one or two, I still don't have the drivers loading or being available. However when I build the exes on that same system, all the drivers are available and are things work.

    This is my first time doing something like this, and I'm thoroughly stumped on how to solve this issue.

    OS: Windows 10
    QT version: 5.5.4
    Programs built on: MSVS 2013 community
    Post build event list for DLLs:
    xcopy /d /y "C:\Qt5.5\5.5\msvc2013_64\bin\Qt5Cored.dll" $(OutDir)
    xcopy /d /y "C:\Qt5.5\5.5\msvc2013_64\bin\Qt5Sqld.dll" $(OutDir)
    xcopy /d /y "C:\Windows\System32\msvcr120d.dll" $(OutDir)
    xcopy /d /y "C:\Windows\System32\msvcp120d.dll" $(OutDir)
    xcopy /d /y "C:\Windows\System32\msvcrt.dll" $(OutDir)
    xcopy /d /y "M:\postgresSql\bin\libintl-8.dll" $(OutDir)
    xcopy /d /y "M:\postgresSql\bin\libpq.dll" $(OutDir)
    xcopy /d /y "C:\Qt5.5\5.5\msvc2013_64\plugins\sqldrivers\qsqlpsqld.dll" $(OutDir)
    xcopy /d /y "C:\Program Files\Intel\iCLS Client\ssleay32.dll" $(OutDir)
    xcopy /d /y "C:\Program Files\Intel\iCLS Client\libeay32.dll" $(OutDir)

    This is causing issues in both deployment of exes, and other protocols (ie perl, coldfusion) from being able to load and run the exes probably, which is causing issues with our web server being capable of remotely executing these utility applications.

    Thank you for your time!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Your deployment of the plugin is wrong. it should go into $(OutDir)/plugins/sqldrivers/. You can use the windeployqt tool to help you with that matter.

    Also note that you are trying to deploy a debug version of your application and IIRC, Microsoft doesn't allow the deployment of their debug runtime.



  • This was happening on the release version as well. I'll give this a try though, and let you know the results!


  • Lifetime Qt Champion

    You can also check that tripleboot.org article. It analyses the process pretty well.



  • The windeploy tool worked! (previous employer included QT in the builds itself so this type of bs never existed beforehand... and my cm experience is minimal!) Thank you for notifying me of that. Application loads it's configuration and accesses the database without the need to build now!

    Quick question, would a simple post build event for the windeploy.exe tool in the release version just look like this:

    windeploy.exe $(OutDir) --release

    or is there anything else special I would need to do? This is just territory I'm not used to due to lack of experience with post build events... so just making sure!


  • Lifetime Qt Champion

    No, a post build event should be fine.

    Are you using a package manager to create an installer for your application ? If so, it's a step I would rather add there.



  • @SGaist Not yet. This is the furthest I've gotten since this software is only a few months going in the creation phase, but it's on the list of things to figure out how to use (like I said, minimal cm background) for cloud server deployment. Any suggestions on what I should use (or maybe this is the wrong question to ask)?


  • Lifetime Qt Champion

    Cloud Server Deployment ? Can you give more details about that ?



  • @SGaist Not yet. We're a month or two away from beginning that phase of the planning.


  • Lifetime Qt Champion

    Well, if the application should be installed on a virtual windows somewhere in a cloud then you have several options like InnoSetup or NSIS (used e.g. by cmake)



  • @SGaist Good to know. I've written those down to investigate for a later tasking. Thanks again!


  • Lifetime Qt Champion

    There's also QIF, the Qt Installer Framework that you should take a look at. It has several interesting features like the update handling.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.