Changeset 224266 in webkit
- Timestamp:
- Oct 31, 2017 5:29:19 PM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r224263 r224266 1 2017-10-31 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r224143. 4 https://bugs.webkit.org/show_bug.cgi?id=179091 5 6 The patch requires non-standard perl modules in macOS and 7 breaks AWFY (Requested by yusukesuzuki on #webkit). 8 9 Reverted changeset: 10 11 "[Win] Detect Visual Studio 2017 location" 12 https://bugs.webkit.org/show_bug.cgi?id=175275 13 https://trac.webkit.org/changeset/224143 14 1 15 2017-10-31 Tim Horton <timothy_horton@apple.com> 2 16 -
trunk/Tools/Scripts/build-jsc
r224143 r224266 118 118 if (isJSCOnly() && isWindows()) { 119 119 (system("python Tools/Scripts/update-webkit-wincairo-libs.py") == 0) or die; 120 system("python Tools/Scripts/update-vswhere.py");121 120 } 122 121 -
trunk/Tools/Scripts/build-webkit
r224143 r224266 246 246 } 247 247 248 if (isAnyWindows()) {249 system("python Tools/Scripts/update-vswhere.py");250 }251 252 248 # If asked to build just the WebKit project, overwrite the projects 253 249 # list after all of the port specific tweaks have been made to -
trunk/Tools/Scripts/webkitdirs.pm
r224180 r224266 36 36 use Cwd qw(realpath); 37 37 use Digest::MD5 qw(md5_hex); 38 use Encode;39 use Encode::Locale;40 38 use FindBin; 41 39 use File::Basename; … … 45 43 use File::Temp qw(tempdir); 46 44 use File::stat; 47 use JSON::PP;48 45 use List::Util; 49 46 use POSIX; … … 164 161 my $winVersion; 165 162 my $willUseVCExpressWhenBuilding = 0; 166 my $vsWhereFoundInstallation;167 my $vsWhereLegacyInstallation;168 163 169 164 # Defined in VCSUtils. … … 595 590 } 596 591 597 sub pickCurrentVisualStudioInstallation598 {599 return $vsWhereFoundInstallation if defined $vsWhereFoundInstallation;600 601 determineSourceDir();602 603 # Prefer Enterprise, then Professional, then Community, then604 # anything else that provides MSBuild.605 foreach my $productType ((606 'Microsoft.VisualStudio.Product.Enterprise',607 'Microsoft.VisualStudio.Product.Professional',608 'Microsoft.VisualStudio.Product.Community',609 undef610 )) {611 my $command = "$sourceDir/WebKitLibraries/win/tools/vswhere -nologo -latest -format json -requires Microsoft.Component.MSBuild";612 if (defined $productType) {613 $command .= " -products $productType";614 }615 my $vsWhereOut = `$command`;616 my $installations = [];617 eval {618 $installations = decode_json Encode::encode('UTF-8' => Encode::decode(console_in => $vsWhereOut));619 };620 print "Error getting Visual Studio Location: $@\n" if $@;621 undef $@;622 623 if (scalar @$installations) {624 my $installation = $installations->[0];625 $vsWhereFoundInstallation = $installation;626 return $installation;627 }628 }629 return undef;630 }631 632 sub pickLegacyVisualStudioInstallation633 {634 return $vsWhereLegacyInstallation if defined $vsWhereLegacyInstallation;635 636 determineSourceDir();637 638 my $vsWhereOut = `$sourceDir/WebKitLibraries/win/tools/vswhere -nologo -legacy -format json`;639 my $installations_all = [];640 eval {641 $installations_all = decode_json Encode::encode('UTF-8' => Encode::decode(console_in => $vsWhereOut));642 };643 print "Error getting Visual Studio Legacy Location: $@\n" if $@;644 undef $@;645 646 # It's possible that a non-legacy installation without msbuild647 # would not be found by the latest, but would be found by this648 # vswhere call, and we want to skip those, so check for versions649 # with an installation version before 15.0.650 my @installations = grep { (+$_->{installationVersion}) < 15 } @$installations_all;651 652 # We don't get much information that would let us choose between653 # legacy installations, so we'll take the first.654 if (scalar @installations) {655 my $installation = $installations[0];656 $vsWhereLegacyInstallation = $installation;657 return $installation;658 }659 return undef;660 }661 662 592 sub visualStudioInstallDir 663 593 { … … 668 598 $vsInstallDir =~ s|[\\/]$||; 669 599 } else { 670 $vsInstallDir = visualStudioInstallDirVSWhere();600 $vsInstallDir = File::Spec->catdir(programFilesPathX86(), "Microsoft Visual Studio", "2017", "Community"); 671 601 if (not -e $vsInstallDir) { 672 $vsInstallDir = visualStudioInstallDirLegacy(); 673 } 674 if (not -e $vsInstallDir) { 675 $vsInstallDir = visualStudioInstallDirFallback(); 676 print "Fallback $vsInstallDir\n"; 602 $vsInstallDir = File::Spec->catdir(programFilesPathX86(), "Microsoft Visual Studio 14.0"); 677 603 } 678 604 } … … 683 609 } 684 610 685 sub visualStudioInstallDirVSWhere686 {687 pickCurrentVisualStudioInstallation();688 if (defined($vsWhereFoundInstallation)) {689 return $vsWhereFoundInstallation->{installationPath};690 }691 return undef;692 }693 694 sub visualStudioInstallDirLegacy695 {696 pickLegacyVisualStudioInstallation();697 if (defined($vsWhereLegacyInstallation)) {698 return $vsWhereLegacyInstallation->{installationPath};699 }700 return undef;701 }702 703 sub visualStudioInstallDirFallback704 {705 foreach my $productType ((706 'Enterprise',707 'Professional',708 'Community',709 )) {710 my $installdir = File::Spec->catdir(programFilesPathX86(),711 "Microsoft Visual Studio", "2017", $productType);712 my $msbuilddir = File::Spec->catdir($installdir,713 "MSBuild", "15.0", "bin");714 if (-e $installdir && -e $msbuilddir) {715 return $installdir;716 }717 }718 return File::Spec->catdir(programFilesPathX86(), "Microsoft Visual Studio 14.0");719 }720 721 611 sub msBuildInstallDir 722 612 { 723 613 return $msBuildInstallDir if defined $msBuildInstallDir; 724 614 725 my $version = visualStudioVersion(); 726 if ($version >= 15.0) { 727 my $installDir = visualStudioInstallDir(); 728 $msBuildInstallDir = File::Spec->catdir($installDir, 729 "MSBuild", $version, "bin"); 730 } else { 731 $msBuildInstallDir = File::Spec->catdir(programFilesPathX86(), 732 "MSBuild", "14.0", "Bin") 733 } 734 615 $msBuildInstallDir = File::Spec->catdir(programFilesPathX86(), "Microsoft Visual Studio", "2017", "Community", "MSBuild", "15.0", "Bin"); 616 if (not -e $msBuildInstallDir) { 617 $msBuildInstallDir = File::Spec->catdir(programFilesPathX86(), "MSBuild", "14.0", "Bin"); 618 } 735 619 chomp($msBuildInstallDir = `cygpath "$msBuildInstallDir"`) if isCygwin(); 736 620 … … 744 628 745 629 my $installDir = visualStudioInstallDir(); 746 $vsVersion = visualStudioVersionFromInstallDir($installDir); 630 631 $vsVersion = ($installDir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) ? $1 : "14"; 747 632 748 633 print "Using Visual Studio $vsVersion\n"; 749 634 return $vsVersion; 750 }751 752 sub visualStudioVersionFromInstallDir753 {754 my ($dir) = @_;755 my $version;756 757 if ($dir =~ m|Microsoft Visual Studio[/\\]2017|) {758 $version = "15.0";759 }760 761 if (!defined($version)) {762 if ($dir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) {763 $version = $1;764 }765 }766 767 return $version;768 635 } 769 636 … … 2218 2085 } 2219 2086 } elsif (isAnyWindows() && isWin64()) { 2220 if (visualStudioVersion() >= 15) { 2221 push @args, '-G "Visual Studio 15 2017 Win64"'; 2222 } else { 2223 push @args, '-G "Visual Studio 14 2015 Win64"'; 2224 } 2087 push @args, '-G "Visual Studio 14 2015 Win64"'; 2225 2088 } 2226 2089 # Do not show progress of generating bindings in interactive Ninja build not to leave noisy lines on tty
Note: See TracChangeset
for help on using the changeset viewer.