Skip to content

Commit

Permalink
add Visual Studio 2019 support
Browse files Browse the repository at this point in the history
  • Loading branch information
litao committed Nov 14, 2019
1 parent 0f3b3f7 commit 1fa4055
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions worker/deps/gyp/pylib/gyp/MSVSVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ def _CreateVersion(name, path, sdk_based=False):
'2019': VisualStudioVersion('2019',
'Visual Studio 2019',
solution_version='12.00',
project_version='15.0',
project_version='16.0',
flat_sln=False,
uses_vcxproj=True,
path=path,
sdk_based=sdk_based,
default_toolset='v141',
default_toolset='v142',
compatible_sdks=['v8.1', 'v10.0']),
'2017': VisualStudioVersion('2017',
'Visual Studio 2017',
Expand Down Expand Up @@ -409,7 +409,8 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):
'11.0': '2012',
'12.0': '2013',
'14.0': '2015',
'15.0': '2017'
'15.0': '2017',
'16.0': '2019'
}
versions = []
for version in versions_to_check:
Expand Down Expand Up @@ -448,7 +449,10 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):
if not path:
continue
path = _ConvertToCygpath(path)
if version == '15.0':
if version == '16.0':
if os.path.exists(path):
versions.append(_CreateVersion('2019', path))
elif version == '15.0':
if os.path.exists(path):
versions.append(_CreateVersion('2017', path))
elif version != '14.0': # There is no Express edition for 2015.
Expand All @@ -470,7 +474,7 @@ def SelectVisualStudioVersion(version='auto', allow_fallback=True):
if version == 'auto':
version = os.environ.get('GYP_MSVS_VERSION', 'auto')
version_map = {
'auto': ('15.0', '14.0', '12.0', '10.0', '9.0', '8.0', '11.0'),
'auto': ('16.0','15.0', '14.0', '12.0', '10.0', '9.0', '8.0', '11.0'),
'2005': ('8.0',),
'2005e': ('8.0',),
'2008': ('9.0',),
Expand All @@ -483,6 +487,7 @@ def SelectVisualStudioVersion(version='auto', allow_fallback=True):
'2013e': ('12.0',),
'2015': ('14.0',),
'2017': ('15.0',),
'2019': ('16.0',),
}
override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH')
if override_path:
Expand Down

3 comments on commit 1fa4055

@ibc
Copy link

@ibc ibc commented on 1fa4055 Nov 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you open a PR with this?

@ibc
Copy link

@ibc ibc commented on 1fa4055 Nov 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better, will you report the issue and provide a patch to https://bugs.chromium.org/p/gyp/issues/list so they can fix gyp?

@aoslee
Copy link
Owner

@aoslee aoslee commented on 1fa4055 Feb 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you open a PR with this?
Hi:
I'm sorry to see that reply now.It is too late.I see you already modify that.If i modify the code for mediasoup again ,I will open a PR .

Please sign in to comment.