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

Windows: add detection of VS 2017 #227

Merged
merged 1 commit into from
Apr 22, 2017
Merged

Conversation

rainers
Copy link
Member

@rainers rainers commented Apr 21, 2017

@rainers
Copy link
Member Author

rainers commented Apr 21, 2017

Should we be more conservative and prefer one of the older versions if multiple VS are installed?

@WalterBright
Copy link
Member

Prefer the latest.

ReadRegStr $0 HKLM "SOFTWARE\Microsoft\VisualStudio\SxS\VS7" "15.0"
StrCpy $1 "VC2017"
IfErrors not_vc2017
${LineRead} "$0\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt" "1" $2
Copy link
Member

Choose a reason for hiding this comment

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

@MartinNowak MartinNowak merged commit 19843d8 into dlang:master Apr 22, 2017
@@ -351,6 +352,15 @@ SectionGroupEnd
Function DetectVSAndSDK
ClearErrors

ReadRegStr $0 HKLM "SOFTWARE\Microsoft\VisualStudio\SxS\VS7" "15.0"
Copy link

Choose a reason for hiding this comment

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

I have installed VS 2017 Pro and there is no key HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7.
But there is HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7.

Copy link
Member

Choose a reason for hiding this comment

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

See answer below #227 (comment).

@rainers
Copy link
Member Author

rainers commented May 7, 2017

But there is HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7.

The installer is a 32-bit process so the key is translated to the Wow6432Node by a 64-bit OS.

@wilzbach
Copy link
Member

wilzbach commented Jun 5, 2017

This should have been targeted at stable. I cherry-picked it, s.t. it's part of the 2.074.2 release ;-)

#228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants