diff options
-rw-r--r-- | INSTALL | 6 | ||||
-rw-r--r-- | README.bsd | 2 | ||||
-rw-r--r-- | doc/README.developer | 2 | ||||
-rw-r--r-- | docbook/wsdg_src/WSDG_chapter_libraries.adoc | 2 | ||||
-rw-r--r-- | packaging/nsis/windeployqt-to-nsis.ps1 | 68 | ||||
-rw-r--r-- | packaging/wix/windeployqt-to-wix.ps1 | 139 |
6 files changed, 77 insertions, 142 deletions
@@ -14,9 +14,9 @@ README.windows for those instructions. development packages installed. Try running 'pkg-config glib-2.0 --modversion' to see if you have GLib 2.x installed. Then try running 'pkg-config Qt5Widgets --modversion' - to see if you have Qt installed. Wireshark needs version 4.8 or above - of Qt, although 5.2 and above are strongly recommended. It needs - version 2.22.0 or above of glib-2.0. If you need to install or + to see if you have Qt installed. Wireshark requires Qt 5.3 or later, + but the most recent LTS release is strongly recommended. It needs + version 2.32.0 or above of GLib. If you need to install or re-install GLIB, you can find the packages at: https://www.gtk.org diff --git a/README.bsd b/README.bsd index f5145d48da..94654c01fe 100644 --- a/README.bsd +++ b/README.bsd @@ -28,7 +28,7 @@ can be found at the following sites: If you want to use the Wireshark GUI, install one or both of these toolkits: - Qt 5.2 or later: + Qt 5.3 or later: http://download.qt-project.org/official_releases/qt/ diff --git a/doc/README.developer b/doc/README.developer index 42f2d0e31a..bf15d68c4f 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -409,7 +409,7 @@ own mkstemp implementation for use on platforms that lack mkstemp. Note: mkstemp does not accept NULL as a parameter. Wireshark requires mininum versions of each of the libraries it uses, in -particular GLib 2.32.0 and Qt 5.2.0 or newer. If you require a mechanism +particular GLib 2.32.0 and Qt 5.3.0 or newer. If you require a mechanism that is available only in a newer version of a library then use its version detection macros, e.g. "#if GLIB_CHECK_VERSION(...)" and "#if QT_VERSION_CHECK(...)" to conditionally compile code using that diff --git a/docbook/wsdg_src/WSDG_chapter_libraries.adoc b/docbook/wsdg_src/WSDG_chapter_libraries.adoc index 5c6ba16e80..0ad9cc386d 100644 --- a/docbook/wsdg_src/WSDG_chapter_libraries.adoc +++ b/docbook/wsdg_src/WSDG_chapter_libraries.adoc @@ -78,7 +78,7 @@ must be set appropriately. === Qt The Qt library is used to build the UI for Wireshark and is used to provide a -platform independent UI. Wireshark can be built with Qt 5.2 or later. +platform independent UI. Wireshark can be built with Qt 5.3 or later. For more information on the Qt libraries, see <<ChUIQt>>. diff --git a/packaging/nsis/windeployqt-to-nsis.ps1 b/packaging/nsis/windeployqt-to-nsis.ps1 index 3443172f9a..0271a27a3c 100644 --- a/packaging/nsis/windeployqt-to-nsis.ps1 +++ b/packaging/nsis/windeployqt-to-nsis.ps1 @@ -18,17 +18,9 @@ Creates NSIS "File" function calls required for Qt packaging. .DESCRIPTION -This script creates an NSIS-compatible 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 an NSIS-compatible 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. @@ -68,47 +60,35 @@ try { $qtVersion = [version](qmake -query QT_VERSION) $nsisCommands = @("# 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." + } - $DebugOrRelease = If ($DebugConfig) {"--debug"} Else {"--release"} + $DebugOrRelease = If ($DebugConfig) {"--debug"} Else {"--release"} - $wdqtList = windeployqt ` - $DebugOrRelease ` - --no-compiler-runtime ` - --list relative ` - $Executable + $wdqtList = windeployqt ` + $DebugOrRelease ` + --no-compiler-runtime ` + --list relative ` + $Executable - $dllPath = Split-Path -Parent $Executable + $dllPath = Split-Path -Parent $Executable - $dllList = @() - $dirList = @() + $dllList = @() + $dirList = @() - foreach ($entry in $wdqtList) { - $dir = Split-Path -Parent $entry - if ($dir) { - $dirList += "File /r `"$dllPath\$dir`"" - } else { - $dllList += "File `"$dllPath\$entry`"" - } + foreach ($entry in $wdqtList) { + $dir = Split-Path -Parent $entry + if ($dir) { + $dirList += "File /r `"$dllPath\$dir`"" + } else { + $dllList += "File `"$dllPath\$entry`"" } + } - $dirList = $dirList | Sort-Object | Get-Unique - - $nsisCommands += $dllList + $dirList - - } elseif ($qtVersion -ge "5.0") { - # Qt 5.0 - 5.2. Windeployqt is buggy or not present + $dirList = $dirList | Sort-Object | Get-Unique - $nsisCommands += @" -File "..\..\wireshark-qt-release\Qt5Core.dll" -File "..\..\wireshark-qt-release\Qt5Gui.dll" -File "..\..\wireshark-qt-release\Qt5Widgets.dll" -File "..\..\wireshark-qt-release\Qt5PrintSupport.dll" -File /r "..\..\wireshark-qt-release\platforms" -"@ - - } + $nsisCommands += $dllList + $dirList } catch { 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> |