Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 12, 2017

Conversation

refack
Copy link
Contributor

@refack refack commented Feb 28, 2017

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
@@ -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) ]
Copy link
Contributor

@KindDragon KindDragon Mar 4, 2017

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
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
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
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
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
Contributor

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

@refack
Copy link
Contributor Author

refack commented Mar 4, 2017

@KindDragon what debugging functionality specifically?

@KindDragon
Copy link
Contributor

KindDragon commented Mar 5, 2017

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

@refack
Copy link
Contributor Author

refack commented Mar 5, 2017

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

@grafikrobot
Copy link
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
Copy link
Contributor Author

refack commented Mar 5, 2017

👍 14.10

@refack
Copy link
Contributor Author

refack commented Mar 5, 2017

@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
Member

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

@refack
Copy link
Contributor Author

refack commented Mar 5, 2017

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
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
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
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
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
Copy link
Contributor Author

refack commented Mar 10, 2017

@grafikrobot checking

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

refack commented Mar 10, 2017

@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
Member

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

@refack
Copy link
Contributor Author

refack commented Mar 10, 2017

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

@refack
Copy link
Contributor Author

refack commented Mar 11, 2017

CI machine passes

@jhunold
Copy link
Contributor

jhunold commented Mar 11, 2017

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

@grafikrobot grafikrobot merged commit 747287c into boostorg:develop Mar 12, 2017
@refack
Copy link
Contributor Author

refack commented Mar 12, 2017

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

@AndrewPardoe
Copy link

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