QuasarApp / CQtDeployer

This project is used to deploy applications written using QML, qt or other С / С++ frameworks.
https://quasarapp.ddns.net:3031/docs/QuasarApp/CQtDeployer/latest/
GNU Lesser General Public License v3.0
577 stars 87 forks source link

Deploying debug libraries on Windows #425

Closed T-Maxxx closed 7 months ago

T-Maxxx commented 4 years ago

Describe the bug Deployed package misses some debug versions of Qt libraries and adds release versions when it shouldn't.

To Reproduce Steps to reproduce the behavior:

  1. Generate debug version of application using MSVS.
  2. Invoke deployer using attached config below.
  3. Launch application using .bat file in "targetDir"

Expected behavior All debug versions of dependend Qt libraries and plugins are copied to "targetDir" like with windeployqt. Release versions should not be attached.

Result Some debug libraries are attached (Qt5Cored, Qt5Guidd, Qt5Networkd, Qt5Widgetsd, qgenericbearerd etc.), some are not (Qt5Svgd, qwindowsd). Release versions of libraries (Qt5Core, Qt5Core, Qt5Gui, Qt5Svg etc.) has been added too.

Desktop (please complete the following information):

Additional context I have to deploy both debug and release configurations (separately of course). I encountered this issue with Qt5Svgd.dll and qwindowsd.dll missing. I'm almost sure it's because of forced release plugins like qgenericbearer.dll, qsvgicon.dll etc. Please look at output - some lines clearly states XXX.dll ignored by filter d.dll (I didn't set it to ignore) when debug versions must be used instead (according to windeployqt output). All plugins copied by windeployqt are debug versions which is perfectly fine (IMHO). "targetDir" already contains my app.exe in 'bin' dir and project dependencies in 'lib' dir before invoking cqtdeployer. So all I need is to add Qt libraries to targetDir with next deploy config:

{
   "bin": "D:/program/build-vc15/Debug/bin/app.exe",
   "clear": false,
   "recursiveDepth": "5",
   "targetDir": "D:/program/build-vc15/distrib/Debug",
   "binOut": "bin",
   "libOut": "lib",
   "trOut": "translations",
   "pluginOut": "plugins",
   "verbose": 3
}

Verbose output log:

Info: Deploy ...
Info: target deploy started!!
Info: extract lib :D:/program/build-vc15/distrib/Debug//bin//app.exe
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/bin/app.exe
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Networkd.dll
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Cored.dll
// ^^^^^^ I believe you can use Qt5Cored to test if this package must contain debug binaries.
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Widgetsd.dll
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Guid.dll
Info: current module 0
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Widgetsd.dll module value 67108864
Info: current module 67108864
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Guid.dll module value 64
Info: current module 67108928
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Networkd.dll module value 2048
Info: current module 67110976
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Cored.dll module value 4
Info: platform : qdirect2dd is disabled
Info: platform : qdirect2dd is disabled
Info: platform : qminimald is disabled
Info: platform : qminimald is disabled
Info: platform : qoffscreend is disabled
Info: platform : qoffscreend is disabled
Info: platform : qwindowsd is disabled
// ^^^^^^^^^ Why? windeployqt copies it too.
Info: platform : qwindowsd is disabled
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/bearer/qgenericbearer.dll
// ^^^^^^^^^ Wrong. windeployqt copies debug version.
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/bearer/qgenericbearer.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/bearer/qgenericbearerd.dll ignored by filter d.dll
// ^^^^^^^^^ This one must be added.
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/bearer/qgenericbearerd.pdb ignored by filter .pdb
// ^^^^^^^^^ This one can be added since it is debug package.
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/iconengines/qsvgicon.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/iconengines/qsvgicon.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/iconengines/qsvgicond.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/iconengines/qsvgicond.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qgif.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qgif.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qgifd.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qgifd.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qicns.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qicns.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qicnsd.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qicnsd.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qico.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qico.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qicod.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qicod.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qjpeg.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qjpeg.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qjpegd.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qjpegd.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qsvg.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qsvg.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qsvgd.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qsvgd.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtga.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtga.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtgad.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtgad.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtiff.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtiff.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtiffd.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qtiffd.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwbmp.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwbmp.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwbmpd.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwbmpd.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwebp.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwebp.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwebpd.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/imageformats/qwebpd.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforminputcontexts/qtvirtualkeyboardplugind.pdb ignored by filter .pdb
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qdirect2d.dll ignored by filter d.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qdirect2d.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qminimal.dll 
// ^^^^^^ windeployqt ignores it. I'm not sure it should be added.
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qminimal.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qoffscreen.dll
// ^^^^^^ windeployqt ignores it. I'm not sure it should be added.
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qoffscreen.pdb ignored by filter .pdb
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qwindows.dll
Info: C:/QT/QT5.9.7/5.9.7/MSVC2017_64/PLUGINS/platforms/qwindows.pdb ignored by filter .pdb
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//bearer/qgenericbearer.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/bearer/qgenericbearer.dll
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Core.dll
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Network.dll
Info: current module 67110980
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Core.dll module value 4
Info: current module 67110980
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Network.dll module value 2048
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//iconengines/qsvgicon.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/iconengines/qsvgicon.dll
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Svg.dll
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Widgets.dll
Info: get recursive dependencies of C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Gui.dll
Info: current module 67110980
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Svg.dll module value 16777216
Info: current module 83888196
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Widgets.dll module value 67108864
Info: current module 83888196
Info: add new module from path C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Gui.dll module value 64
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qgif.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qgif.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qicns.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qicns.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qico.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qico.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qjpeg.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qjpeg.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qsvg.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qsvg.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qtga.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qtga.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qtiff.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qtiff.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qwbmp.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qwbmp.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//imageformats/qwebp.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/imageformats/qwebp.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//platforms/qminimal.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/platforms/qminimal.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//platforms/qoffscreen.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/platforms/qoffscreen.dll
Info: extract lib :D:/program/build-vc15/distrib/Debug//plugins//platforms/qwindows.dll
Info: get recursive dependencies of D:/program/build-vc15/distrib/Debug/plugins/platforms/qwindows.dll
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Core.dll
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Widgets.dll
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Gui.dll
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Svg.dll
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/BIN/Qt5Network.dll
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_ar.qm
// ^^^^^^^^^^ qtbase? I believe it should be qt_XX.qm like with winqtdeployer.
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_bg.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_ca.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_cs.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_da.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_de.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_en.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_es.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_fi.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_fr.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_gd.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_he.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_hu.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_it.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_ja.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_ko.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_lv.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_pl.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_ru.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_sk.qm
Info: copy :C:/QT/QT5.9.7/5.9.7/MSVC2017_64/TRANSLATIONS/qtbase_uk.qm
Info: try deploy msvc
Info: deploy done!
EndrII commented 4 years ago

Thanks for your report. The Deployment of a debug libraries in a windows platform it is very specific task, so, i am planned to add this feature in to the cqtdeployer 1.5 .

EndrII commented 7 months ago

Deploy debug libraries in Windows system allowed at 1.6,