aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/nsis/windeployqt-to-nsis.ps1
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-07-30 09:33:43 -0700
committerGerald Combs <gerald@wireshark.org>2014-07-30 18:07:29 +0000
commit304388a44f6fcb468f98f2c7179bb39cb4ecd294 (patch)
tree90c1ceed286a6fe6352a3b9f0bdf9cb06ef26518 /packaging/nsis/windeployqt-to-nsis.ps1
parent8d05e85c17353a548327b8dda682e8dbf5518850 (diff)
Install our Qt DLL directories recursively.
Qwindows.dll at least needs to be in the "platforms" subdirectory. Use a PowerShell script to convert the output of windeployqt to its equivalent NSIS instructions. Give the Qt DLL manifest a .nsh extension. Make sure we uninstall known Qt DLL directories. DLLs now load correctly according to Dependency Walker. Install and uninstall our .qm files while we're here. Change-Id: I06ed279809e6fce0e008c5f278a56b1ae34c8f21 Reviewed-on: https://code.wireshark.org/review/3267 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'packaging/nsis/windeployqt-to-nsis.ps1')
-rw-r--r--packaging/nsis/windeployqt-to-nsis.ps140
1 files changed, 40 insertions, 0 deletions
diff --git a/packaging/nsis/windeployqt-to-nsis.ps1 b/packaging/nsis/windeployqt-to-nsis.ps1
new file mode 100644
index 0000000000..a47d00e363
--- /dev/null
+++ b/packaging/nsis/windeployqt-to-nsis.ps1
@@ -0,0 +1,40 @@
+# windeployqt-to-nsh
+#
+# Convert the output of windeployqt to an equivalent set of NSIS "File"
+# function calls.
+
+Param(
+ [string[]] $Windeployqt,
+ [string[]] $Executable
+)
+
+$wdqtList = & $Windeployqt `
+ --release `
+ --no-compiler-runtime `
+ --list relative `
+ $Executable
+
+$dllPath = Split-Path -Parent $Executable
+
+$dllList = @()
+$dirList = @()
+
+foreach ($entry in $wdqtList) {
+ $dir = Split-Path -Parent $entry
+ if ($dir) {
+ $dirList += $dir
+ } else {
+ $dllList += $entry
+ }
+}
+
+$dirList = $dirList | Sort-Object | Get-Unique
+
+foreach ($entry in $dllList) {
+ write-output "File `"$dllPath\$entry`""
+}
+
+foreach ($entry in $dirList) {
+ write-output "File /r `"$dllPath\$entry`""
+}
+