summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/MSCommon
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2014-03-09 18:52:19 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2014-03-09 18:52:19 (GMT)
commit09e002508b12643cf0153c83992fb22297d1014f (patch)
treed6f6c3996bb30993c922de63b588e0ecc5ee3262 /src/engine/SCons/Tool/MSCommon
parent2706e890c8d969f8e3269b28598d89e286305b21 (diff)
parent7d8383e96a0b591ec1865998bab2197cb2708616 (diff)
downloadSCons-09e002508b12643cf0153c83992fb22297d1014f.zip
SCons-09e002508b12643cf0153c83992fb22297d1014f.tar.gz
SCons-09e002508b12643cf0153c83992fb22297d1014f.tar.bz2
Merged in Syeberman/SCons (pull request #104, support Visual Studio 2013 Express)
Diffstat (limited to 'src/engine/SCons/Tool/MSCommon')
-rw-r--r--src/engine/SCons/Tool/MSCommon/vc.py8
-rw-r--r--src/engine/SCons/Tool/MSCommon/vs.py92
2 files changed, 44 insertions, 56 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py
index c970118..6a801ad 100644
--- a/src/engine/SCons/Tool/MSCommon/vc.py
+++ b/src/engine/SCons/Tool/MSCommon/vc.py
@@ -89,6 +89,7 @@ _ARCH_TO_CANONICAL = {
_HOST_TARGET_ARCH_TO_BAT_ARCH = {
("x86", "x86"): "x86",
("x86", "amd64"): "x86_amd64",
+ ("x86", "x86_amd64"): "x86_amd64",
("amd64", "x86_amd64"): "x86_amd64", # This is present in (at least) VS2012 express
("amd64", "amd64"): "amd64",
("amd64", "x86"): "x86",
@@ -131,9 +132,14 @@ def get_host_target(env):
return (host, target,req_target_platform)
-_VCVER = ["11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
+# If you update this, update SupportedVSList in Tool/MSCommon/vs.py, and the
+# MSVC_VERSION documentation in Tool/msvc.xml.
+# TODO Visual C 12.0
+_VCVER = ["12.0Exp", "11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
_VCVER_TO_PRODUCT_DIR = {
+ '12.0Exp' : [
+ r'Microsoft\VCExpress\12.0\Setup\VC\ProductDir'],
'11.0': [
r'Microsoft\VisualStudio\11.0\Setup\VC\ProductDir'],
'11.0Exp' : [
diff --git a/src/engine/SCons/Tool/MSCommon/vs.py b/src/engine/SCons/Tool/MSCommon/vs.py
index d5bf2c3..88da98a 100644
--- a/src/engine/SCons/Tool/MSCommon/vs.py
+++ b/src/engine/SCons/Tool/MSCommon/vs.py
@@ -73,7 +73,7 @@ class VisualStudio(object):
debug('find_vs_dir(): no installed VC %s' % self.vc_version)
return None
return dir
-
+
def find_vs_dir_by_reg(self):
root = 'Software\\'
@@ -91,13 +91,13 @@ class VisualStudio(object):
debug('find_vs_dir_by_reg(): found VS in registry: %s' % comps)
return comps
return None
-
+
def find_vs_dir(self):
""" Can use registry or location of VC to find vs dir
First try to find by registry, and if that fails find via VC dir
"""
-
-
+
+
if True:
vs_dir=self.find_vs_dir_by_reg()
return vs_dir
@@ -115,7 +115,7 @@ class VisualStudio(object):
debug('find_executable(): %s not on file system' % executable)
return None
return executable
-
+
#
def get_batch_file(self):
@@ -199,102 +199,87 @@ class VisualStudio(object):
# good money for in preference to whatever Microsoft makes available
# for free.
#
-# If you update this list, update the documentation in Tool/msvs.xml.
+# If you update this list, update _VCVER and _VCVER_TO_PRODUCT_DIR in
+# Tool/MSCommon/vc.py, and the MSVC_VERSION documentation in Tool/msvc.xml.
SupportedVSList = [
- # Visual Studio 2010
- # TODO: find the settings, perhaps from someone with a CTP copy?
- #VisualStudio('TBD',
- # hkey_root=r'TBD',
- # common_tools_var='TBD',
- # executable_path=r'TBD',
- # default_dirname='TBD',
- #),
-
- # Visual Studio 11
- # The batch file we look for is in the VC directory,
- # so the devenv.com executable is up in ..\..\Common7\IDE.
+ # TODO Visual Studio 2013
+
+ # Visual C++ 2013 Express Edition (for Desktop)
+ VisualStudio('12.0Exp',
+ vc_version='12.0',
+ sdk_version='8.1A',
+ hkeys=[r'Microsoft\VisualStudio\12.0\Setup\VS\ProductDir'],
+ common_tools_var='VS120COMNTOOLS',
+ executable_path=r'Common7\IDE\WDExpress.exe',
+ batch_file_path=r'Common7\Tools\vsvars32.bat',
+ supported_arch=['x86', 'amd64'],
+ ),
+
+ # Visual Studio 2012
VisualStudio('11.0',
- sdk_version='6.1',
+ sdk_version='8.0A',
hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'],
common_tools_var='VS110COMNTOOLS',
executable_path=r'Common7\IDE\devenv.com',
batch_file_path=r'Common7\Tools\vsvars32.bat',
- default_dirname='Microsoft Visual Studio 11',
supported_arch=['x86', 'amd64'],
),
- # Visual C++ 11 Express Edition
- # The batch file we look for is in the VC directory,
- # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
+ # Visual C++ 2012 Express Edition (for Desktop)
VisualStudio('11.0Exp',
vc_version='11.0',
- sdk_version='6.1',
- hkeys=[r'Microsoft\VCExpress\11.0\Setup\VS\ProductDir'],
+ sdk_version='8.0A',
+ hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'],
common_tools_var='VS110COMNTOOLS',
- executable_path=r'Common7\IDE\VCExpress.exe',
+ executable_path=r'Common7\IDE\WDExpress.exe',
batch_file_path=r'Common7\Tools\vsvars32.bat',
- default_dirname='Microsoft Visual Studio 11',
- supported_arch=['x86'],
+ supported_arch=['x86', 'amd64'],
),
# Visual Studio 2010
- # The batch file we look for is in the VC directory,
- # so the devenv.com executable is up in ..\..\Common7\IDE.
VisualStudio('10.0',
- sdk_version='6.1',
+ sdk_version='7.0A',
hkeys=[r'Microsoft\VisualStudio\10.0\Setup\VS\ProductDir'],
common_tools_var='VS100COMNTOOLS',
executable_path=r'Common7\IDE\devenv.com',
batch_file_path=r'Common7\Tools\vsvars32.bat',
- default_dirname='Microsoft Visual Studio 10',
supported_arch=['x86', 'amd64'],
),
# Visual C++ 2010 Express Edition
- # The batch file we look for is in the VC directory,
- # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
VisualStudio('10.0Exp',
vc_version='10.0',
- sdk_version='6.1',
+ sdk_version='7.0A',
hkeys=[r'Microsoft\VCExpress\10.0\Setup\VS\ProductDir'],
common_tools_var='VS100COMNTOOLS',
executable_path=r'Common7\IDE\VCExpress.exe',
batch_file_path=r'Common7\Tools\vsvars32.bat',
- default_dirname='Microsoft Visual Studio 10',
supported_arch=['x86'],
),
# Visual Studio 2008
- # The batch file we look for is in the VC directory,
- # so the devenv.com executable is up in ..\..\Common7\IDE.
VisualStudio('9.0',
- sdk_version='6.1',
+ sdk_version='6.0A',
hkeys=[r'Microsoft\VisualStudio\9.0\Setup\VS\ProductDir'],
common_tools_var='VS90COMNTOOLS',
executable_path=r'Common7\IDE\devenv.com',
batch_file_path=r'Common7\Tools\vsvars32.bat',
- default_dirname='Microsoft Visual Studio 9',
supported_arch=['x86', 'amd64'],
),
# Visual C++ 2008 Express Edition
- # The batch file we look for is in the VC directory,
- # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
VisualStudio('9.0Exp',
vc_version='9.0',
- sdk_version='6.1',
+ sdk_version='6.0A',
hkeys=[r'Microsoft\VCExpress\9.0\Setup\VS\ProductDir'],
common_tools_var='VS90COMNTOOLS',
executable_path=r'Common7\IDE\VCExpress.exe',
batch_file_path=r'Common7\Tools\vsvars32.bat',
- default_dirname='Microsoft Visual Studio 9',
supported_arch=['x86'],
),
# Visual Studio 2005
- # The batch file we look for is in the VC directory,
- # so the devenv.com executable is up in ..\..\Common7\IDE.
VisualStudio('8.0',
sdk_version='6.0A',
hkeys=[r'Microsoft\VisualStudio\8.0\Setup\VS\ProductDir'],
@@ -306,8 +291,6 @@ SupportedVSList = [
),
# Visual C++ 2005 Express Edition
- # The batch file we look for is in the VC directory,
- # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
VisualStudio('8.0Exp',
vc_version='8.0Exp',
sdk_version='6.0A',
@@ -320,8 +303,6 @@ SupportedVSList = [
),
# Visual Studio .NET 2003
- # The batch file we look for is in the Common7\Tools directory,
- # so the devenv.com executable is next door in ..\IDE.
VisualStudio('7.1',
sdk_version='6.0',
hkeys=[r'Microsoft\VisualStudio\7.1\Setup\VS\ProductDir'],
@@ -333,8 +314,6 @@ SupportedVSList = [
),
# Visual Studio .NET
- # The batch file we look for is in the Common7\Tools directory,
- # so the devenv.com executable is next door in ..\IDE.
VisualStudio('7.0',
sdk_version='2003R2',
hkeys=[r'Microsoft\VisualStudio\7.0\Setup\VS\ProductDir'],
@@ -393,11 +372,11 @@ def reset_installed_visual_studios():
InstalledVSMap = None
for vs in SupportedVSList:
vs.reset()
-
+
# Need to clear installed VC's as well as they are used in finding
# installed VS's
SCons.Tool.MSCommon.vc.reset_installed_vcs()
-
+
# We may be asked to update multiple construction environments with
# SDK information. When doing this, we check on-disk for whether
@@ -462,7 +441,7 @@ def get_default_version(env):
If no version was requested by the user through the MSVS environment
variable, query all the available the visual studios through
- query_versions, and take the highest one.
+ get_installed_visual_studios, and take the highest one.
Return
------
@@ -470,6 +449,7 @@ def get_default_version(env):
the default version.
"""
if 'MSVS' not in env or not SCons.Util.is_Dict(env['MSVS']):
+ # get all versions, and remember them for speed later
versions = [vs.version for vs in get_installed_visual_studios()]
env['MSVS'] = {'VERSIONS' : versions}
else:
@@ -479,6 +459,8 @@ def get_default_version(env):
if versions:
env['MSVS_VERSION'] = versions[0] #use highest version by default
else:
+ debug('get_default_version: WARNING: no installed versions found, '
+ 'using first in SupportedVSList (%s)'%SupportedVSList[0].version)
env['MSVS_VERSION'] = SupportedVSList[0].version
env['MSVS']['VERSION'] = env['MSVS_VERSION']