[Scons-users] how to configure scons for Visual Studio 2017 (RC)

Thomas Berg merlin66b at gmail.com
Mon Mar 27 06:38:09 EDT 2017


This link shows an interesting way of finding Visual Studio:
https://github.com/node4good/windows-autoconf

I found it in a comment here:
http://stackoverflow.com/questions/41106407/programmatically-finding-the-vs2017-installation-directory

If I understood correctly, all that is required is to execute some
javascript code using the built in Windows tool cscript.exe. This has the
advantage that you don't need to call .net / COM objects, it only depends
on native Windows tools. Perhaps this method could be used by scons too?

Here is the source code of a Microsoft single executable utility which
locates Visual Studio, which is probably less desirable for scons:
https://github.com/Microsoft/vswhere

Visual Studio 2017 does have a vcvarsall.bat. After running "vcvarsall.bat
x64", this is the environment:
https://pastebin.com/Em3CxNpq

Anything else I could do to help?

- Thomas








On Mon, Jan 16, 2017 at 9:12 PM, Bill Deegan <bill at baddogconsulting.com>
wrote:

>
> Is there a vcvarsall.bat in VS 2017?
> A pastebin of the exact output would be helpful..
>
> Looks like microsoft "improved" things.  So now you can have multiple
> installs of VS2017, but they don't add to registry.
> They have a package you can install and then you can call their API from
> C#,C++ to find the locations.
>
> I'm not sure what genius thought this was a reasonable solution to tools
> which need to find VS's installation location.
>
>
>
> On Mon, Jan 16, 2017 at 9:55 AM, Steffen Herbort <
> steffen.herbort at ar-tracking.de> wrote:
>
>> I tried solving it by defining the „vcvarsall.bat“. However it then says
>> that the „wmic“ command is not known (I’m using Win7).
>>
>> Do you have any idea how to solve that?
>>
>>
>>
>> Best,
>>
>> Steffen
>>
>>
>>
>>
>>
>>
>>
>> *Von:* Scons-users [mailto:scons-users-bounces at scons.org] *Im Auftrag
>> von *Bill Deegan
>> *Gesendet:* Freitag, 13. Januar 2017 18:53
>> *An:* SCons users mailing list
>> *Betreff:* Re: [Scons-users] how to configure scons for Visual Studio
>> 2017 (RC)
>>
>>
>>
>> ARg.. MS changed Visual studio/VC install and no longer writes to the
>> registry for 2017..
>>
>> https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-t
>> o-visual-studio-15-setup/
>>
>> I'll see what can be reasonably done.
>>
>> -Bill
>>
>>
>>
>> On Thu, Jan 12, 2017 at 12:25 PM, Bill Deegan <bill at baddogconsulting.com>
>> wrote:
>>
>> Of course if you make local changes that work.. pull requests with the
>> fix would be most welcome..
>>
>> -Bill
>>
>>
>>
>> On Thu, Jan 12, 2017 at 12:00 PM, Steffen Herbort <
>> steffen.herbort at ar-tracking.de> wrote:
>>
>> I'll try the registry keys!
>>
>> I'm using SCons 2.5.1...
>>
>>
>>
>> Am 12. Januar 2017 17:29:48 MEZ schrieb Bill Deegan <
>> bill at baddogconsulting.com>:
>>
>> MSVC initialization searches the registry for the versions of MSVC SCons
>> knows about.
>>
>> Since this is a new version it likely requires some updates with
>> information on where the install information is stored in the registry.
>>
>> If you look at SCons/Tool/MSCommon/vc.py (and vs.py)  you'll see a list
>> of registry locations.
>>
>> If you can look at the registry on your machine and get us the
>> appropriate paths I can probably put together an updated file for you to
>> try out
>>
>> (and make the change in the devel tree).
>>
>> You could also try setting:
>>
>> MSVC_USE_SCRIPT (See manpage: http://scons.org/doc/productio
>> n/HTML/scons-man.html)
>>
>> Which version of SCons are you running?
>>
>>
>>
>> -Bill
>>
>>
>>
>> On Thu, Jan 12, 2017 at 7:43 AM, Steffen Herbort <
>> steffen.herbort at ar-tracking.de> wrote:
>>
>> HI!
>>
>>
>>
>> I'm trying to get scons configured to use a VS2017RC environment for my
>> build.
>>
>> It works in the VS2017 command prompt when I define the compiler and
>> linker manually:
>>
>> CC = '"C:\\Program Files (x86)\\Microsoft Visual
>> Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.10.24728\\bi
>> n\\HostX86\\x86\\cl.exe"'
>>
>> CXX = '"C:\\Program Files (x86)\\Microsoft Visual
>> Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.10.24728\\bi
>> n\\HostX86\\x86\\cl.exe"'
>>
>> LINK = '"C:\\Program Files (x86)\\Microsoft Visual
>> Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.10.24728\\bi
>> n\\HostX86\\x86\\link.exe"'
>>
>> But this does *not* work in the basic command promt.
>>
>> 1) Do you have a working configuration for the standard windows command
>> prompt?
>>
>> 2) It seems that scons can't find the basic include files, since I get
>> the following error:
>>
>> fatal error C1083: File (Include) can't be opened: "stdio.h": No such
>> file or directory
>>
>> Where do I specify those includes?
>>
>>
>>
>> --
>>
>> SH
>>
>>
>>
>>
>> _______________________________________________
>> 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/20170327/ffe4d327/attachment.html>


More information about the Scons-users mailing list