| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Code to validate and convert settings of the Microsoft build tools. | 5 """Code to validate and convert settings of the Microsoft build tools. |
| 6 | 6 |
| 7 This file contains code to validate and convert settings of the Microsoft | 7 This file contains code to validate and convert settings of the Microsoft |
| 8 build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(), | 8 build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(), |
| 9 and ValidateMSBuildSettings() are the entry points. | 9 and ValidateMSBuildSettings() are the entry points. |
| 10 | 10 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 410 |
| 411 | 411 |
| 412 def ConvertVCMacrosToMSBuild(s): | 412 def ConvertVCMacrosToMSBuild(s): |
| 413 """Convert the the MSVS macros found in the string to the MSBuild equivalent. | 413 """Convert the the MSVS macros found in the string to the MSBuild equivalent. |
| 414 | 414 |
| 415 This list is probably not exhaustive. Add as needed. | 415 This list is probably not exhaustive. Add as needed. |
| 416 """ | 416 """ |
| 417 if '$' in s: | 417 if '$' in s: |
| 418 replace_map = { | 418 replace_map = { |
| 419 '$(ConfigurationName)': '$(Configuration)', | 419 '$(ConfigurationName)': '$(Configuration)', |
| 420 '$(InputDir)': '%(RootDir)%(Directory)', | 420 '$(InputDir)': '%(RelativeDir)', |
| 421 '$(InputExt)': '%(Extension)', | 421 '$(InputExt)': '%(Extension)', |
| 422 '$(InputFileName)': '%(Filename)%(Extension)', | 422 '$(InputFileName)': '%(Filename)%(Extension)', |
| 423 '$(InputName)': '%(Filename)', | 423 '$(InputName)': '%(Filename)', |
| 424 '$(InputPath)': '%(FullPath)', | 424 '$(InputPath)': '%(Identity)', |
| 425 '$(ParentName)': '$(ProjectFileName)', | 425 '$(ParentName)': '$(ProjectFileName)', |
| 426 '$(PlatformName)': '$(Platform)', | 426 '$(PlatformName)': '$(Platform)', |
| 427 '$(SafeInputName)': '%(Filename)', | 427 '$(SafeInputName)': '%(Filename)', |
| 428 } | 428 } |
| 429 for old, new in replace_map.iteritems(): | 429 for old, new in replace_map.iteritems(): |
| 430 s = s.replace(old, new) | 430 s = s.replace(old, new) |
| 431 s = FixVCMacroSlashes(s) | 431 s = FixVCMacroSlashes(s) |
| 432 return s | 432 return s |
| 433 | 433 |
| 434 | 434 |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 _MSVSOnly(_manifest, 'UseUnicodeResponseFiles', _boolean) | 1069 _MSVSOnly(_manifest, 'UseUnicodeResponseFiles', _boolean) |
| 1070 | 1070 |
| 1071 # MSBuild options not found in MSVS. | 1071 # MSBuild options not found in MSVS. |
| 1072 _MSBuildOnly(_manifest, 'EnableDPIAwareness', _boolean) | 1072 _MSBuildOnly(_manifest, 'EnableDPIAwareness', _boolean) |
| 1073 _MSBuildOnly(_manifest, 'GenerateCategoryTags', _boolean) # /category | 1073 _MSBuildOnly(_manifest, 'GenerateCategoryTags', _boolean) # /category |
| 1074 _MSBuildOnly(_manifest, 'ManifestFromManagedAssembly', | 1074 _MSBuildOnly(_manifest, 'ManifestFromManagedAssembly', |
| 1075 _file_name) # /managedassemblyname | 1075 _file_name) # /managedassemblyname |
| 1076 _MSBuildOnly(_manifest, 'OutputResourceManifests', _string) # /outputresource | 1076 _MSBuildOnly(_manifest, 'OutputResourceManifests', _string) # /outputresource |
| 1077 _MSBuildOnly(_manifest, 'SuppressDependencyElement', _boolean) # /nodependency | 1077 _MSBuildOnly(_manifest, 'SuppressDependencyElement', _boolean) # /nodependency |
| 1078 _MSBuildOnly(_manifest, 'TrackerLogDirectory', _folder_name) | 1078 _MSBuildOnly(_manifest, 'TrackerLogDirectory', _folder_name) |
| OLD | NEW |