WSDG: retire Visual Studio 2019 for VS2022

This commit is contained in:
Chuck Craft 2022-11-30 19:26:31 -06:00
parent cb85a4b1a4
commit d153113cdf
3 changed files with 26 additions and 39 deletions

View File

@ -268,7 +268,7 @@ Jobs provide a link to the corresponding console logfile which provides addition
Release packages are built on the following platforms:
* Windows Server 2019 x86-64 (Win64, little endian, Visual Studio 2019)
* Windows Server 2019 x86-64 (Win64, little endian, Visual Studio 2022)
* Ubuntu 18.04 x86-64 (Linux, little endian, gcc, Clang)
@ -276,7 +276,7 @@ Release packages are built on the following platforms:
Static code analysis and fuzz tests are run on the following platforms:
* Visual Studio Code Analysis (Win64, little endian, VS 2019)
* Visual Studio Code Analysis (Win64, little endian, VS 2022)
* Clang Code Analysis, Coverity Scan, and fuzz tests (Linux, little endian, Clang)

View File

@ -261,28 +261,31 @@ choco install -y git cmake python3
==== Install Microsoft Visual Studio
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”].
Download and install https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=17[“Microsoft Visual Studio 2022 Community Edition”].
If you prefer you can instead download and install https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16[“Microsoft Visual Studio 2019 Community Edition”].
The examples below are for Visual Studio 2022 but can be adapted for Visual Studio 2019.
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” 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).
all the optional components other than
* “MSVC ... VS 2022 {cpp}” item with the “... build tools (Latest)”
* “Windows 11 SDK”
* “{cpp} CMake tools for Windows"
(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 Visual Studios CMake component.
----
choco install -y visualstudio2019community visualstudio2019-workload-nativedesktop
# OR
choco install -y visualstudio2022community visualstudio2022-workload-nativedesktop
----
// winget has basic VS 2022 and 2019 packages, but no native desktop workload packages.
// https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VisualStudio
You can use other Microsoft C compiler variants, but VS2019 is used to
You can use other Microsoft C compiler variants, but VS2022 is used to
build the development releases and is the preferred option. Its
possible to compile Wireshark with a wide range of Microsoft C compiler
variants. For details see <<ChToolsMSChain>>.
@ -301,7 +304,7 @@ of Visual Studio add more cross-platform support.
Why is this recommended?
While this is a huge download, the Community Editions of Visual Studio are free (as in beer) and include the Visual Studio integrated debugger.
Visual Studio 2019 is also used to create official Wireshark builds, so it will likely have fewer development-related problems.
Visual Studio 2022 is also used to create official Wireshark builds, so it will likely have fewer development-related problems.
[#ChSetupQt]
@ -534,11 +537,11 @@ Make sure your repository path doesn't contain spaces.
==== Open a Visual Studio Command Prompt
From the Start Menu (or Start Screen), navigate to the “Visual Studio 2019” folder and choose the https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019#developer_command_prompt_shortcuts[Command Prompt] appropriate for the build you wish to make, e.g. “x64 Native Tools Command Prompt for VS 2019” for a 64-bit version or “x86 Native Tools Command Prompt for VS 2019” for a 32-bit version.
Depending on your version of Windows the Command Prompt list might be directly under “Visual Studio 2019” or you might have to dig for it under multiple folders, e.g. menu:Visual Studio 2019[Visual Studio Tools,Windows Desktop Command Prompts].
From the Start Menu (or Start Screen), navigate to the “Visual Studio 2022” folder and choose the https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#developer_command_prompt_shortcuts[Command Prompt] appropriate for the build you wish to make, e.g. “x64 Native Tools Command Prompt for VS 2022” for a 64-bit version.
Depending on your version of Windows the Command Prompt list might be directly under “Visual Studio 2022” or you might have to dig for it under multiple folders, e.g. menu:Visual Studio 2022[Visual Studio Tools,Windows Desktop Command Prompts].
You can set up a build environment in your own command prompt by running the appropriate `vcvars__ARCHITECTURE__.bat` command.
See https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019#use-the-developer-tools-in-an-existing-command-window[Use the Microsoft C++ toolset from the command line] for details.
See https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#use-the-developer-tools-in-an-existing-command-window[Use the Microsoft C++ toolset from the command line] for details.
[TIP]
.Pin the items to the Task Bar
@ -612,8 +615,6 @@ 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 17 2022" -A x64 ..\wireshark
: or
cmake -G "Visual Studio 16 2019" -A x64 ..\wireshark
----
Adjusting the path to the Wireshark source tree as required.

View File

@ -314,7 +314,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 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.
@ -363,21 +363,6 @@ You can use Chocolatey to install Visual Studio, e.g:
PS:\> choco install visualstudiocommunity2022 visualstudio2022-workload-nativedesktop
----
==== Visual {cpp} 2019 Community Edition
IDE + Debugger?:: Yes
SDK required for 64-bit builds?:: No
CMake Generator: *`Visual Studio 16`*
You can use Chocolatey to install Visual Studio, e.g:
[source,cmd]
----
PS:\> choco install visualstudiocommunity2019 visualstudio2019-workload-nativedesktop
----
==== cl.exe (C Compiler)
The following table gives an overview of the possible
@ -385,15 +370,16 @@ 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
| Visual Studio 2022 | 17.0 | 1930
| Visual Studio 2022 | 17.1 | 1931
| Compiler Package | V{cpp} | _MSC_VER
| Visual Studio 2022 (17.4.2) | 14.34 | 1934
|===
A description of `_MSC_VER` and `_MSC_FULL_VER`, and their relation to Visual Studio and compiler versions,
can be found at
https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170[Microsoft-specific predefined macros].
Information on the V{cpp} version can be found in the file _ui/version_info.c_.
After correct installation of the toolchain, typing
at the Visual Studio Command line prompt (cmd.exe):