[Scons-users] Generating visual studio 2012 project files

Dan Pidcock dan.pidcock at googlemail.com
Wed Jan 30 06:17:18 EST 2013


On 25 January 2013 17:20, William Deegan <bill at baddogconsulting.com> wrote:

> On 01/25/2013 12:29 AM, Dan Pidcock wrote:

>

>

> On 24 Jan 2013 23:01, "Bill Deegan" <bill at baddogconsulting.com> wrote:

>>

>> Dan,

>>

>> On Thu, Jan 24, 2013 at 1:45 PM, Dan Pidcock <dan.pidcock at googlemail.com>

>> wrote:

>>>

>>> When I run Scons with compiler=vc11, visual studio 2012 will open them

>>> but complains that they are visual studio 2010 projects and should be

>>> upgraded.

>>>

>>> A diff on the upgraded project file showed they had added

>>> <PlatformToolset>v110</PlatformToolset> to PropertyGroup Condition, so

>>> I modified msvs.py V10DSPPropertyGroupCondition to add that line.

>>>

>>> That works fine but is it the correct way to do it? I expected scons

>>> to work out of the box on VS 11 (2012) as

>>>

>>> https://bitbucket.org/scons/scons/pull-request/19/visual-studio-11-support/

>>> has been created. I did check

>>> http://www.scons.org/wiki/PlatformSpecificNotes#Visual_C.2B-.2B- but

>>> couldn’t see anything there.

>>

>>

>> Are you running scons 2.2, or from the mercurial depot?

>> Although pull request 19 may have been merged it may not yet be in a

>> released version of SCons.

>> -Bill

>

> Bill,

>

> The version I'm running includes that pull request, but the request doesn't

> include the change that I made to msvs.Py. I would submit a ticket with

> patch attached but want to check first that I haven't missed something.

>

>

>

> Can you create a pull request rather than attach the patch to the bug.

> Also if you have a test to cover the change that will make it much easier to

> pull in.

>

> -Bill


When I tried to create a pull request Bitbucket said "Access denied"
so I have dumped the patch below in the hope that it is of use to
somebody.

If it doesn't get applied and I get time in future I will work out how
to use the test harness and BitBucket and generate a pull request.

Dan

--- Lib/site-packages/scons-2.2.0/SCons/Tool/msvs.py Sun Aug 05 15:38:30 2012
+++ Lib/site-packages/scons-2.2.0/SCons/Tool/msvs.py Mon Jan 28 14:06:12 2013
@@ -892,6 +892,7 @@
\t<PropertyGroup
Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'"
Label="Configuration">
\t\t<ConfigurationType>Makefile</ConfigurationType>
\t\t<UseOfMfc>false</UseOfMfc>
+\t\t<PlatformToolset>v110</PlatformToolset>
\t</PropertyGroup>
"""

@@ -1206,7 +1207,7 @@
self.version_num, self.suite = msvs_parse_version(self.version)
self.versionstr = '7.00'
if self.version_num >= 11.0:
- self.versionstr = '12.0'
+ self.versionstr = '12.00'
elif self.version_num >= 10.0:
self.versionstr = '11.00'
elif self.version_num >= 9.0:


More information about the Scons-users mailing list