Skip to content

Commit

Permalink
Fix typo in gyp patch
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed Feb 13, 2017
1 parent d702483 commit bde0a30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions 0004-Add-support-for-VS2017-to-GYP.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ index edaf6ee..e34ebc5 100644
if target_arch == 'x86':
+ if self.short_name == '2017':
+ return [os.path.normpath(
+ ps.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
+ os.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
+ '/arch=x86']
if self.short_name >= '2013' and self.short_name[-1] != 'e' and (
os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
Expand All @@ -30,7 +30,7 @@ index edaf6ee..e34ebc5 100644
assert target_arch == 'x64'
+ if self.short_name == '2017':
+ return [os.path.normpath(
+ ps.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
+ os.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
+ '/arch=x64']
arg = 'x86_amd64'
# Use the 64-on-64 compiler if we're not using an express
Expand Down Expand Up @@ -68,7 +68,7 @@ index edaf6ee..e34ebc5 100644
versions = []
for version in versions_to_check:
@@ -395,13 +414,18 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):

# The old method above does not work when only SDK is installed.
keys = [r'HKLM\Software\Microsoft\VisualStudio\SxS\VC7',
- r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7']
Expand All @@ -87,7 +87,7 @@ index edaf6ee..e34ebc5 100644
+ elif version != '14.0': # There is no Express edition for 2015.
versions.append(_CreateVersion(version_to_year[version] + 'e',
os.path.join(path, '..'), sdk_based=True))

@@ -420,7 +444,7 @@ def SelectVisualStudioVersion(version='auto', allow_fallback=True):
if version == 'auto':
version = os.environ.get('GYP_MSVS_VERSION', 'auto')
Expand All @@ -111,8 +111,8 @@ index 25eb58e..d6a8ec7 100644
+++ b/gyp/pylib/gyp/generator/msvs.py
@@ -2664,7 +2664,7 @@ def _GetMSBuildProjectConfigurations(configurations):
return [group]


-def _GetMSBuildGlobalProperties(spec, guid, gyp_file_name):
+def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name):
namespace = os.path.splitext(gyp_file_name)[0]
Expand All @@ -127,19 +127,19 @@ index 25eb58e..d6a8ec7 100644
+ vs2017_sdk = os.environ.get('vs2017_sdk', vs2017_sdk)
+ if vs2017_sdk:
+ msvs_windows_sdk_version = vs2017_sdk

if platform_name == 'ARM':
properties[0].append(['WindowsSDKDesktopARMSupport', 'true'])
@@ -3366,7 +3371,8 @@ def _GenerateMSBuildProject(project, options, version, generator_flags):
}]

content += _GetMSBuildProjectConfigurations(configurations)
- content += _GetMSBuildGlobalProperties(spec, project.guid, project_file_name)
+ content += _GetMSBuildGlobalProperties(spec, version, project.guid,
+ project_file_name)
content += import_default_section
content += _GetMSBuildConfigurationDetails(spec, project.build_file)
if spec.get('msvs_enable_winphone'):
--
--
2.11.0.windows.1

4 changes: 2 additions & 2 deletions gyp/pylib/gyp/MSVSVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _SetupScriptInternal(self, target_arch):
if target_arch == 'x86':
if self.short_name == '2017':
return [os.path.normpath(
ps.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
os.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
'/arch=x86']
if self.short_name >= '2013' and self.short_name[-1] != 'e' and (
os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
Expand All @@ -104,7 +104,7 @@ def _SetupScriptInternal(self, target_arch):
assert target_arch == 'x64'
if self.short_name == '2017':
return [os.path.normpath(
ps.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
os.path.join(self.path, 'Common7/Tools/VsDevCmd.bat')), '/no_logo',
'/arch=x64']
arg = 'x86_amd64'
# Use the 64-on-64 compiler if we're not using an express
Expand Down

0 comments on commit bde0a30

Please sign in to comment.