[Scons-users] Checking for specific versions of visual studio

Bill Deegan bill at baddogconsulting.com
Wed Sep 16 10:39:29 EDT 2015


Brian,

Looks like SCons is only finding MSVC 11 and 11.0Exp installed on your
system.
Do you have MSVC 9.0 installed?

What's the value of env['MSVC_VERSION'] after you initialize your
environment?

-Bill

On Wed, Sep 16, 2015 at 8:02 AM, Brian Cody <brian.j.cody at gmail.com> wrote:

> Bill,
>
> Here's the file you requested. I never realized the option for it existed!
> Thanks for that.
>
> http://pastebin.com/0pqdMYzv
>
> -Brian
>
>
> On Tue, Sep 15, 2015 at 9:31 AM, Bill Deegan <bill at baddogconsulting.com>
> wrote:
>
>> Can you run with:
>>
>> set SCONS_MSCOMMON_DEBUG=c:\somefile.log
>> scons <whatever>
>> and pastbin the log file?
>>
>> -Bill
>>
>> On Tue, Sep 15, 2015 at 9:01 AM, Brian Cody <brian.j.cody at gmail.com>
>> wrote:
>>
>>> Hey guys, a while ago I asked about how exists() is used for tools and I
>>> was told it pretty much isn't. We have an scons.workarounds we use to get..
>>> around things like this. Today it looks like this:
>>>
>>> _already_warned_about_tool = set()
>>>
>>> def does_tool_exist(env, tool):
>>>     return SCons.Tool.Tool(tool, [str(SCons.Script.Dir(path)) for path
>>> in env['toolpath']]).exists(env)
>>>
>>> def verify_tool_exists(env, tool):
>>>     exists = does_tool_exist(env, tool)
>>>     if not exists:
>>>         if tool not in _already_warned_about_tool:
>>>             _already_warned_about_tool.add(tool)
>>>             sys.stderr.write('*** Tool "' + tool + '" does not exist;
>>> targets skipped.\n')
>>>             if env['fail_if_tools_are_unavailable']:
>>>                 raise
>>> SCons.Errors.BuildError(errstr='fail_if_tools_are_unavailable is enabled.')
>>>     return exists
>>>
>>> This is used because we have some developers who don't have all tools
>>> who still want to be able to "build all that I can". Now the issue we're
>>> seeing is that we create an environment specifically for visual studio 9.0.
>>> i.e.
>>> Environment(tools = ['msvc', 'mslink', 'masm' , 'mslib'],
>>> MSVC_VERSION='9.0', ......)
>>>
>>> With this environment, the above function will successfully tell you if
>>> visual studio is installed or not, however it will return True even if the
>>> version is 12.0. At the moment I'm not sure that we can go to 12 with our
>>> version of the compact framework. Our easier solution would be that this
>>> function should just return false. Deep in the bowels of the visual studio
>>> support I see that the "msvc_exists" takes a version number, but the
>>> exists() in the tool does not attempt to use it. In "msvs_exists" it does
>>> not allow the same version check.
>>>
>>>
>>> So my leading question: How am I supposed to offer this functionality?
>>> If this is a half-implemented in SCons, any suggestion on how to solve this
>>> generically from our standpoint without injecting changes into the SCons
>>> package?
>>>
>>> Thanks
>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150916/ce2e7d8e/attachment-0001.html>


More information about the Scons-users mailing list