aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/nsis/windeployqt-to-nsis.ps1
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-08-07 17:30:45 -0700
committerGraham Bloice <graham.bloice@trihedral.com>2014-08-14 10:26:31 +0000
commit673247f04f3b8c1534cb49a850a1f0bbd71c02e0 (patch)
treec711e9e2cf1343d9c5278dba15db74a68213e89c /packaging/nsis/windeployqt-to-nsis.ps1
parentd68d0e88b4924a610b5cd2fd3a748b00c9bbab1a (diff)
Windows: Clean up text file packaging.
Convert textify.sh to PowerShell. Use PowerShell's built-in line ending conversion so that we don't depend on unix2dos. Only copy the help toc and text files to the staging directory. Add PowerShell to the Developer's Guide. Fixup some other content. (asn1/Makefile.inc.nmake contains a call to u2d. Hopefully that's not a problem.) Change-Id: I61a92aa54820d01015abb9ffa65815558ae31c71 Reviewed-on: https://code.wireshark.org/review/3487 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'packaging/nsis/windeployqt-to-nsis.ps1')
-rw-r--r--packaging/nsis/windeployqt-to-nsis.ps178
1 files changed, 71 insertions, 7 deletions
diff --git a/packaging/nsis/windeployqt-to-nsis.ps1 b/packaging/nsis/windeployqt-to-nsis.ps1
index a47d00e363..8fe9d965f4 100644
--- a/packaging/nsis/windeployqt-to-nsis.ps1
+++ b/packaging/nsis/windeployqt-to-nsis.ps1
@@ -1,11 +1,70 @@
# windeployqt-to-nsh
#
-# Convert the output of windeployqt to an equivalent set of NSIS "File"
-# function calls.
+# Windeployqt-to-nsh - Convert the output of windeployqt to an equivalent set of
+# NSIS "File" function calls.
+#
+# Copyright 2014 Gerald Combs <gerald@wireshark.org>
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+#requires -version 2
+
+<#
+.SYNOPSIS
+Convert the output of windeployqt to an equivalent set of NSIS "File"
+function calls.
+
+.DESCRIPTION
+This script reads the output of Qt's "windeployqt" utility and converts it to a
+set of file packaging commands suitable for use with NSIS. Windeployqt lists the
+DLLs required to run a Qt application. It ships with Qt 5.2 and later.
+
+.PARAMETER Windeployqt
+Specifies the path to the windeployqt utility.
+
+.PARAMETER Executable
+The path to a Qt application. It will be examined for dependent DLLs.
+
+.PARAMETER FilePath
+Output filename.
+
+.INPUTS
+-Windeployqt Path to the windeployqt utility.
+-Executable Path to the Qt application.
+-FilePath Output NSIS file.
+
+.OUTPUTS
+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
+#>
Param(
- [string[]] $Windeployqt,
- [string[]] $Executable
+ [Parameter(Mandatory=$true, Position=0)]
+ [String] $Windeployqt,
+
+ [Parameter(Mandatory=$true, Position=1)]
+ [String] $Executable,
+
+ [Parameter(Position=2)]
+ [String] $FilePath = "qt-dll-manifest.nsh"
)
$wdqtList = & $Windeployqt `
@@ -30,11 +89,16 @@ foreach ($entry in $wdqtList) {
$dirList = $dirList | Sort-Object | Get-Unique
+Set-Content $FilePath @"
+#
+# Automatically generated by $($MyInvocation.MyCommand.Name)
+#
+"@
+
foreach ($entry in $dllList) {
- write-output "File `"$dllPath\$entry`""
+ Add-Content $FilePath "File `"$dllPath\$entry`""
}
foreach ($entry in $dirList) {
- write-output "File /r `"$dllPath\$entry`""
+ Add-Content $FilePath "File /r `"$dllPath\$entry`""
}
-