aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-01-06 09:58:38 -0800
committerGerald Combs <gerald@wireshark.org>2020-01-06 19:50:50 +0000
commit7a09c78f123b5dd1237000726f19e2801edeaf39 (patch)
treef22a656841a463d52039b352380f5261031d57e9
parent05d772ce7b40008dcb99f492aece86507166c233 (diff)
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 <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r--CMakeLists.txt6
-rw-r--r--packaging/nsis/CMakeLists.txt1
-rw-r--r--packaging/nsis/windeployqt-to-nsis.ps121
-rw-r--r--packaging/wix/CMakeLists.txt1
-rw-r--r--packaging/wix/windeployqt-to-wix.ps13
5 files changed, 17 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 301fe24af0..799b7150ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1954,10 +1954,8 @@ if(WIN32)
add_custom_command(TARGET pdb_zip_package POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove -f "${_pdb_zip}"
COMMAND ${ZIP_EXECUTABLE} a -tzip -mmt=on "${_pdb_zip_win}"
- *.pdb *.lib
- extcap/*.pdb
- ${PLUGIN_VERSION_DIR}/epan/*.pdb
- ${PLUGIN_VERSION_DIR}/wiretap/*.pdb
+ -bb2
+ -r *.pdb *.lib
WORKING_DIRECTORY "${_dll_output_dir}"
)
endif()
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 $<TARGET_FILE:wireshark>
-FilePath ${_nsis_binary_dir}/qt-dll-manifest.nsh
$<$<CONFIG:Debug>:-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 $<TARGET_FILE:wireshark>
-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 `