Skip to content

Commit 05a5b40

Browse files
committed
Add support for Visual Studio 2026
1 parent 58a6fbe commit 05a5b40

File tree

13 files changed

+211
-2
lines changed

13 files changed

+211
-2
lines changed

.github/workflows/cmake.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
- CC: vs2022
2828
CXX: vs2022
2929
os: windows-2022
30+
- CC: vs2026
31+
CXX: vs2026
32+
os: windows-2025-vs2026
3033
runs-on: ${{ matrix.os }}
3134
name: ${{ matrix.os }} ${{ matrix.CXX }}
3235
env:

.github/workflows/windows.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ jobs:
3636
vcpkgarch: x86-windows
3737
vcpkglibdir: lib
3838
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
39+
- name: VS2026Debug64
40+
vmimage: windows-2025-vs2026
41+
mpctype: vs2026
42+
BuildPlatform: x64
43+
BuildConfiguration: Debug
44+
vcpkgarch: x64-windows
45+
vcpkglibdir: debug/lib
46+
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
47+
- name: VS2026Release32
48+
vmimage: windows-2025-vs2026
49+
mpctype: vs2026
50+
BuildPlatform: Win32
51+
BuildConfiguration: Release
52+
vcpkgarch: x86-windows
53+
vcpkglibdir: lib
54+
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
3955
runs-on: ${{ matrix.vmimage }}
4056
name: ${{ matrix.name }}
4157
env:

config/wireshark.mpb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ project : glib {
3535
specific(vs2022) {
3636
macros += MSC_VER_REQUIRED=1930
3737
}
38+
specific(vs2026) {
39+
macros += MSC_VER_REQUIRED=1940
40+
}
3841
verbatim(nmake, top, 1) {
3942
include $(WIRESHARK_SRC)/config.nmake
4043
}

docs/USAGE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Usage: mwc.pl [-global <file>] [-include <directory>] [-recurse]
2727
cdt7 | cmake | em3 | ghs | html | iar | make | nmake |
2828
rpmspec | sle | uvis | vc6 | vc7 | vc8 | vc9 | vc10 |
2929
vc11 | vc12 | vc14 | vc71 | vs2017 | vs2019 | vs2022 |
30+
vs2026 |
3031
wb26 | wb30 | wix>]
3132
[files]
3233

docs/html/MakeProjectCreator.html

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,18 @@ <h6 class="NumberedTableTitle">MPC Types</h6>
551551
</td>
552552
</tr>
553553

554+
<tr>
555+
<td rowspan="1" colspan="1">
556+
<p class="TblCode">
557+
<em class="TableCode">vs2026</em>
558+
</p>
559+
</td>
560+
561+
<td rowspan="1" colspan="1">
562+
<p class="Tbl-Body">Visual Studio 2026.</p>
563+
</td>
564+
</tr>
565+
554566
<tr>
555567
<td rowspan="1" colspan="1">
556568
<p class="TblCode">
@@ -2018,7 +2030,7 @@ <h5 class="Head4">mwc and mwb files</h5>
20182030

20192031
<p class="Code">
20202032
&nbsp;&nbsp;exclude(vc6, vc7, vc71, vc8, vc9,
2021-
vc10, vc11, vc12, vc14, vs2017, vs2019, vs2022, nmake) {
2033+
vc10, vc11, vc12, vc14, vs2017, vs2019, vs2022, vs2026, nmake) {
20222034
</p>
20232035

20242036
<p class="Code">&nbsp;&nbsp;&nbsp;&nbsp;this_directory</p>
@@ -4019,6 +4031,30 @@ <h6 class="NumberedTableTitle">
40194031
</td>
40204032
</tr>
40214033

4034+
<tr>
4035+
<td rowspan="1" colspan="1">
4036+
<p class="Tbl-Body">
4037+
<em class="TableCode">vs2026</em>
4038+
</p>
4039+
</td>
4040+
4041+
<td rowspan="1" colspan="1">
4042+
<p class="Tbl-Body">&nbsp;</p>
4043+
</td>
4044+
4045+
<td rowspan="1" colspan="1">
4046+
<p class="Tbl-Body">&nbsp;</p>
4047+
</td>
4048+
4049+
<td rowspan="1" colspan="1">
4050+
<p class="Tbl-Body">Yes</p>
4051+
</td>
4052+
4053+
<td rowspan="1" colspan="1">
4054+
<p class="Tbl-Body">Yes</p>
4055+
</td>
4056+
</tr>
4057+
40224058
<tr>
40234059
<td rowspan="1" colspan="1">
40244060
<p class="Tbl-Body">
@@ -8271,7 +8307,7 @@ <h6 class="NumberedTableTitle">
82718307
7.10 is return for vc71 and 8.00 is returned for vc8,
82728308
9.00 is returned for vc9, 10.00 is returned for vc10,
82738309
11.00 is returned for vc11, 12.0 is returned for vc12,
8274-
14.0 is returned for vc14, 14.1 is returned for vs2017, 14.2 is returned for vs2019, 14.3 is returned for vs2022.
8310+
14.0 is returned for vc14, 14.1 is returned for vs2017, 14.2 is returned for vs2019, 14.3 is returned for vs2022, 14.4 is returned for vs2026.
82758311
</p>
82768312
</td>
82778313
</tr>

modules/VS2026ProjectCreator.pm

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package VS2026ProjectCreator;
2+
3+
# ************************************************************
4+
# Description : vs2026 (Visual Studio 2026) Project Creator
5+
# ************************************************************
6+
7+
# ************************************************************
8+
# Pragmas
9+
# ************************************************************
10+
11+
use strict;
12+
13+
use VC12ProjectCreator;
14+
15+
use vars qw(@ISA);
16+
@ISA = qw(VC12ProjectCreator);
17+
18+
## NOTE: We call the constant as a function to support Perl 5.6.
19+
my %info = (Creator::cplusplus() => {'ext' => '.vcxproj',
20+
'dllexe' => 'vs2026exe',
21+
'libexe' => 'vs2026libexe',
22+
'dll' => 'vs2026dll',
23+
'lib' => 'vs2026lib',
24+
'template' => [ 'vc10', 'vc10filters' ],
25+
},
26+
);
27+
28+
my %config = ('vcversion' => '16.00',
29+
'toolsversion' => '16.0',
30+
);
31+
32+
# ************************************************************
33+
# Subroutine Section
34+
# ************************************************************
35+
36+
sub get_info_hash {
37+
my($self, $key) = @_;
38+
39+
## If we have the setting in our information map, then use it.
40+
return $info{$key} if (defined $info{$key});
41+
42+
## Otherwise, see if our parent type can take care of it.
43+
return $self->SUPER::get_info_hash($key);
44+
}
45+
46+
sub get_configurable {
47+
my($self, $name) = @_;
48+
49+
## If we have the setting in our config map, then use it.
50+
return $config{$name} if (defined $config{$name});
51+
52+
## Otherwise, see if our parent type can take care of it.
53+
return $self->SUPER::get_configurable($name);
54+
}
55+
56+
1;

modules/VS2026WorkspaceCreator.pm

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package VS2026WorkspaceCreator;
2+
3+
# ************************************************************
4+
# Description : vs2026 (Visual Studio 2026) Workspace Creator
5+
# ************************************************************
6+
7+
# ************************************************************
8+
# Pragmas
9+
# ************************************************************
10+
11+
use strict;
12+
13+
use VS2026ProjectCreator;
14+
use VC12WorkspaceCreator;
15+
16+
use vars qw(@ISA);
17+
@ISA = qw(VC12WorkspaceCreator);
18+
19+
# ************************************************************
20+
# Subroutine Section
21+
# ************************************************************
22+
23+
sub pre_workspace {
24+
my($self, $fh) = @_;
25+
my $crlf = $self->crlf();
26+
27+
print $fh '', $crlf,
28+
'Microsoft Visual Studio Solution File, Format Version 12.00', $crlf;
29+
$self->print_workspace_comment($fh,
30+
'# Visual Studio Version 18', $crlf,
31+
'#', $crlf,
32+
'# This file was generated by MPC. Any changes made directly to', $crlf,
33+
'# this file will be lost the next time it is generated.', $crlf,
34+
'#', $crlf,
35+
'# MPC Command:', $crlf,
36+
'# ', $self->create_command_line_string($0, @ARGV), $crlf);
37+
}
38+
39+
1;

registry.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'vs2017' => ['SLN 2017', 'PROJ 2017'],
4040
'vs2019' => ['SLN 2019', 'PROJ 2019'],
4141
'vs2022' => ['SLN 2022', 'PROJ 2022'],
42+
'vs2026' => ['SLN 2026', 'PROJ 2026'],
4243
'wix' => ['WiX', 'WiX Project'],
4344
);
4445

templates/vs2026dll.mpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// -*- MPC -*-
2+
conditional_include "vs2026platforms"
3+
conditional_include "vc1xdll"
4+
conditional_include "user_vs2026dll"

templates/vs2026exe.mpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// -*- MPC -*-
2+
conditional_include "vs2026platforms"
3+
conditional_include "vc1xexe"
4+
conditional_include "user_vs2026exe"

0 commit comments

Comments
 (0)