CQtDeployer icon indicating copy to clipboard operation
CQtDeployer copied to clipboard

Cannot deploy MSVC redistributable packages

Open pzhlkj6612 opened this issue 3 years ago • 3 comments

Describe the bug

CQtDeployer cannot deploy MSVC redistributable packages to MSVC built program.

Environment

Configuring both MSVC and MinGW on Github Actions is complicated, so I only test on my PC.

  • My PC
    • Windows 10 2004 Pro 10.0.19041.685
    • CMD
    • Qt
      • Qt 5.15.0 (MSVC 2019 64-bit / MinGW 8.1.0 64-bit)
      • IFW 4.0.1
    • CQtDeployer
      • Installed: 1.4.7
      • Source: commit d7b48f3529f881f40f30ed1a7b8c21feaab97c22 on branch v1.5

To Reproduce

Steps to reproduce the behavior:

  1. Install Qt, IFW and CQtDeployer.
  2. Clone, build and test CQtDeployer from source.
  3. Deploy the newly built CQtDeployer with the installed CQtDeployer.
  4. Deploy a MSVC built program with the deployed CQtDeployer from step 3.
  5. No MSVC redistributable package is deployed, and related info and warning are also output in stdout.

Expected behavior

Deploy MSVC redistributable packages with no warning.

Output

When deploying the MSVC built program,

stdout:

...
Info: try deploy msvc
Verbose log: vcredis not defined
Warning: deploy msvc failed
Info: deploy done!
...

Files:

.>tree /A /F
.
|   qt.conf
|   Qt5Core.dll
|   Qt5DBus.dll
|   Qt5Gui.dll
|   Qt5Svg.dll
|   Qt5Widgets.dll
|   test-CQD-1.bat
|   test-CQD-1.exe
|
...

Commands I used

Deploy the newly built CQtDeployer with the installed CQtDeployer:

C:\Program Files (x86)\CQtDeployer\1.4>"cqtdeployer.bat" ^
    -bin "C:\CQtDeployer_src\CQtDeployer\build\release\cqtdeployer.exe" ^
    -qmake "C:\Qt\5.15.0\mingw81_64\bin\qmake.exe" ^
    -libDir "C:\CQtDeployer_src" ^
    -recursiveDepth "5" ^
    -targetDir "C:\deployed_CQtDeployer"

Deploy a MSVC built program with the deployed CQtDeployer:

C:\deployed_CQtDeployer>"cqtdeployer.exe" ^
    -bin "C:\MSVC\test-CQD-1.exe" ^
    -qmake "C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe" ^
    -targetDir "C:\deployed_test-CQD-1" ^
    -verbose "3"

pzhlkj6612 avatar Jan 13 '21 15:01 pzhlkj6612

Hi. try add the extraLib option for your deploy command. example:

C:\deployed_CQtDeployer>"cqtdeployer.exe" ^
    -bin "C:\MSVC\test-CQD-1.exe" ^
    -qmake "C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe" ^
    -targetDir "C:\deployed_test-CQD-1" ^
    -verbose "3" ^
    -extraLib "msvc"

EndrII avatar Jan 13 '21 15:01 EndrII

Hi. I will try the option -extraLib "msvc" tomorrow, but please see #496 .

pzhlkj6612 avatar Jan 13 '21 16:01 pzhlkj6612

thanks for PR. i check it.

EndrII avatar Jan 13 '21 16:01 EndrII

I close this issue because this solution works correclty

cqtdeployer ... -extraLib "msvc"

EndrII avatar Oct 23 '22 17:10 EndrII