From 7a09c78f123b5dd1237000726f19e2801edeaf39 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 6 Jan 2020 09:58:38 -0800 Subject: NSIS: Don't package .pdb files. We run `windeployqt ... --pdbs` at build time, which means that we need to be careful not to include them in the NSIS package. Switch from using wildcards ("File ...\*") to using separate "File" commands for each file. Simplify the PDB Zip package command while we're here. Bug: 16307 Change-Id: Ibd9bcbdfdc216f1f6a067baf711bbc184845143f Reviewed-on: https://code.wireshark.org/review/35670 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- packaging/nsis/CMakeLists.txt | 1 + packaging/nsis/windeployqt-to-nsis.ps1 | 21 ++++++++++----------- packaging/wix/CMakeLists.txt | 1 + packaging/wix/windeployqt-to-wix.ps1 | 3 +++ 4 files changed, 15 insertions(+), 11 deletions(-) (limited to 'packaging') diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index 4b45b72575..cd225e6505 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -219,6 +219,7 @@ macro( ADD_NSIS_PACKAGE_TARGET ) -Executable $ -FilePath ${_nsis_binary_dir}/qt-dll-manifest.nsh $<$:-DebugConfig> + DEPENDS "${_nsis_source_dir}/windeployqt-to-nsis.ps1" ) # Build NSIS package dependencies. We build the package in diff --git a/packaging/nsis/windeployqt-to-nsis.ps1 b/packaging/nsis/windeployqt-to-nsis.ps1 index 0271a27a3c..dba9848ae6 100644 --- a/packaging/nsis/windeployqt-to-nsis.ps1 +++ b/packaging/nsis/windeployqt-to-nsis.ps1 @@ -66,29 +66,28 @@ try { $DebugOrRelease = If ($DebugConfig) {"--debug"} Else {"--release"} + # windeployqt lists translation files that it don't exist (e.g. + # qtbase_ar.qm), so we handle those by hand. + # https://bugreports.qt.io/browse/QTBUG-65974 $wdqtList = windeployqt ` $DebugOrRelease ` --no-compiler-runtime ` + --no-translations ` --list relative ` $Executable - $dllPath = Split-Path -Parent $Executable + $basePath = Split-Path -Parent $Executable - $dllList = @() - $dirList = @() + $currentDir = "" foreach ($entry in $wdqtList) { $dir = Split-Path -Parent $entry - if ($dir) { - $dirList += "File /r `"$dllPath\$dir`"" - } else { - $dllList += "File `"$dllPath\$entry`"" + if ($dir -and $dir -ne $currentDir) { + $nsisCommands += "SetOutPath `"`$INSTDIR\$dir`"" + $currentDir = $dir } + $nsisCommands += "File `"$basePath\$entry`"" } - - $dirList = $dirList | Sort-Object | Get-Unique - - $nsisCommands += $dllList + $dirList } catch { diff --git a/packaging/wix/CMakeLists.txt b/packaging/wix/CMakeLists.txt index df8070431f..ba89480b62 100644 --- a/packaging/wix/CMakeLists.txt +++ b/packaging/wix/CMakeLists.txt @@ -266,6 +266,7 @@ macro( ADD_WIX_PACKAGE_TARGET ) COMMAND ${POWERSHELL_COMMAND} "${_wix_source_dir}/windeployqt-to-wix.ps1" -Executable $ -FilePath ${_wix_binary_dir}/QtDependentComponents.wxs + DEPENDS "${_wix_source_dir}/windeployqt-to-wix.ps1" ) # SNMPMibs.wxs. Collects all MIBs in "output" snmp/mibs diff --git a/packaging/wix/windeployqt-to-wix.ps1 b/packaging/wix/windeployqt-to-wix.ps1 index c90b97135a..a16964346f 100644 --- a/packaging/wix/windeployqt-to-wix.ps1 +++ b/packaging/wix/windeployqt-to-wix.ps1 @@ -62,6 +62,9 @@ try { Throw "Qt " + $qtVersion + " found. 5.3 or later is required." } + # windeployqt lists translation files that it don't exist (e.g. + # qtbase_ar.qm), so we handle those by hand. + # https://bugreports.qt.io/browse/QTBUG-65974 $wdqtList = windeployqt ` --release ` --no-compiler-runtime ` -- cgit v1.2.3