[Webkit-unassigned] [Bug 175275] [Win] Detect Visual Studio 2017 location
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 27 09:07:55 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=175275
--- Comment #21 from Per Arne Vollan <pvollan at apple.com> ---
Comment on attachment 325105
--> https://bugs.webkit.org/attachment.cgi?id=325105
Use vswhere to determine visual studio location
View in context: https://bugs.webkit.org/attachment.cgi?id=325105&action=review
> Tools/Scripts/webkitdirs.pm:824
> sub visualStudioVersion
> {
> return $vsVersion if defined $vsVersion;
>
> - my $installDir = visualStudioInstallDir();
> + if ($ENV{'VSINSTALLDIR'}) {
> + $vsVersion = visualStudioVersionFromInstallDir($ENV{'VSINSTALLDIR'});
> + }
>
> - $vsVersion = ($installDir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) ? $1 : "14";
> + if (!defined($vsVersion)) {
> + pickCurrentVisualStudioInstallation();
> + if (defined($vsWhereFoundInstallation)) {
> + $vsVersion = $vsWhereFoundInstallation->{shortVersion};
> + }
> + }
> +
> + if (!defined($vsVersion)) {
> + pickLegacyVisualStudioInstallation();
> + if (defined($vsWhereLegacyInstallation)) {
> + $vsVersion = $vsWhereLegacyInstallation->{shortVersion};
> + }
> + }
> +
> + if (!defined($vsVersion)) {
> + my $installDir = visualStudioInstallDir();
> + $vsVersion = visualStudioVersionFromInstallDir($installDir);
> + }
> +
> + if (!defined($vsVersion)) {
> + $vsVersion = "14";
> + }
>
Could we implement the function visualStudioVersion as
sub visualStudioVersion
{
return $vsVersion if defined $vsVersion;
$installDir = visualStudioInstallDir();
$vsVersion = visualStudioVersionFromInstallDir($installDir);
print "Using Visual Studio $vsVersion\n";
return $vsVersion;
}
since much of this logic is already implemented in the function visualStudioInstallDir?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171027/ae35f0a8/attachment-0001.html>
More information about the webkit-unassigned
mailing list