Fix support for Visual Studio 2010 Express projects.
Use the proper version string, and omit the folder mappings section for
2010 Express.
Patch by jmadill@chromium.org!
BUG=376
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/27685004
git-svn-id: http://gyp.googlecode.com/svn/trunk@1767 78cadc50-ecff-11dd-a971-7dbc132099af
diff --git a/pylib/gyp/MSVSNew.py b/pylib/gyp/MSVSNew.py
index 667e531..845dcb0 100644
--- a/pylib/gyp/MSVSNew.py
+++ b/pylib/gyp/MSVSNew.py
@@ -325,14 +325,15 @@
f.write('\tEndGlobalSection\r\n')
# Folder mappings
- # TODO(rspangler): Should omit this section if there are no folders
- f.write('\tGlobalSection(NestedProjects) = preSolution\r\n')
- for e in all_entries:
- if not isinstance(e, MSVSFolder):
- continue # Does not apply to projects, only folders
- for subentry in e.entries:
- f.write('\t\t%s = %s\r\n' % (subentry.get_guid(), e.get_guid()))
- f.write('\tEndGlobalSection\r\n')
+ # Omit this section if there are no folders
+ if any([e.entries for e in all_entries if isinstance(e, MSVSFolder)]):
+ f.write('\tGlobalSection(NestedProjects) = preSolution\r\n')
+ for e in all_entries:
+ if not isinstance(e, MSVSFolder):
+ continue # Does not apply to projects, only folders
+ for subentry in e.entries:
+ f.write('\t\t%s = %s\r\n' % (subentry.get_guid(), e.get_guid()))
+ f.write('\tEndGlobalSection\r\n')
f.write('EndGlobal\r\n')
diff --git a/pylib/gyp/MSVSVersion.py b/pylib/gyp/MSVSVersion.py
index cc5073c..c36b774 100644
--- a/pylib/gyp/MSVSVersion.py
+++ b/pylib/gyp/MSVSVersion.py
@@ -249,7 +249,7 @@
path=path,
sdk_based=sdk_based),
'2010e': VisualStudioVersion('2010e',
- 'Visual Studio 2010',
+ 'Visual C++ Express 2010',
solution_version='11.00',
project_version='4.0',
flat_sln=True,