Bug 1275297 - Use proper header in solution file; r=chmanchester
authorGregory Szorc <gps@mozilla.com>
Tue, 24 May 2016 07:58:25 -0700
changeset 337843 5b21a1d4a2a2c9bd2c766f663bc83d4d836064b5
parent 337842 d98eab1b6a5ff57a2e47c9072cff8728295f2777
child 337844 6f9239fe63f8dd574ab3a402e67ae35608f1ddf2
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1275297
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1275297 - Use proper header in solution file; r=chmanchester Upon further examination, VS2013 and VS2015 share the same file format version. They also write the internal version number in a comment, not the user-facing production version. MozReview-Commit-ID: 92HB0pEzeI6
python/mozbuild/mozbuild/backend/visualstudio.py
--- a/python/mozbuild/mozbuild/backend/visualstudio.py
+++ b/python/mozbuild/mozbuild/backend/visualstudio.py
@@ -32,21 +32,21 @@ from ..frontend.data import (
 from mozbuild.base import ExecutionSummary
 
 
 MSBUILD_NAMESPACE = 'http://schemas.microsoft.com/developer/msbuild/2003'
 
 def get_id(name):
     return str(uuid.uuid5(uuid.NAMESPACE_URL, name)).upper()
 
-def visual_studio_product_to_internal_version(version, solution=False):
+def visual_studio_product_to_solution_version(version):
     if version == '2013':
-        return '12.00'
+        return '12.00', '12'
     elif version == '2015':
-        return '14.00'
+        return '12.00', '14'
     else:
         raise Exception('Unknown version seen: %s' % version)
 
 def visual_studio_product_to_platform_toolset_version(version):
     if version == '2013':
         return 'v120'
     elif version == '2015':
         return 'v140'
@@ -247,24 +247,24 @@ class VisualStudioBackend(CommonBackend)
                 sources=sources,
                 debugger=debugger)
 
             projects[basename] = (project_id, basename, item)
 
         return projects
 
     def _write_solution(self, fh, projects):
-        version = visual_studio_product_to_internal_version(self._version, True)
+        format_version, comment_version = visual_studio_product_to_solution_version(self._version)
         # This is a Visual C++ Project type.
         project_type = '8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942'
 
         # Visual Studio seems to require this header.
         fh.write('Microsoft Visual Studio Solution File, Format Version %s\r\n' %
-            version)
-        fh.write('# Visual Studio %s\r\n' % self._version)
+                 format_version)
+        fh.write('# Visual Studio %s\r\n' % comment_version)
 
         binaries_id = projects['target_binaries'][0]
 
         # Write out entries for each project.
         for key in sorted(projects):
             project_id, basename, name = projects[key]
             path = os.path.join(self._projsubdir, '%s.vcxproj' % basename)