Changeset 244171 in webkit
- Timestamp:
- Apr 10, 2019 5:08:34 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r244164 r244171 1 2019-04-10 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Win] Use a bundled vswhere.exe instead of downloading by update-vswhere.py 4 https://bugs.webkit.org/show_bug.cgi?id=196760 5 6 Reviewed by Don Olmstead. 7 8 vswhere.exe has been bundled since Visual Studio 2017 version 9 15.2. We shouldn't download vswhere.exe. 10 11 * Scripts/build-jsc: Do not call update-vswhere.py. 12 * Scripts/build-webkit: Ditto. 13 * Scripts/update-vswhere.py: Removed. 14 * Scripts/webkitdirs.pm: 15 (requireModulesForVSWhere): Deleted. 16 (pickCurrentVisualStudioInstallation): Deleted. 17 (visualStudioInstallDirVSWhere): Return the latest installed VS 18 installation path by using the bundled vswhere.exe. 19 (setupCygwinEnv): Removed a unused variable $visualStudioPath. 20 (visualStudioInstallDirFallback): Removed. 21 1 22 2019-04-10 Aakash Jain <aakash_jain@apple.com> 2 23 -
trunk/Tools/Scripts/build-jsc
r243676 r244171 126 126 if (isWinCairo() || (isJSCOnly() && isWindows())) { 127 127 (system("python Tools/Scripts/update-webkit-wincairo-libs.py") == 0) or die; 128 system("python Tools/Scripts/update-vswhere.py");129 128 } 130 129 -
trunk/Tools/Scripts/build-webkit
r237887 r244171 260 260 } 261 261 262 if (isAnyWindows()) {263 system("python Tools/Scripts/update-vswhere.py");264 }265 266 262 # If asked to build just the WebKit project, overwrite the projects 267 263 # list after all of the port specific tweaks have been made to -
trunk/Tools/Scripts/webkitdirs.pm
r243293 r244171 166 166 my $windowsSourceDir; 167 167 my $winVersion; 168 my $vsWhereFoundInstallation;169 168 170 169 # Defined in VCSUtils. … … 647 646 } 648 647 649 sub requireModulesForVSWhere 650 { 651 require Encode; 652 require Encode::Locale; 653 require JSON::PP; 654 } 655 656 sub pickCurrentVisualStudioInstallation 657 { 658 return $vsWhereFoundInstallation if defined $vsWhereFoundInstallation; 659 660 requireModulesForVSWhere(); 661 determineSourceDir(); 662 663 # Prefer Enterprise, then Professional, then Community, then 664 # anything else that provides MSBuild. 665 foreach my $productType (( 666 'Microsoft.VisualStudio.Product.Enterprise', 667 'Microsoft.VisualStudio.Product.Professional', 668 'Microsoft.VisualStudio.Product.Community', 669 undef 670 )) { 671 my $command = "$sourceDir/WebKitLibraries/win/tools/vswhere -nologo -latest -format json -requires Microsoft.Component.MSBuild"; 672 if (defined $productType) { 673 $command .= " -products $productType"; 674 } 675 my $vsWhereOut = `$command`; 676 my $installations = []; 677 eval { 678 $installations = JSON::PP::decode_json(Encode::encode('UTF-8' => Encode::decode(console_in => $vsWhereOut))); 679 }; 680 print "Error getting Visual Studio Location: $@\n" if $@; 681 undef $@; 682 683 if (scalar @$installations) { 684 my $installation = $installations->[0]; 685 $vsWhereFoundInstallation = $installation; 686 return $installation; 687 } 688 } 689 return undef; 648 sub visualStudioInstallDirVSWhere 649 { 650 my $vswhere = File::Spec->catdir(programFilesPathX86(), "Microsoft Visual Studio", "Installer", "vswhere.exe"); 651 return unless -e $vswhere; 652 open(my $handle, "-|", $vswhere, qw(-nologo -latest -requires Microsoft.Component.MSBuild -property installationPath)) || return; 653 my $vsWhereOut = <$handle>; 654 $vsWhereOut =~ s/\r?\n//; 655 return $vsWhereOut; 690 656 } 691 657 … … 699 665 } else { 700 666 $vsInstallDir = visualStudioInstallDirVSWhere(); 701 if (not -e $vsInstallDir) { 702 $vsInstallDir = visualStudioInstallDirFallback(); 703 } 667 return unless defined $vsInstallDir; 704 668 } 705 669 chomp($vsInstallDir = `cygpath "$vsInstallDir"`) if isCygwin(); … … 707 671 print "Using Visual Studio: $vsInstallDir\n"; 708 672 return $vsInstallDir; 709 }710 711 sub visualStudioInstallDirVSWhere712 {713 pickCurrentVisualStudioInstallation();714 if (defined($vsWhereFoundInstallation)) {715 return $vsWhereFoundInstallation->{installationPath};716 }717 return undef;718 }719 720 sub visualStudioInstallDirFallback721 {722 foreach my $productType ((723 'Enterprise',724 'Professional',725 'Community',726 )) {727 my $installdir = File::Spec->catdir(programFilesPathX86(),728 "Microsoft Visual Studio", "2017", $productType);729 my $msbuilddir = File::Spec->catdir($installdir,730 "MSBuild", "15.0", "bin");731 if (-e $installdir && -e $msbuilddir) {732 return $installdir;733 }734 }735 return undef;736 673 } 737 674 … … 1895 1832 1896 1833 my $programFilesPath = programFilesPath(); 1897 my $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));1898 1834 1899 1835 print "Building results into: ", baseProductDir(), "\n";
Note: See TracChangeset
for help on using the changeset viewer.