summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--QMTest/TestSCons.py2
-rw-r--r--QMTest/TestSConsMSVS.py108
-rw-r--r--README.rst17
-rw-r--r--ReleaseConfig4
-rw-r--r--SConstruct6
-rwxr-xr-xbin/scp-sourceforge8
-rw-r--r--debian/changelog6
-rw-r--r--doc/user/main.xml4
-rw-r--r--doc/version.xml4
-rw-r--r--src/Announce.txt45
-rw-r--r--src/CHANGES.txt9
-rw-r--r--src/RELEASE.txt2
-rw-r--r--src/engine/SCons/Environment.py4
-rw-r--r--src/engine/SCons/Tool/MSCommon/arch.py6
-rw-r--r--src/engine/SCons/Tool/MSCommon/vc.py6
-rw-r--r--src/engine/SCons/Tool/MSCommon/vs.py22
-rw-r--r--src/engine/SCons/Tool/msvs.py4
-rw-r--r--src/script/scons.py2
-rw-r--r--test/MSVS/vs-14.0-exec.py109
-rw-r--r--test/MSVS/vs-14.0-files.py110
-rw-r--r--test/MSVS/vs-14.0-scc-files.py115
-rw-r--r--test/MSVS/vs-14.0-scc-legacy-files.py98
-rw-r--r--test/MSVS/vs-14.0Exp-exec.py109
23 files changed, 775 insertions, 25 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index 923e319..bae96e6 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -34,7 +34,7 @@ from TestCmd import PIPE
# here provides some independent verification that what we packaged
# conforms to what we expect.
-default_version = '2.3.4'
+default_version = '2.3.5'
python_version_unsupported = (2, 3, 0)
python_version_deprecated = (2, 7, 0)
diff --git a/QMTest/TestSConsMSVS.py b/QMTest/TestSConsMSVS.py
index 540d24d..65a09eb 100644
--- a/QMTest/TestSConsMSVS.py
+++ b/QMTest/TestSConsMSVS.py
@@ -514,6 +514,26 @@ Global
EndGlobal
"""
+expected_slnfile_14_0 = """\
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test.vcxproj", "Test.vcxproj", "{39A97E1F-1A52-8954-A0B1-A10A8487545E}"
+EndProject
+Global
+<SCC_SLN_INFO>
+\tGlobalSection(SolutionConfigurationPlatforms) = preSolution
+\t\tRelease|Win32 = Release|Win32
+\tEndGlobalSection
+\tGlobalSection(ProjectConfigurationPlatforms) = postSolution
+\t\t{39A97E1F-1A52-8954-A0B1-A10A8487545E}.Release|Win32.ActiveCfg = Release|Win32
+\t\t{39A97E1F-1A52-8954-A0B1-A10A8487545E}.Release|Win32.Build.0 = Release|Win32
+\tEndGlobalSection
+\tGlobalSection(SolutionProperties) = preSolution
+\t\tHideSolutionNode = FALSE
+\tEndGlobalSection
+EndGlobal
+"""
+
expected_vcprojfile_8_0 = """\
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
@@ -820,6 +840,71 @@ expected_vcprojfile_11_0 = """\
</Project>
"""
+expected_vcprojfile_14_0 = """\
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+\t<ItemGroup Label="ProjectConfigurations">
+\t\t<ProjectConfiguration Include="Release|Win32">
+\t\t\t<Configuration>Release</Configuration>
+\t\t\t<Platform>Win32</Platform>
+\t\t</ProjectConfiguration>
+\t</ItemGroup>
+\t<PropertyGroup Label="Globals">
+\t\t<ProjectGuid>{39A97E1F-1A52-8954-A0B1-A10A8487545E}</ProjectGuid>
+<SCC_VCPROJ_INFO>
+\t\t<RootNamespace>Test</RootNamespace>
+\t\t<Keyword>MakeFileProj</Keyword>
+\t</PropertyGroup>
+\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.Default.props" />
+\t<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+\t\t<ConfigurationType>Makefile</ConfigurationType>
+\t\t<UseOfMfc>false</UseOfMfc>
+\t\t<PlatformToolset>v140</PlatformToolset>
+\t</PropertyGroup>
+\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props" />
+\t<ImportGroup Label="ExtensionSettings">
+\t</ImportGroup>
+\t<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+\t\t<Import Project="$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+\t</ImportGroup>
+\t<PropertyGroup Label="UserMacros" />
+\t<PropertyGroup>
+\t<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+\t\t<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Starting SCons &amp;&amp; &quot;<PYTHON>&quot; -c &quot;<SCONS_SCRIPT_MAIN_XML>&quot; -C &quot;<WORKPATH>&quot; -f SConstruct &quot;Test.exe&quot;</NMakeBuildCommandLine>
+\t\t<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Starting SCons &amp;&amp; &quot;<PYTHON>&quot; -c &quot;<SCONS_SCRIPT_MAIN_XML>&quot; -C &quot;<WORKPATH>&quot; -f SConstruct &quot;Test.exe&quot;</NMakeReBuildCommandLine>
+\t\t<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Starting SCons &amp;&amp; &quot;<PYTHON>&quot; -c &quot;<SCONS_SCRIPT_MAIN_XML>&quot; -C &quot;<WORKPATH>&quot; -f SConstruct -c &quot;Test.exe&quot;</NMakeCleanCommandLine>
+\t\t<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Test.exe</NMakeOutput>
+\t\t<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">DEF1;DEF2;DEF3=1234</NMakePreprocessorDefinitions>
+\t\t<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">inc1;inc2</NMakeIncludeSearchPath>
+\t\t<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
+\t\t<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
+\t\t<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+\t</PropertyGroup>
+\t<ItemGroup>
+\t\t<ClInclude Include="sdk_dir\sdk.h" />
+\t</ItemGroup>
+\t<ItemGroup>
+\t\t<ClInclude Include="test.h" />
+\t</ItemGroup>
+\t<ItemGroup>
+\t\t<None Include="readme.txt" />
+\t</ItemGroup>
+\t<ItemGroup>
+\t\t<None Include="test.rc" />
+\t</ItemGroup>
+\t<ItemGroup>
+\t\t<ClCompile Include="test1.cpp" />
+\t\t<ClCompile Include="test2.cpp" />
+\t</ItemGroup>
+\t<ItemGroup>
+\t\t<None Include="SConstruct" />
+\t</ItemGroup>
+\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />
+\t<ImportGroup Label="ExtensionTargets">
+\t</ImportGroup>
+</Project>
+"""
+
SConscript_contents_8_0 = """\
env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0',
CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
@@ -912,6 +997,29 @@ env.MSVSProject(target = 'Test.vcxproj',
variant = 'Release')
"""
+SConscript_contents_14_0 = """\
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='14.0',
+ CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
+ CPPPATH=['inc1', 'inc2'],
+ HOST_ARCH='%(HOST_ARCH)s')
+
+testsrc = ['test1.cpp', 'test2.cpp']
+testincs = ['sdk_dir\sdk.h']
+testlocalincs = ['test.h']
+testresources = ['test.rc']
+testmisc = ['readme.txt']
+
+env.MSVSProject(target = 'Test.vcxproj',
+ slnguid = '{SLNGUID}',
+ srcs = testsrc,
+ incs = testincs,
+ localincs = testlocalincs,
+ resources = testresources,
+ misc = testmisc,
+ buildtarget = 'Test.exe',
+ variant = 'Release')
+"""
+
class TestSConsMSVS(TestSCons):
"""Subclass for testing MSVS-specific portions of SCons."""
diff --git a/README.rst b/README.rst
index 599abaf..64e8748 100644
--- a/README.rst
+++ b/README.rst
@@ -480,14 +480,14 @@ following packages will be built::
build/dist/scons-2.3.3-1.noarch.rpm
build/dist/scons-2.3.3-1.src.rpm
build/dist/scons-2.3.3.linux-i686.tar.gz
- build/dist/scons-2.3.4.tar.gz
- build/dist/scons-2.3.4.win32.exe
- build/dist/scons-2.3.4.zip
- build/dist/scons-doc-2.3.4.tar.gz
- build/dist/scons-local-2.3.4.tar.gz
- build/dist/scons-local-2.3.4.zip
- build/dist/scons-src-2.3.4.tar.gz
- build/dist/scons-src-2.3.4.zip
+ build/dist/scons-2.3.5.tar.gz
+ build/dist/scons-2.3.5.win32.exe
+ build/dist/scons-2.3.5.zip
+ build/dist/scons-doc-2.3.5.tar.gz
+ build/dist/scons-local-2.3.5.tar.gz
+ build/dist/scons-local-2.3.5.zip
+ build/dist/scons-src-2.3.5.tar.gz
+ build/dist/scons-src-2.3.5.zip
build/dist/scons_2.3.3-1_all.deb
The SConstruct file is supposed to be smart enough to avoid trying to build
@@ -750,4 +750,3 @@ many contributors, including but not at all limited to:
__COPYRIGHT__
-
diff --git a/ReleaseConfig b/ReleaseConfig
index 0735012..b5623be 100644
--- a/ReleaseConfig
+++ b/ReleaseConfig
@@ -32,7 +32,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
# 'final', the patchlevel is set to the release date. This value is
# mandatory and must be present in this file.
#version_tuple = (2, 2, 0, 'final', 0)
-version_tuple = (2, 3, 5, 'alpha', 0)
+version_tuple = (2, 3, 6, 'alpha', 0)
# Python versions prior to unsupported_python_version cause a fatal error
# when that version is used. Python versions prior to deprecate_python_version
@@ -51,7 +51,7 @@ deprecated_python_version = (2, 7, 0)
#month_year = 'December 2012'
# If copyright years is not given, the release year is used as the end.
-copyright_years = '2001 - 2014'
+copyright_years = '2001 - 2015'
# Local Variables:
# tab-width:4
diff --git a/SConstruct b/SConstruct
index abf5fa8..bbddd98 100644
--- a/SConstruct
+++ b/SConstruct
@@ -3,10 +3,10 @@
#
# See the README.rst file for an overview of how SCons is built and tested.
-copyright_years = '2001 - 2014'
+copyright_years = '2001 - 2015'
# This gets inserted into the man pages to reflect the month of release.
-month_year = 'September 2014'
+month_year = 'June 2015'
#
# __COPYRIGHT__
@@ -43,7 +43,7 @@ import tempfile
import bootstrap
project = 'scons'
-default_version = '2.3.4'
+default_version = '2.3.5'
copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
platform = distutils.util.get_platform()
diff --git a/bin/scp-sourceforge b/bin/scp-sourceforge
index ad761d1..07df3ea 100755
--- a/bin/scp-sourceforge
+++ b/bin/scp-sourceforge
@@ -19,10 +19,14 @@ do
sf/$p/$VERSION
done
+cp -p build/scons/README.txt \
+ sf/.
+
cp -p build/dist/scons-$VERSION-1.noarch.rpm \
build/dist/scons-$VERSION-1.src.rpm \
build/dist/scons-$VERSION.tar.gz \
build/dist/scons-$VERSION.win32.exe \
+ build/dist/scons-$VERSION.win-amd64.exe \
build/dist/scons-$VERSION.zip \
sf/scons/$VERSION
cp -p build/dist/scons-local-$VERSION.tar.gz \
@@ -35,4 +39,8 @@ cp -p build/dist/scons-src-$VERSION.tar.gz \
# Transmit them in this order, since the most-recent is displayed at the top
scp -r sf/scons-local/ sf/scons-src/ sf/scons/ \
$SF_USER,scons@frs.sourceforge.net:/home/pfs/project/s/sc/scons
+
+scp sf/README.txt \
+ $SF_USER,scons@frs.sourceforge.net:/home/pfs/project/s/sc/scons
+
rm -rf sf
diff --git a/debian/changelog b/debian/changelog
index a39a73b..9dbb1b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+scons (2.3.5) unstable; urgency=low
+
+ * Maintenance release.
+
+ -- William Deegan <bill@baddogconsulting.com> Mon, 17 Jun 2015 21:07:32 -0700
+
scons (2.3.4) unstable; urgency=low
* Maintenance release.
diff --git a/doc/user/main.xml b/doc/user/main.xml
index a165777..d2c4c18 100644
--- a/doc/user/main.xml
+++ b/doc/user/main.xml
@@ -74,10 +74,10 @@
<corpauthor>Steven Knight and the SCons Development Team</corpauthor>
- <pubdate>2004 - 2014</pubdate>
+ <pubdate>2004 - 2015</pubdate>
<copyright>
- <year>2004 - 2014</year>
+ <year>2004 - 2015</year>
<holder>The SCons Foundation</holder>
</copyright>
diff --git a/doc/version.xml b/doc/version.xml
index f6eba1f..172a9ec 100644
--- a/doc/version.xml
+++ b/doc/version.xml
@@ -2,6 +2,6 @@
<!--
THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT.
-->
-<!ENTITY builddate "2013-03-23">
-<!ENTITY buildversion "2.3.0">
+<!ENTITY builddate "2015-06-17">
+<!ENTITY buildversion "2.3.5">
<!ENTITY buildrevision "1">
diff --git a/src/Announce.txt b/src/Announce.txt
index 7c6fdd5..2d26ab5 100644
--- a/src/Announce.txt
+++ b/src/Announce.txt
@@ -18,6 +18,24 @@ So that everyone using SCons can help each other learn how to use it more
effectively, please go to http://scons.org/lists.php#users to sign up for
the scons-users mailing list.
+==============IMPORTANT NOTICE FOR NEXT VERSION V2.4.0===========
+
+PLEASE READ. CHANGES COMING IN NEXT MAJOR RELEASE V2.4.0
+As has been pre-announced in SCons's mailing lists:
+
+* https://pairlist4.pair.net/pipermail/scons-users/2014-July/002734.html ,
+* https://pairlist2.pair.net/pipermail/scons-dev/2014-December/002107.html
+* https://pairlist4.pair.net/pipermail/scons-users/2015-February/003454.html
+
+We're planning to switch the Node class to using "slots" in the core sources,
+mainly to reduce memory consumption by up to 35% in large build projects.
+
+This feature has been tested extensively and we don't expect any problems for you.
+However as with all major changes it would be wise to test V2.4.0 when it is
+released. Especially if you are directly using the Node class.
+
+=================================================================
+
RELEASE VERSION/DATE TO BE FILLED IN LATER
@@ -26,6 +44,33 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
since last release. This announcement highlights only the important
changes.
+
+ Please note the following important changes since release 2.3.4:
+ - Documentation fixes for libraries.xml and
+ builders-writing.xml (#2989 and #2990)
+ - Extended docs for InstallVersionedLib/SharedLibrary,
+ and added SKIP_WIN_PACKAGES argument to build script
+ bootstrap.py (PR #230, #3002).
+ - Fixed symlink support (PR #227, #2395).
+ - Updated debug-count test case (PR #229).
+ - Fixed incomplete LIBS flattening and substitution in
+ Program scanner(PR #205, #2954).
+ - Added new method rentry_exists_on_disk to Node.FS (PR #193).
+ - Fixed several D tests under the different OS.
+ - Add support for f08 file extensions for Fortran 2008 code.
+ - Show --config choices if no argument is specified (PR #202).
+ - Fixed build crash when XML toolchain isn't installed, and
+ activated compression for ZIP archives.
+ - Fix for VersionedSharedLibrary under 'sunos' platform.
+ - Fixed dll link with precompiled headers on MSVC 2012
+ - Added an 'exclude' parameter to Glob()
+ - Support for multiple cmdargs (one per variant) in VS project files.
+ - Various improvements for TempFileMunge class.
+ - Added an implementation for Visual Studio users files (PR #209).
+ - Added support for the 'PlatformToolset' tag in VS project files (#2978).
+ - Added support for '-isystem' to ParseFlags.
+
+
Please note the following important changes since release 2.3.3:
-- Fix for EnsureSConsVersion regression in 2.3.3.
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index ef4e016..b3a46b8 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -6,6 +6,15 @@
RELEASE VERSION/DATE TO BE FILLED IN LATER
+ From John Doe:
+
+ - Whatever John Doe did.
+
+ From Rob Smith:
+ - Added support for Visual Studio 2015
+
+RELEASE 2.3.5 - Mon, 17 Jun 2015 21:07:32 -0700
+
From Stephen Pollard:
- Documentation fixes for libraries.xml and
builders-writing.xml (#2989 and #2990)
diff --git a/src/RELEASE.txt b/src/RELEASE.txt
index 1fa033b..303776c 100644
--- a/src/RELEASE.txt
+++ b/src/RELEASE.txt
@@ -1,4 +1,4 @@
- A new SCons checkpoint release, 2.3.5.alpha.yyyymmdd, is now available
+ A new SCons checkpoint release, 2.3.6.alpha.yyyymmdd, is now available
on the SCons download page:
http://www.scons.org/download.php
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index 6886e85..973c109 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -1528,8 +1528,8 @@ class Base(SubstitutionEnvironment):
def Dump(self, key = None):
"""
- Using the standard Python pretty printer, dump the contents of the
- scons build environment to stdout.
+ Using the standard Python pretty printer, return the contents of the
+ scons build environment as a string.
If the key passed in is anything other than None, then that will
be used as an index into the build environment dictionary and
diff --git a/src/engine/SCons/Tool/MSCommon/arch.py b/src/engine/SCons/Tool/MSCommon/arch.py
index 2c90950..9bcc221 100644
--- a/src/engine/SCons/Tool/MSCommon/arch.py
+++ b/src/engine/SCons/Tool/MSCommon/arch.py
@@ -51,6 +51,12 @@ SupportedArchitectureList = [
'ia64',
['IA64'],
),
+
+ ArchitectureDefinition(
+ 'arm',
+ ['ARM'],
+ ),
+
]
SupportedArchitectureMap = {}
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py
index 97cb349..0ee6324 100644
--- a/src/engine/SCons/Tool/MSCommon/vc.py
+++ b/src/engine/SCons/Tool/MSCommon/vc.py
@@ -134,9 +134,13 @@ def get_host_target(env):
# If you update this, update SupportedVSList in Tool/MSCommon/vs.py, and the
# MSVC_VERSION documentation in Tool/msvc.xml.
-_VCVER = ["12.0", "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 = ["14.0", "14.0Exp", "12.0", "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 = {
+ '14.0' : [
+ r'Microsoft\VisualStudio\14.0\Setup\VC\ProductDir'],
+ '14.0Exp' : [
+ r'Microsoft\VCExpress\14.0\Setup\VC\ProductDir'],
'12.0' : [
r'Microsoft\VisualStudio\12.0\Setup\VC\ProductDir'],
'12.0Exp' : [
diff --git a/src/engine/SCons/Tool/MSCommon/vs.py b/src/engine/SCons/Tool/MSCommon/vs.py
index 2ec403b..d9eb1e3 100644
--- a/src/engine/SCons/Tool/MSCommon/vs.py
+++ b/src/engine/SCons/Tool/MSCommon/vs.py
@@ -203,6 +203,28 @@ class VisualStudio(object):
# Tool/MSCommon/vc.py, and the MSVC_VERSION documentation in Tool/msvc.xml.
SupportedVSList = [
+ # Visual Studio 2015
+ VisualStudio('14.0',
+ vc_version='14.0',
+ sdk_version='10.0A',
+ hkeys=[r'Microsoft\VisualStudio\14.0\Setup\VS\ProductDir'],
+ common_tools_var='VS140COMNTOOLS',
+ executable_path=r'Common7\IDE\devenv.com',
+ batch_file_path=r'Common7\Tools\vsvars32.bat',
+ supported_arch=['x86', 'amd64', "arm"],
+ ),
+
+ # Visual C++ 2015 Express Edition (for Desktop)
+ VisualStudio('14.0Exp',
+ vc_version='14.0',
+ sdk_version='10.0A',
+ hkeys=[r'Microsoft\VisualStudio\14.0\Setup\VS\ProductDir'],
+ common_tools_var='VS140COMNTOOLS',
+ executable_path=r'Common7\IDE\WDExpress.exe',
+ batch_file_path=r'Common7\Tools\vsvars32.bat',
+ supported_arch=['x86', 'amd64', "arm"],
+ ),
+
# Visual Studio 2013
VisualStudio('12.0',
vc_version='12.0',
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index d00413d..8b74cf4 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -1535,7 +1535,9 @@ class _GenerateV7DSW(_DSWGenerator):
def PrintSolution(self):
"""Writes a solution file"""
self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr)
- if self.version_num >= 11.0:
+ if self.version_num >= 12.0:
+ self.file.write('# Visual Studio 14\n')
+ elif self.version_num >= 11.0:
self.file.write('# Visual Studio 11\n')
elif self.version_num >= 10.0:
self.file.write('# Visual Studio 2010\n')
diff --git a/src/script/scons.py b/src/script/scons.py
index 0c7b44c..e522f57 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -191,7 +191,7 @@ if __name__ == "__main__":
except:
print("Import failed. Unable to find SCons files in:")
for path in libs:
- print " %s" % path
+ print(" %s" % path)
raise
# this does all the work, and calls sys.exit
diff --git a/test/MSVS/vs-14.0-exec.py b/test/MSVS/vs-14.0-exec.py
new file mode 100644
index 0000000..b96bdab
--- /dev/null
+++ b/test/MSVS/vs-14.0-exec.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that we can actually build a simple program using our generated
+Visual Studio 14.0 project (.vcxproj) and solution (.sln) files
+using Visual Studio 14.0 (Professional edition).
+"""
+
+import os
+import sys
+
+import TestSConsMSVS
+
+test = TestSConsMSVS.TestSConsMSVS()
+
+if sys.platform != 'win32':
+ msg = "Skipping Visual Studio test on non-Windows platform '%s'\n" % sys.platform
+ test.skip_test(msg)
+
+msvs_version = '14.0'
+
+if not msvs_version in test.msvs_versions():
+ msg = "Visual Studio %s not installed; skipping test.\n" % msvs_version
+ test.skip_test(msg)
+
+
+
+# Let SCons figure out the Visual Studio environment variables for us and
+# print out a statement that we can exec to suck them into our external
+# environment so we can execute devenv and really try to build something.
+
+test.run(arguments = '-n -q -Q -f -', stdin = """\
+env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s')
+print "os.environ.update(%%s)" %% repr(env['ENV'])
+""" % locals())
+
+exec(test.stdout())
+
+
+
+test.subdir('sub dir')
+
+test.write(['sub dir', 'SConstruct'], """\
+env=Environment(MSVS_VERSION = '%(msvs_version)s')
+
+env.MSVSProject(target = 'foo.vcxproj',
+ srcs = ['foo.c'],
+ buildtarget = 'foo.exe',
+ variant = 'Release')
+
+env.Program('foo.c')
+""" % locals())
+
+test.write(['sub dir', 'foo.c'], r"""
+int
+main(int argc, char *argv)
+{
+ printf("foo.c\n");
+ exit (0);
+}
+""")
+
+test.run(chdir='sub dir', arguments='.')
+
+test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
+
+import SCons.Platform.win32
+system_dll_path = os.path.join( SCons.Platform.win32.get_system_root(), 'System32' )
+os.environ['PATH'] = os.environ['PATH'] + os.pathsep + system_dll_path
+
+test.run(chdir='sub dir',
+ program=[test.get_msvs_executable(msvs_version)],
+ arguments=['foo.sln', '/build', 'Release'])
+
+test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n")
+
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.0-files.py b/test/MSVS/vs-14.0-files.py
new file mode 100644
index 0000000..e4ba8e2
--- /dev/null
+++ b/test/MSVS/vs-14.0-files.py
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that we can generate Visual Studio 14.0 project (.vcxproj) and
+solution (.sln) files that look correct.
+"""
+
+import os
+
+import TestSConsMSVS
+
+test = TestSConsMSVS.TestSConsMSVS()
+host_arch = test.get_vs_host_arch()
+
+
+# Make the test infrastructure think we have this version of MSVS installed.
+test._msvs_versions = ['14.0']
+
+
+
+expected_slnfile = TestSConsMSVS.expected_slnfile_14_0
+expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_0
+SConscript_contents = TestSConsMSVS.SConscript_contents_14_0
+
+
+
+test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
+
+test.run(arguments="Test.vcxproj")
+
+test.must_exist(test.workpath('Test.vcxproj'))
+test.must_exist(test.workpath('Test.vcxproj.filters'))
+vcxproj = test.read('Test.vcxproj', 'r')
+expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct')
+# don't compare the pickled data
+assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
+
+test.must_exist(test.workpath('Test.sln'))
+sln = test.read('Test.sln', 'r')
+expect = test.msvs_substitute(expected_slnfile, '14.0', None, 'SConstruct')
+# don't compare the pickled data
+assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
+
+test.run(arguments='-c .')
+
+test.must_not_exist(test.workpath('Test.vcxproj'))
+test.must_not_exist(test.workpath('Test.vcxproj.filters'))
+test.must_not_exist(test.workpath('Test.sln'))
+
+test.run(arguments='Test.vcxproj')
+
+test.must_exist(test.workpath('Test.vcxproj'))
+test.must_exist(test.workpath('Test.vcxproj.filters'))
+test.must_exist(test.workpath('Test.sln'))
+
+test.run(arguments='-c Test.sln')
+
+test.must_not_exist(test.workpath('Test.vcxproj'))
+test.must_not_exist(test.workpath('Test.vcxproj.filters'))
+test.must_not_exist(test.workpath('Test.sln'))
+
+
+
+# Test that running SCons with $PYTHON_ROOT in the environment
+# changes the .vcxproj output as expected.
+os.environ['PYTHON_ROOT'] = 'xyzzy'
+python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
+
+test.run(arguments='Test.vcxproj')
+
+test.must_exist(test.workpath('Test.vcxproj'))
+vcxproj = test.read('Test.vcxproj', 'r')
+expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct',
+ python=python)
+# don't compare the pickled data
+assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
+
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.0-scc-files.py b/test/MSVS/vs-14.0-scc-files.py
new file mode 100644
index 0000000..c934ac9
--- /dev/null
+++ b/test/MSVS/vs-14.0-scc-files.py
@@ -0,0 +1,115 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that we can generate Visual Studio 14.0 project (.vcxproj) and
+solution (.sln) files that contain SCC information and look correct.
+"""
+
+import os
+
+import TestSConsMSVS
+
+test = TestSConsMSVS.TestSConsMSVS()
+
+# Make the test infrastructure think we have this version of MSVS installed.
+test._msvs_versions = ['14.0']
+
+
+
+expected_slnfile = TestSConsMSVS.expected_slnfile_14_0
+expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_0
+SConscript_contents = """\
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='14.0',
+ CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
+ CPPPATH=['inc1', 'inc2'],
+ MSVS_SCC_CONNECTION_ROOT='.',
+ MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM',
+ MSVS_SCC_PROJECT_NAME='Perforce Project')
+
+testsrc = ['test1.cpp', 'test2.cpp']
+testincs = ['sdk_dir\sdk.h']
+testlocalincs = ['test.h']
+testresources = ['test.rc']
+testmisc = ['readme.txt']
+
+env.MSVSProject(target = 'Test.vcxproj',
+ srcs = testsrc,
+ incs = testincs,
+ localincs = testlocalincs,
+ resources = testresources,
+ misc = testmisc,
+ buildtarget = 'Test.exe',
+ variant = 'Release')
+"""
+
+expected_sln_sccinfo = """\
+\tGlobalSection(SourceCodeControl) = preSolution
+\t\tSccNumberOfProjects = 2
+\t\tSccProjectName0 = Perforce\u0020Project
+\t\tSccLocalPath0 = .
+\t\tSccProvider0 = MSSCCI:Perforce\u0020SCM
+\t\tCanCheckoutShared = true
+\t\tSccProjectUniqueName1 = Test.vcxproj
+\t\tSccLocalPath1 = .
+\t\tCanCheckoutShared = true
+\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
+\tEndGlobalSection
+"""
+
+expected_vcproj_sccinfo = """\
+\t\t<SccProjectName>Perforce Project</SccProjectName>
+\t\t<SccLocalPath>.</SccLocalPath>
+\t\t<SccProvider>MSSCCI:Perforce SCM</SccProvider>
+"""
+
+
+test.write('SConstruct', SConscript_contents)
+
+test.run(arguments="Test.vcxproj")
+
+test.must_exist(test.workpath('Test.vcxproj'))
+vcproj = test.read('Test.vcxproj', 'r')
+expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct',
+ vcproj_sccinfo=expected_vcproj_sccinfo)
+# don't compare the pickled data
+assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
+
+test.must_exist(test.workpath('Test.sln'))
+sln = test.read('Test.sln', 'r')
+expect = test.msvs_substitute(expected_slnfile, '14.0', None, 'SConstruct',
+ sln_sccinfo=expected_sln_sccinfo)
+# don't compare the pickled data
+assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.0-scc-legacy-files.py b/test/MSVS/vs-14.0-scc-legacy-files.py
new file mode 100644
index 0000000..ba6ebad
--- /dev/null
+++ b/test/MSVS/vs-14.0-scc-legacy-files.py
@@ -0,0 +1,98 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that we can generate Visual Studio 14.0 project (.vcxproj) and
+solution (.sln) files that contain SCC information and look correct.
+"""
+
+import os
+
+import TestSConsMSVS
+
+test = TestSConsMSVS.TestSConsMSVS()
+
+# Make the test infrastructure think we have this version of MSVS installed.
+test._msvs_versions = ['14.0']
+
+
+
+expected_slnfile = TestSConsMSVS.expected_slnfile_14_0
+expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_0
+SConscript_contents = """\
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='14.0',
+ CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
+ CPPPATH=['inc1', 'inc2'],
+ MSVS_SCC_LOCAL_PATH='C:\\MyMsVsProjects',
+ MSVS_SCC_PROJECT_NAME='Perforce Project')
+
+testsrc = ['test1.cpp', 'test2.cpp']
+testincs = ['sdk_dir\sdk.h']
+testlocalincs = ['test.h']
+testresources = ['test.rc']
+testmisc = ['readme.txt']
+
+env.MSVSProject(target = 'Test.vcxproj',
+ srcs = testsrc,
+ incs = testincs,
+ localincs = testlocalincs,
+ resources = testresources,
+ misc = testmisc,
+ buildtarget = 'Test.exe',
+ variant = 'Release')
+"""
+
+expected_vcproj_sccinfo = """\
+\t\t<SccProjectName>Perforce Project</SccProjectName>
+\t\t<SccLocalPath>C:\\MyMsVsProjects</SccLocalPath>
+"""
+
+
+test.write('SConstruct', SConscript_contents)
+
+test.run(arguments="Test.vcxproj")
+
+test.must_exist(test.workpath('Test.vcxproj'))
+vcproj = test.read('Test.vcxproj', 'r')
+expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct',
+ vcproj_sccinfo=expected_vcproj_sccinfo)
+# don't compare the pickled data
+assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
+
+test.must_exist(test.workpath('Test.sln'))
+sln = test.read('Test.sln', 'r')
+expect = test.msvs_substitute(expected_slnfile, '14.0', None, 'SConstruct')
+# don't compare the pickled data
+assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.0Exp-exec.py b/test/MSVS/vs-14.0Exp-exec.py
new file mode 100644
index 0000000..44ebece
--- /dev/null
+++ b/test/MSVS/vs-14.0Exp-exec.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that we can actually build a simple program using our generated
+Visual Studio 14.0 project (.vcxproj) and solution (.sln) files
+using Visual C++ 14.0 Express edition.
+"""
+
+import os
+import sys
+
+import TestSConsMSVS
+
+test = TestSConsMSVS.TestSConsMSVS()
+
+if sys.platform != 'win32':
+ msg = "Skipping Visual Studio test on non-Windows platform '%s'\n" % sys.platform
+ test.skip_test(msg)
+
+msvs_version = '14.0Exp'
+
+if not msvs_version in test.msvs_versions():
+ msg = "Visual Studio %s not installed; skipping test.\n" % msvs_version
+ test.skip_test(msg)
+
+
+
+# Let SCons figure out the Visual Studio environment variables for us and
+# print out a statement that we can exec to suck them into our external
+# environment so we can execute devenv and really try to build something.
+
+test.run(arguments = '-n -q -Q -f -', stdin = """\
+env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s')
+print "os.environ.update(%%s)" %% repr(env['ENV'])
+""" % locals())
+
+exec(test.stdout())
+
+
+
+test.subdir('sub dir')
+
+test.write(['sub dir', 'SConstruct'], """\
+env=Environment(MSVS_VERSION = '%(msvs_version)s')
+
+env.MSVSProject(target = 'foo.vcxproj',
+ srcs = ['foo.c'],
+ buildtarget = 'foo.exe',
+ variant = 'Release')
+
+env.Program('foo.c')
+""" % locals())
+
+test.write(['sub dir', 'foo.c'], r"""
+int
+main(int argc, char *argv)
+{
+ printf("foo.c\n");
+ exit (0);
+}
+""")
+
+test.run(chdir='sub dir', arguments='.')
+
+test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj'))
+
+import SCons.Platform.win32
+system_dll_path = os.path.join( SCons.Platform.win32.get_system_root(), 'System32' )
+os.environ['PATH'] = os.environ['PATH'] + os.pathsep + system_dll_path
+
+test.run(chdir='sub dir',
+ program=[test.get_msvs_executable(msvs_version)],
+ arguments=['foo.sln', '/build', 'Release'])
+
+test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n")
+
+
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: