From 645b9ab7f4a9494cc385d478e7c79a3fe6146377 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Mon, 22 Aug 2022 15:27:05 +0200 Subject: [PATCH] Qt6: Adapt various docs --- README.macos | 24 +++++++------------ doc/README.developer | 4 ++-- docbook/developer-guide.adoc | 2 +- docbook/wsdg_src/WSDG_chapter_libraries.adoc | 15 ++++++------ .../wsdg_src/WSDG_chapter_quick_setup.adoc | 20 ++++++++-------- .../wsug_src/WSUG_chapter_introduction.adoc | 5 +++- 6 files changed, 34 insertions(+), 36 deletions(-) diff --git a/README.macos b/README.macos index 63acd5111d..b03ab8830f 100644 --- a/README.macos +++ b/README.macos @@ -43,18 +43,12 @@ directory. After you have installed those libraries: - 1. If you have installed Qt into some non-standard place, as is - distinctly possible with the build included with - macos-setup.sh, you must inform cmake by either including its - "bin" directory as part of the PATH environment variable or - setting CMAKE_PREFIX_PATH to the directory above Qt's "lib" - directory. For Qt 5.8 installed into one's home directory, - for instance: + 1. It is generally recommended to install Qt with the online installer + provided by Qt - see https://www.qt.io/download - % export CMAKE_PREFIX_PATH=~/Qt5.8.0/5.8/clang_64 - - This step is unnecessary if you've used a recent version of - Homebrew, as the CMake build scripts will find Qt. + If you are building on an Apple Silicon machine, it is highly recommended + to use at least Qt 6.2.4, as this architecture is not fully supported + with Qt 5.15 2. Make a directory in which Wireshark is to be built, separate from the top-level source directory for Wireshark - it can be a @@ -75,19 +69,19 @@ directory; make It is also possible to use the Xcode IDE to build and debug Wireshark -using cmake's Xcode generator. Create a separate build directory, as -described above and run cmake with the "-G Xcode" argument to create +using cmake's Xcode generator. Create a separate build directory, as +described above and run cmake with the "-G Xcode" argument to create a Xcode project file in the current directory. cmake -G Xcode .. - 1. Double click Wireshark.xcodeproj + 1. Double click Wireshark.xcodeproj 2. Choose to create schemes manually 3. Create a scheme for the ALL_BUILD target - 4. Edit the scheme, go to the run configuration and select Wireshark.app + 4. Edit the scheme, go to the run configuration and select Wireshark.app as executable If you upgrade the major release of macOS on which you are building diff --git a/doc/README.developer b/doc/README.developer index 0377a9f0d3..c09a8cacc1 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -429,7 +429,7 @@ own mkstemp implementation for use on platforms that lack mkstemp. Note: mkstemp does not accept NULL as a parameter. Wireshark requires minimum versions of each of the libraries it uses, in -particular GLib 2.50.0 and Qt 5.9.0 or newer. If you require a mechanism +particular GLib 2.50.0 and Qt 5.12.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 @@ -836,7 +836,7 @@ header file (foobar.h) looks like this: followed by #ifdef __cplusplus - extern "C" { + extern "C" { #endif (declarations) #ifdef __cplusplus diff --git a/docbook/developer-guide.adoc b/docbook/developer-guide.adoc index 882dde77e4..8cc8de7150 100644 --- a/docbook/developer-guide.adoc +++ b/docbook/developer-guide.adoc @@ -17,7 +17,7 @@ endif::[] // XXX This should be surrounded by single quotes in the text. It’s // currently surrounded by plus signs for AsciiDoc compatibility. :dlt-glob: DLT_* -:qt-lts-version: 5.15 +:qt-lts-version: 6.2.4 :source-highlighter: coderay include::wsdg_src/WSDG_preface.adoc[] diff --git a/docbook/wsdg_src/WSDG_chapter_libraries.adoc b/docbook/wsdg_src/WSDG_chapter_libraries.adoc index 8033a71a46..6297ba0104 100644 --- a/docbook/wsdg_src/WSDG_chapter_libraries.adoc +++ b/docbook/wsdg_src/WSDG_chapter_libraries.adoc @@ -46,7 +46,9 @@ You may also set the library directory to a custom value with the environment va === 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.6 or later and has experimental support for Qt 6. +Wireshark can be built with Qt 5.12 or later, but looks for Qt 6 as the default version. + +To enable builds with Qt 5.x, the command-line option `-DUSE_qt6=OFF` has to be set for cmake. For more information on the Qt libraries, see <>. @@ -57,8 +59,8 @@ For more information on the Qt libraries, see <>. Most Linux distributions provide Qt and its development libraries as standard packages. The required libraries and tools will likely be split across several packages. For example, -building on Ubuntu requires _qttools5-dev_, _qttools5-dev-tools_, _libqt5svg5-dev_, -_qtmultimedia5-dev_, and possibly others. +building on Ubuntu requires _qt6-tools-dev_, _qt6-tools-dev-tools_, _libqt6svg6-dev_, +_qt6-multimedia-dev_, and possibly others. The Qt Project provides an installation tool for macOS, similar to Windows. It is available at https://www.qt.io/download-open-source/#section-2[]. @@ -68,10 +70,9 @@ It is available at https://www.qt.io/download-open-source/#section-2[]. [discrete] ==== Windows -Qt5 must be installed manually from the Qt installers page https://www.qt.io/download-open-source/#section-2[] using the version of Qt appropriate for your compiler. -Note that separate installations (into different directories) of Qt are required for 32 bit and 64 bit builds. -The environment variable `https://doc.qt.io/qt-5/cmake-get-started.html[CMAKE_PREFIX_PATH]` should be set to your Qt installation directory, e.g. _C:\Qt{backslash}{qt-lts-version}.2\msvc2019_64_. -You can alternatively set QT5_BASE_DIR to your Qt installation path, but this is no longer recommended. +Qt 6 must be installed manually from the Qt installers page https://www.qt.io/download-open-source/#section-2[] using the version of Qt appropriate for your compiler. + +The environment variable CMAKE_PREFIX_PATH (see `https://doc.qt.io/qt-6/cmake-get-started.html`) should be set to your Qt installation directory, e.g. _C:\Qt{backslash}{qt-lts-version}\msvc2019_64_. [#ChLibsGLib] diff --git a/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc b/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc index c80f947e3a..4cf05816fc 100644 --- a/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc +++ b/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc @@ -296,19 +296,20 @@ Qt, go to the https://www.qt.io/download[“Download Qt” page], select “Go open source”, download the *Qt Online Installer for Windows* from the Qt Project and select, for the desired Qt version, a component that matches your target system and compiler. For example, at the time of this -writing the Qt {qt-lts-version}.2 “msvc2019 64-bit” component is used to +writing the Qt {qt-lts-version} “msvc2019 64-bit” component is used to build the official 64-bit packages. The “Qt Debug Information Files” component contains PDB files which can be used for debugging. You can deselect all of the other the components such as “Qt Charts” or “Android xxxx” as they aren’t required. -Note that installation of separate Qt components are required for 64 bit and 32 bit builds, e.g. “msvc2019 64-bit” and “msvc2019 32-bit”. -The components are forward compatible; you can build Wireshark using Qt’s “msvc2019 64-bit” and Visual {cpp} 2022. -The environment variable `https://doc.qt.io/qt-5/cmake-get-started.html[CMAKE_PREFIX_PATH]` should be set as appropriate for your environment and should point to the Qt installation directory, e.g. _C:\Qt{backslash}{qt-lts-version}.2\msvc2019_64_ +Qt 6 needs the "Qt 5 Compatibility Module" to be installed as well. Additionally, the module +"Qt Multimedia" may be installed, to support advanced controls for playing back streams in the +RTP Player dialog. -By default Wireshark uses Qt 6. If you would like to build Wireshark with Qt 5 you must pass `-DUSE_qt6=OFF` to cmake. +The environment variable CMAKE_PREFIX_PATH (see `https://doc.qt.io/qt-6/cmake-get-started.html`) should be set as appropriate for your environment and should point to the Qt installation directory, e.g. _C:\Qt{backslash}{qt-lts-version}\msvc2019_64_ -The Qt maintenance tool (_C:\Qt\MaintenanceTool.exe_) can be used to upgrade Qt to newer versions. +Qt 6 is the default option for building Wireshark, but Wireshark has support for Qt 5.12 and later. To enable Wireshark to build with Qt 5 pass `-DUSE_qt6=OFF` +to cmake. [#ChSetupPython] @@ -541,7 +542,7 @@ Set the following environment variables, using paths and values suitable for you > set WIRESHARK_BASE_DIR=C:\Development > rem set WIRESHARK_LIB_DIR=c:\wireshark-win64-libs > rem Set the Qt installation directory -> set CMAKE_PREFIX_PATH=C:\Qt{backslash}{qt-lts-version}.2\msvc2019_64 +> set CMAKE_PREFIX_PATH=C:\Qt{backslash}{qt-lts-version}\msvc2019_64 > rem Append a custom string to the package version. Optional. > set WIRESHARK_VERSION_EXTRA=-YourExtraVersionInfo ---- @@ -550,10 +551,9 @@ Setting these variables could be added to a batch file to be run after you open the Visual Studio Tools Command Prompt. [TIP] -.Use Qt’s LTS branch +.Use of Qt’s LTS branch ==== -We recommend using the most recent “long term support” branch of Qt5 to -compile Wireshark on Windows. At the time of writing this is Qt +It is generally recommended to use a LTS ("long term support") version for Qt. The current LTS version for Qt 6 is {qt-lts-version}. ==== diff --git a/docbook/wsug_src/WSUG_chapter_introduction.adoc b/docbook/wsug_src/WSUG_chapter_introduction.adoc index d419c595ff..6168c16868 100644 --- a/docbook/wsug_src/WSUG_chapter_introduction.adoc +++ b/docbook/wsug_src/WSUG_chapter_introduction.adoc @@ -208,14 +208,17 @@ release lifecycle] page for more details. ==== macOS -Wireshark supports macOS 10.13 and later. +Wireshark supports macOS 10.14 and later. Similar to Windows, supported macOS versions depend on third party libraries and on Apple’s requirements. +Apple Silicon hardware is supported natively starting with version 4.0 +// Wireshark 4.0 ships with Qt 6.2.4, which requires macOS 10.14 and later // Wireshark 3.6 ships with Qt 5.15, which requires macOS 10.13 and later. // Wireshark 3.4, 3.2 and 3.0 ship with Qt 5.12, which requires macOS 10.12 and later. // Wireshark 2.6 ships with Qt 5.3, which was the last release to support 10.6: https://wiki.qt.io/New_Features_in_Qt_5.3 // "Mac OS 10.6 support is deprecated and scheduled for removal in Qt 5.4" +* Wireshark 3.6 was the last release branch to support macOS 10.13. * Wireshark 3.4 was the last release branch to support macOS 10.12. * Wireshark 2.6 was the last release branch to support Mac OS X 10.6 and 10.7 and OS X 10.8 to 10.11. * Wireshark 2.0 was the last release branch to support OS X on 32-bit Intel.