NSIS: Add logic to package Qt debug DLLs

Bug: 15623
Change-Id: I4898fe2797d987e35bc334211ece8f2f58c562c7
Reviewed-on: https://code.wireshark.org/review/32493
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
João Valverde 2019-03-20 23:11:55 +00:00 committed by Anders Broman
parent 19d54ac364
commit c7c3e31772
2 changed files with 12 additions and 3 deletions

View File

@ -206,6 +206,7 @@ macro( ADD_NSIS_PACKAGE_TARGET )
COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/windeployqt-to-nsis.ps1"
-Executable $<TARGET_FILE:wireshark>
-FilePath ${_nsis_binary_dir}/qt-dll-manifest.nsh
$<$<CONFIG:Debug>:-DebugConfig>
)
# Build NSIS package dependencies. We build the package in

View File

@ -38,6 +38,9 @@ The path to a Qt application. It will be examined for dependent DLLs.
.PARAMETER FilePath
Output filename.
.PARAMETER DebugConfig
Assume debug binaries.
.INPUTS
-Executable Path to the Qt application.
-FilePath Output NSIS file.
@ -46,7 +49,7 @@ Output filename.
List of NSIS commands required to package supporting DLLs.
.EXAMPLE
C:\PS> .\windeployqt-to-nsis.ps1 windeployqt.exe ..\..\staging\wireshark.exe qt-dll-manifest.nsh
C:\PS> .\windeployqt-to-nsis.ps1 windeployqt.exe ..\..\staging\wireshark.exe qt-dll-manifest.nsh [-DebugConfig]
#>
Param(
@ -54,7 +57,10 @@ Param(
[String] $Executable,
[Parameter(Position=1)]
[String] $FilePath = "qt-dll-manifest.nsh"
[String] $FilePath = "qt-dll-manifest.nsh",
[Parameter(Mandatory=$false)]
[Switch] $DebugConfig
)
@ -65,8 +71,10 @@ try {
if ($qtVersion -ge "5.3") {
# Qt 5.3 or later. Windeployqt is present and works
$DebugOrRelease = If ($DebugConfig) {"--debug"} Else {"--release"}
$wdqtList = windeployqt `
--release `
$DebugOrRelease `
--no-compiler-runtime `
--list relative `
$Executable