Skip to content

fix #157: detect vs2017 (vc141) and setup environment#170

Merged
grafikrobot merged 1 commit into
boostorg:developfrom
refack:develop
Mar 12, 2017
Merged

fix #157: detect vs2017 (vc141) and setup environment#170
grafikrobot merged 1 commit into
boostorg:developfrom
refack:develop

Conversation

@refack

@refack refack commented Feb 28, 2017

Copy link
Copy Markdown
Contributor

Based on JIT compilation of a C# file and COM

@refack refack force-pushed the develop branch 2 times, most recently from 308a246 to dd7a0ef Compare March 3, 2017 17:05
@refack refack mentioned this pull request Mar 3, 2017
Comment thread src/tools/msvc.jam Outdated
@@ -907,7 +925,7 @@ local rule configure-really ( version ? : options * )
# version from the path.
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
if [ MATCH "(Microsoft Visual Studio 15)" : $(command) ]
if [ MATCH "(14.10)" : $(command) ]

@KindDragon KindDragon Mar 4, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be if [ MATCH "(Microsoft Visual Studio[\/\\]2017)" : $(command) ], because they checking here path to Visual Studio

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but with 2017 that string is not a part of the path. Only predictable string is 14.10

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my machine it's C:\bin\dev\VS\2017\BuildTools\VC\Tools\MSVC\14.10.24930\bin\HostX64\x64

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this codepath only for default path to VS, check expression for VS2015 below for example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's logic to deduce the VS version from a given path. 14.10 is the only stable path part (MSVC\14.10 at most).
There are other patterns in this block RE: line 965
VS2017 setup has been reworked extensively...

@KindDragon

Copy link
Copy Markdown
Contributor

Maybe transfer functionality for debugging in a separate PR to speed up the merger of this PR?

@refack

refack commented Mar 4, 2017

Copy link
Copy Markdown
Contributor Author

@KindDragon what debugging functionality specifically?

@KindDragon

KindDragon commented Mar 5, 2017

Copy link
Copy Markdown
Contributor

Ahh, your PR based on changes from 'debug' branch. I think you should remove this commits from your PR

@refack

refack commented Mar 5, 2017

Copy link
Copy Markdown
Contributor Author

Branch base oops (debug and develop look too much alike for a dysxelic ;)

@grafikrobot

Copy link
Copy Markdown
Member

General question.. From the other pulls/issues/emails.. Shouldn't the version number be "14.10" or "1410", i.e. not 15.0, nor 14.1, nor 141?

@refack

refack commented Mar 5, 2017

Copy link
Copy Markdown
Contributor Author

👍 14.10

@refack

refack commented Mar 5, 2017

Copy link
Copy Markdown
Contributor Author

@grafikrobot actually it has nuance, The "whole" Visual Studio suite will be version 15.0, but the C++ toolset will be 14.10

@grafikrobot

Copy link
Copy Markdown
Member

@refack I wouldn't call that a nuance.. More like a total clusterf_ck on the part of Microsoft.

@refack

refack commented Mar 5, 2017

Copy link
Copy Markdown
Contributor Author

For this project 15.0 is used only as an internal moniker, so can consider it a nuance.... 🤷
RE: dotnet/core#509

@KindDragon

Copy link
Copy Markdown
Contributor

@refack Discussion about 14.10 in PR #167

@@ -0,0 +1,272 @@
// powershell -ExecutionPolicy Unrestricted -Version "2.0" -Command "&{ Add-Type -Path Program.cs; [VisualStudioConfiguration.Program]::Main(@())}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a license / copyright statement to be considered for inclusion in Boost.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@grafikrobot

Copy link
Copy Markdown
Member

After installing VS2017 community I did:

C:\>cd DevRoots\Boost\build-refack\src\tools\vc141helper

C:\DevRoots\Boost\build-refack\src\tools\vc141helper>cl141_path.cmd
"COM Ok"

C:\DevRoots\Boost\build-refack\src\tools\vc141helper>

And as you can see it did not detect my install. Which is installed at the default location.

@refack

refack commented Mar 10, 2017

Copy link
Copy Markdown
Contributor Author

@grafikrobot checking

@refack refack force-pushed the develop branch 2 times, most recently from 61ea2ce to ed4f151 Compare March 10, 2017 13:41
@refack

refack commented Mar 10, 2017

Copy link
Copy Markdown
Contributor Author

@grafikrobot can you gist the output of try_powershell.cmd just to make sure you have the VCTools "workload" installed.
Here's mine

@grafikrobot

Copy link
Copy Markdown
Member

@refack Sure.. I posted it as a comment on your gist.

@refack

refack commented Mar 10, 2017

Copy link
Copy Markdown
Contributor Author

@grafikrobot I tried to simplify the non C# part, and added some fallbacks.

@refack

refack commented Mar 11, 2017

Copy link
Copy Markdown
Contributor Author

CI machine passes

@jhunold

jhunold commented Mar 11, 2017

Copy link
Copy Markdown
Contributor

Tested the last version of the patch with 2017 Enterprise. Works

@grafikrobot grafikrobot merged commit 747287c into boostorg:develop Mar 12, 2017
@refack

refack commented Mar 12, 2017

Copy link
Copy Markdown
Contributor Author

One small step for me, kinda small step for Boost.build 🐱‍🚀
@grafikrobot much respect! 🥇

@AndrewPardoe

Copy link
Copy Markdown

The officially supported vswhere tool is now available as part of the install starting today with Visual Studio 15.2 preview 2: https://blogs.msdn.microsoft.com/heaths/2017/04/21/vswhere-is-now-installed-with-visual-studio-2017/. This doesn't fix all the existing installs of VS 2017 but going forward you can now detect the VS install locations and whether C++ tools are available from a scripted environment. I hope this helps your scenario.

@github-actions github-actions Bot added the transition Transition to bfgroup/b2 label Oct 2, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

transition Transition to bfgroup/b2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants