diff options
author | Gerald Combs <gerald@wireshark.org> | 2022-01-30 19:01:06 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2022-02-03 03:05:03 +0000 |
commit | 3abd16312730200b7d72329c421f06849efcdb04 (patch) | |
tree | 7e9f5d4b59bb57fc926bf09e05c24c859d118662 | |
parent | c442f180f744e7a8affe4f0721460e0340f69838 (diff) | |
download | wireshark-3abd16312730200b7d72329c421f06849efcdb04.tar.gz wireshark-3abd16312730200b7d72329c421f06849efcdb04.tar.bz2 wireshark-3abd16312730200b7d72329c421f06849efcdb04.zip |
Docs: Start migrating the Developer's Guide to Visual Studio 2022.
-rw-r--r-- | docbook/wsdg_src/WSDG_chapter_quick_setup.adoc | 16 | ||||
-rw-r--r-- | docbook/wsdg_src/WSDG_chapter_tools.adoc | 50 |
2 files changed, 46 insertions, 20 deletions
diff --git a/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc b/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc index 1d77b51eb7..7a461dd676 100644 --- a/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc +++ b/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc @@ -237,19 +237,22 @@ You can install Chocolatey packages using the command `choco install` (or its sh ==== Install Microsoft Visual Studio -https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16[Download] and install “Microsoft Visual Studio 2019 Community Edition”. -This is a small utility that downloads all the other required parts (which are quite large). +Download and install https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16[“Microsoft Visual Studio 2019 Community Edition”]. +If you prefer you can instead download and install https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=17[“Microsoft Visual Studio 2022 Community Edition”]. +These are small utilities that download all the other required parts (which are quite large). Check the checkbox for “Desktop development with {cpp}” and then uncheck -all the optional components other than the “V{cpp} 2019” item with the +all the optional components other than the “V{cpp} 2019” or “V{cpp} 2022” item with the “latest ... tools”, the “Windows 10 SDK”, and the “Visual {cpp} tools for CMake” (unless you want to use them for purposes other than Wireshark). You can alternatively use Chocolatey to install Visual Studio, using the Visual Studio Community and Native Desktop workload packages. -Note that this includes CMake. +Note that this includes Visual Studio’s CMake component. ---- PS$> choco install -y visualstudio2019community visualstudio2019-workload-nativedesktop +PS$> # OR +PS$> choco install -y visualstudio2022community visualstudio2022-workload-nativedesktop ---- // winget has basic VS 2022 and 2019 packages, but no native desktop workload packages. @@ -292,6 +295,7 @@ 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_ The Qt maintenance tool (_C:\Qt\MaintenanceTool.exe_) can be used to @@ -576,6 +580,8 @@ If you've closed the Visual Studio Command Prompt <<ChSetupPrepareCommandCom,pre To generate the build files enter the following at the Visual Studio command prompt: ---- > cmake -G "Visual Studio 16 2019" -A x64 ..\wireshark +> : or +> cmake -G "Visual Studio 17 2022" -A x64 ..\wireshark ---- Adjusting the path to the Wireshark source tree as required. @@ -586,6 +592,8 @@ To build a 32-bit / x86 version, specify “Win32” as the architecture: ---- > cmake -G "Visual Studio 16 2019" -A Win32 ..\wireshark +> : or +> cmake -G "Visual Studio 17 2022" -A Win32 ..\wireshark ---- The CMake generation process will download the required 3rd party libraries (apart from Qt) diff --git a/docbook/wsdg_src/WSDG_chapter_tools.adoc b/docbook/wsdg_src/WSDG_chapter_tools.adoc index d64cf49c35..6d51f260ce 100644 --- a/docbook/wsdg_src/WSDG_chapter_tools.adoc +++ b/docbook/wsdg_src/WSDG_chapter_tools.adoc @@ -287,6 +287,7 @@ _windows.h_, _WS2_32.lib_) Official releases are or were built with the following Visual {cpp} versions: +// * Wireshark 4.0.x: Microsoft Visual {cpp} 2022. * Wireshark 3.6.x: Microsoft Visual {cpp} 2019. * Wireshark 3.4.x: Microsoft Visual {cpp} 2019. * Wireshark 3.2.x: Microsoft Visual {cpp} 2019. @@ -306,7 +307,7 @@ Official releases are or were built with the following Visual {cpp} versions: Using the release compilers is recommended for Wireshark development work. “Community” editions of Visual Studio such as “Visual Studio Community -2019” can be used to compile Wireshark but any PortableApps packages you +2022” can be used to compile Wireshark but any PortableApps packages you create with them might require the installation of a separate Visual {cpp} Redistributable package on any machine on which the PortableApps package is to be used. See <<msvc-runtime-redistributable>> below for @@ -320,7 +321,22 @@ Essentials] account if you don't have a Visual Studio (MSDN) subscription. The older versions can be downloaded from https://visualstudio.microsoft.com/vs/older-downloads/[]. -.Visual {cpp} 2019 Community Edition +==== Visual {cpp} 2022 Community Edition + +IDE + Debugger?:: Yes + +SDK required for 64-bit builds?:: No + +CMake Generator: *`Visual Studio 17`* + +You can use Chocolatey to install Visual Studio, e.g: + +[source,cmd] +---- +PS:\> choco install visualstudiocommunity2022 visualstudio2022-workload-nativedesktop +---- + +==== Visual {cpp} 2019 Community Edition IDE + Debugger?:: Yes @@ -342,11 +358,13 @@ Microsoft toolchain variants and their specific C compiler versions ordered by release date. |=== -|Compiler Package|cl.exe|_MSC_VER -|Visual Studio 2019|16.0.0|1920 -|Visual Studio 2019|16.1.2|1921 -|Visual Studio 2019|16.2.3|1922 -|Visual Studio 2019|16.3.2|1923 +| Compiler Package | cl.exe | _MSC_VER +| Visual Studio 2019 | 16.0.0 | 1920 +| Visual Studio 2019 | 16.1.2 | 1921 +| Visual Studio 2019 | 16.2.3 | 1922 +| Visual Studio 2019 | 16.3.2 | 1923 +| Visual Studio 2022 | 17.0 | 1930 +| Visual Studio 2022 | 17.1 | 1931 |=== After correct installation of the toolchain, typing @@ -368,8 +386,8 @@ usage: cl [ option... ] filename... [ /link linkoption... ] However, the version string may vary. -Documentation on the compiler can be found at -https://docs.microsoft.com/en-us/cpp/build/reference/compiling-a-c-cpp-program?view=vs-2019[Microsoft Docs] +Documentation on recent versions of the compiler can be found at +https://docs.microsoft.com/en-us/cpp/build/reference/compiling-a-c-cpp-program[Microsoft Docs] ==== link.exe (Linker) @@ -392,8 +410,8 @@ Copyright (C) Microsoft Corporation. All rights reserved. However, the version string may vary. -Documentation on the linker can be found at -https://docs.microsoft.com/en-us/cpp/build/reference/linking?view=vs-2019[Microsoft Docs] +Documentation on recent versions of the linker can be found at +https://docs.microsoft.com/en-us/cpp/build/reference/linking[Microsoft Docs] [#msvc-runtime-redistributable] @@ -409,8 +427,8 @@ Visual {cpp} 2015 and later use the _Universal CRT_ (UCRT). The Universal CRT comes standard with Windows 10 and is installed as part of Windows Update on earlier versions of Windows. The Wireshark .exe -installers include redistributables (_vcredist_x86.exe_ or -_vcredist_x64.exe_) which ensure that the Universal CRT is installed and +installers include redistributables (_vc_redist.x64.exe_ or +_vc_redist.x86.exe_) which ensure that the Universal CRT is installed and up to date. [NOTE] @@ -425,9 +443,9 @@ us. The following Microsoft Docs link is recommended for the interested reader: -https://docs.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=vs-2019[Redistributing Visual {cpp} Files] +https://docs.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files[Redistributing Visual {cpp} Files] -In all cases where _vcredist_x86.exe_ or _vcredist_x64.exe_ is +In all cases where _vc_redist.x64.exe_ or _vc_redist.x86.exe_ is downloaded it should be downloaded to the directory into which the support libraries for Wireshark have been downloaded and installed. This directory is specified by the `WIRESHARK_BASE_DIR` or @@ -975,7 +993,7 @@ You can download it from the link:https://wixtoolset.org/[WiX web site] or insta PS$> choco install wixtoolset ---- -This also requires the Visual C++ redistributable merge modules, which can be installed by selecting “Individual Components -> {cpp} 2019 Redistributable MSMs” in the Visual Studio installer. +This also requires the Visual C++ redistributable merge modules, which can be installed by selecting “Individual Components -> {cpp} 2022 Redistributable MSMs” or “...2019 Redistributable MSMs” as appropriate for your compiler in the Visual Studio installer. Wireshark’s .msi packaging is currently experimental and the generated packages may be incomplete. |