Source release 15.1.0
This commit is contained in:
8
third_party/gyp/MSVSNew.py
vendored
8
third_party/gyp/MSVSNew.py
vendored
@@ -6,6 +6,7 @@
|
||||
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
|
||||
import gyp.common
|
||||
|
||||
@@ -56,8 +57,11 @@ def MakeGuid(name, seed='msvs_new'):
|
||||
determine the GUID to refer to explicitly. It also means that the GUID will
|
||||
not change when the project for a target is rebuilt.
|
||||
"""
|
||||
|
||||
to_hash = str(seed) + str(name)
|
||||
to_hash = to_hash.encode('utf-8')
|
||||
# Calculate a MD5 signature for the seed and name.
|
||||
d = _new_md5(str(seed) + str(name)).hexdigest().upper()
|
||||
d = _new_md5(to_hash).hexdigest().upper()
|
||||
# Convert most of the signature to GUID form (discard the rest)
|
||||
guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20]
|
||||
+ '-' + d[20:32] + '}')
|
||||
@@ -71,6 +75,8 @@ class MSVSSolutionEntry(object):
|
||||
# Sort by name then guid (so things are in order on vs2008).
|
||||
return cmp((self.name, self.get_guid()), (other.name, other.get_guid()))
|
||||
|
||||
def __lt__(self, other):
|
||||
return (self.name, self.get_guid()) < (other.name, other.get_guid())
|
||||
|
||||
class MSVSFolder(MSVSSolutionEntry):
|
||||
"""Folder in a Visual Studio project or solution."""
|
||||
|
||||
11
third_party/gyp/easy_xml.py
vendored
11
third_party/gyp/easy_xml.py
vendored
@@ -5,6 +5,7 @@
|
||||
import re
|
||||
import os
|
||||
import locale
|
||||
import sys
|
||||
|
||||
try:
|
||||
# reduce moved to functools in python3.
|
||||
@@ -121,10 +122,12 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
|
||||
xml_string = XmlToString(content, encoding, pretty)
|
||||
if win32 and os.linesep != '\r\n':
|
||||
xml_string = xml_string.replace('\n', '\r\n')
|
||||
|
||||
default_encoding = locale.getdefaultlocale()[1]
|
||||
if default_encoding and default_encoding.upper() != encoding.upper():
|
||||
xml_string = xml_string.decode(default_encoding).encode(encoding)
|
||||
default_encoding = locale.getdefaultlocale()[1]
|
||||
if default_encoding and default_encoding.upper() != encoding.upper():
|
||||
try:
|
||||
xml_string = xml_string.decode(default_encoding).encode(encoding)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
# Get the old content
|
||||
try:
|
||||
|
||||
2
third_party/gyp/generator/msvs.py
vendored
2
third_party/gyp/generator/msvs.py
vendored
@@ -2712,7 +2712,7 @@ def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name):
|
||||
|
||||
platform_name = None
|
||||
msvs_windows_sdk_version = None
|
||||
for configuration in spec['configurations'].itervalues():
|
||||
for configuration in spec['configurations'].values():
|
||||
platform_name = platform_name or _ConfigPlatform(configuration)
|
||||
msvs_windows_sdk_version = (msvs_windows_sdk_version or
|
||||
_ConfigWindowsTargetPlatformVersion(configuration, version))
|
||||
|
||||
Reference in New Issue
Block a user