diff options
author | Gerald Combs <gerald@wireshark.org> | 2019-12-10 08:35:17 -0800 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2019-12-10 19:52:58 +0000 |
commit | 6f9efa7583fc31006ac51f2663b81d5a3eb6eabf (patch) | |
tree | b307fb2957254ffc68dd2b417aa2541e0f33e802 /packaging/wix | |
parent | c5093fb2274eb172e3e2ba046f2f2fd823dba0c6 (diff) |
More Qt minimum version updates.
Update the minimum version in various documents. Remove some
no-longer-needed code from scripts that call windeployqt.
Change-Id: I16da4bced9780c9f1b1969aae7c52e2fce1968aa
Reviewed-on: https://code.wireshark.org/review/35391
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'packaging/wix')
-rw-r--r-- | packaging/wix/windeployqt-to-wix.ps1 | 139 |
1 files changed, 47 insertions, 92 deletions
diff --git a/packaging/wix/windeployqt-to-wix.ps1 b/packaging/wix/windeployqt-to-wix.ps1 index 70623a2b3d..c90b97135a 100644 --- a/packaging/wix/windeployqt-to-wix.ps1 +++ b/packaging/wix/windeployqt-to-wix.ps1 @@ -18,17 +18,9 @@ Creates Wix components required for Qt packaging. .DESCRIPTION -This script creates an Wix-compatible include file based on the following Qt -versions: - - - 5.3 and later: A list of DLLs and directories based on the output of the - "windeployqt" utility. Windeployqt lists the DLLs required to run a Qt - application. (The initial version that shipped with Qt 5.2 is unusable.) - - - 5.2 and earlier: A hard-coded list of Qt DLLs and directories appropriate - for earlier Qt versions. - - - None: A dummy file. +This script creates n Wix-compatible include file based on the output of +windeployqt. If Qt is present, version 5.3 or later is required. +Otherwise a dummy file will be created. If building with Qt, QMake must be in your PATH. @@ -66,120 +58,83 @@ try { $wixComponents += @("<!-- Qt version " + $qtVersion ; "--> ") - if ($qtVersion -ge "5.3") { - # Qt 5.3 or later. Windeployqt is present and works + if ($qtVersion -lt "5.3") { + Throw "Qt " + $qtVersion + " found. 5.3 or later is required." + } - $wdqtList = windeployqt ` - --release ` - --no-compiler-runtime ` - --no-translations ` - --list relative ` - $Executable + $wdqtList = windeployqt ` + --release ` + --no-compiler-runtime ` + --no-translations ` + --list relative ` + $Executable - $dllPath = Split-Path -Parent $Executable + $dllPath = Split-Path -Parent $Executable - $dllList = " <Fragment> + $dllList = " <Fragment> <DirectoryRef Id=`"INSTALLFOLDER`"> " - $dirList = "" - $currentDir = "" - $startDirList = " <Fragment> + $dirList = "" + $currentDir = "" + $startDirList = " <Fragment> <DirectoryRef Id=`"INSTALLFOLDER`"> " - $endDirList = " </Directory> + $endDirList = " </Directory> </DirectoryRef> </Fragment> " - $currentDirList = $startDirList + $currentDirList = $startDirList - $componentGroup = " <Fragment> + $componentGroup = " <Fragment> <ComponentGroup Id=`"CG.QtDependencies`"> " - foreach ($entry in $wdqtList) { - $dir = Split-Path -Parent $entry - if ($dir) { - if ($dir -ne $currentDir) { - if ($currentDir -ne "") { # for everything but first directory found - $currentDirList += $endDirList - - # Previous directory complete, add to list - $dirList += $currentDirList - } else { - } - - $currentDirList = $startDirList + " <Directory Id=`"dir$dir`" Name=`"$dir`"> - " - - $currentDir = $dir + foreach ($entry in $wdqtList) { + $dir = Split-Path -Parent $entry + if ($dir) { + if ($dir -ne $currentDir) { + if ($currentDir -ne "") { # for everything but first directory found + $currentDirList += $endDirList + + # Previous directory complete, add to list + $dirList += $currentDirList } + $currentDirList = $startDirList + " <Directory Id=`"dir$dir`" Name=`"$dir`"> + " + + $currentDir = $dir + } - $wix_name = $entry -replace "[\\|\.]", "_" - $currentDirList += " <Component Id=`"cmp$wix_name`" Guid=`"*`"> + $wix_name = $entry -replace "[\\|\.]", "_" + $currentDirList += " <Component Id=`"cmp$wix_name`" Guid=`"*`"> <File Id=`"fil$wix_name`" KeyPath=`"yes`" Source=`"`$(var.Staging.Dir)\$entry`" /> </Component> " - $componentGroup += " <ComponentRef Id=`"cmp$wix_name`" /> + $componentGroup += " <ComponentRef Id=`"cmp$wix_name`" /> " - } else { + } else { - $dllList += " <Component Id=`"cmp$entry`" Guid=`"*`"> + $dllList += " <Component Id=`"cmp$entry`" Guid=`"*`"> <File Id=`"fil$entry`" KeyPath=`"yes`" Source=`"`$(var.Staging.Dir)\$entry`" /> </Component> " - $componentGroup += " <ComponentRef Id=`"cmp$entry`" /> + $componentGroup += " <ComponentRef Id=`"cmp$entry`" /> " - } } + } - #finish up the last directory - $currentDirList += $endDirList - $dirList += $currentDirList + #finish up the last directory + $currentDirList += $endDirList + $dirList += $currentDirList - $dllList += " </DirectoryRef> + $dllList += " </DirectoryRef> </Fragment> " - $componentGroup += " </ComponentGroup> + $componentGroup += " </ComponentGroup> </Fragment> " - $wixComponents += $dllList + $dirList + $componentGroup - - } elseif ($qtVersion -ge "5.0") { - # Qt 5.0 - 5.2. Windeployqt is buggy or not present - - $wixComponents += @" - <Fragment> - <DirectoryRef Id=`"INSTALLFOLDER`"> - <Component Id=`"cmpQt5Core_dll`" Guid=`"*`"> - <File Id=`"filQt5Core_dll`" KeyPath=`"yes`" Source=`"`$(var.WiresharkQt.Dir)\Qt5Core.dll`" /> - </Component> - <Component Id=`"cmpQt5Gui_dll`" Guid=`"*`"> - <File Id=`"filQt5Gui_dll`" KeyPath=`"yes`" Source=`"`$(var.WiresharkQt.Dir)\Qt5Gui.dll`" /> - </Component> - <Component Id=`"cmpQt5Widgets_dll`" Guid=`"*`"> - <File Id=`"filQt5Widgets_dll`" KeyPath=`"yes`" Source=`"`$(var.WiresharkQt.Dir)\Qt5Widgets.dll`" /> - </Component> - <Component Id=`"cmpQt5PrintSupport_dll`" Guid=`"*`"> - <File Id=`"filQt5PrintSupport_dll`" KeyPath=`"yes`" Source=`"`$(var.WiresharkQt.Dir)\Qt5PrintSupport.dll`" /> - </Component> - <Component Id=`"cmpQwindows_dll`" Guid=`"*`"> - <File Id=`"filQwindows_dll`" KeyPath=`"yes`" Source=`"`$(var.WiresharkQt.Dir)\platforms\qwindows.dll`" /> - </Component> - </DirectoryRef> - </Fragment> - <Fragment> - <ComponentGroup Id=`"CG.QtDependencies`"> - <ComponentRef Id=`"cmpQt5Core_dll`" /> - <ComponentRef Id=`"cmpQt5Gui_dll`" /> - <ComponentRef Id=`"cmpQt5Widgets_dll`" /> - <ComponentRef Id=`"cmpQt5PrintSupport_dll`" /> - <ComponentRef Id=`"cmpQwindows_dll`" /> - </ComponentGroup> - </Fragment> -"@ - - } + $wixComponents += $dllList + $dirList + $componentGroup $wixComponents += @" </Wix> |