Changeset 224266 in webkit


Ignore:
Timestamp:
Oct 31, 2017 5:29:19 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r224143.
https://bugs.webkit.org/show_bug.cgi?id=179091

The patch requires non-standard perl modules in macOS and
breaks AWFY (Requested by yusukesuzuki on #webkit).

Reverted changeset:

"[Win] Detect Visual Studio 2017 location"
https://bugs.webkit.org/show_bug.cgi?id=175275
https://trac.webkit.org/changeset/224143

Location:
trunk/Tools
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r224263 r224266  
     12017-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
    1152017-10-31  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Tools/Scripts/build-jsc

    r224143 r224266  
    118118if (isJSCOnly() && isWindows()) {
    119119    (system("python Tools/Scripts/update-webkit-wincairo-libs.py") == 0) or die;
    120     system("python Tools/Scripts/update-vswhere.py");
    121120}
    122121
  • trunk/Tools/Scripts/build-webkit

    r224143 r224266  
    246246}
    247247
    248 if (isAnyWindows()) {
    249     system("python Tools/Scripts/update-vswhere.py");
    250 }
    251 
    252248# If asked to build just the WebKit project, overwrite the projects
    253249# list after all of the port specific tweaks have been made to
  • trunk/Tools/Scripts/webkitdirs.pm

    r224180 r224266  
    3636use Cwd qw(realpath);
    3737use Digest::MD5 qw(md5_hex);
    38 use Encode;
    39 use Encode::Locale;
    4038use FindBin;
    4139use File::Basename;
     
    4543use File::Temp qw(tempdir);
    4644use File::stat;
    47 use JSON::PP;
    4845use List::Util;
    4946use POSIX;
     
    164161my $winVersion;
    165162my $willUseVCExpressWhenBuilding = 0;
    166 my $vsWhereFoundInstallation;
    167 my $vsWhereLegacyInstallation;
    168163
    169164# Defined in VCSUtils.
     
    595590}
    596591
    597 sub pickCurrentVisualStudioInstallation
    598 {
    599     return $vsWhereFoundInstallation if defined $vsWhereFoundInstallation;
    600 
    601     determineSourceDir();
    602 
    603     # Prefer Enterprise, then Professional, then Community, then
    604     # 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         undef
    610     )) {
    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 pickLegacyVisualStudioInstallation
    633 {
    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 msbuild
    647     # would not be found by the latest, but would be found by this
    648     # vswhere call, and we want to skip those, so check for versions
    649     # 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 between
    653     # 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 
    662592sub visualStudioInstallDir
    663593{
     
    668598        $vsInstallDir =~ s|[\\/]$||;
    669599    } else {
    670         $vsInstallDir = visualStudioInstallDirVSWhere();
     600        $vsInstallDir = File::Spec->catdir(programFilesPathX86(), "Microsoft Visual Studio", "2017", "Community");
    671601        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");
    677603        }
    678604    }
     
    683609}
    684610
    685 sub visualStudioInstallDirVSWhere
    686 {
    687     pickCurrentVisualStudioInstallation();
    688     if (defined($vsWhereFoundInstallation)) {
    689         return $vsWhereFoundInstallation->{installationPath};
    690     }
    691     return undef;
    692 }
    693 
    694 sub visualStudioInstallDirLegacy
    695 {
    696     pickLegacyVisualStudioInstallation();
    697     if (defined($vsWhereLegacyInstallation)) {
    698         return $vsWhereLegacyInstallation->{installationPath};
    699     }
    700     return undef;
    701 }
    702 
    703 sub visualStudioInstallDirFallback
    704 {
    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 
    721611sub msBuildInstallDir
    722612{
    723613    return $msBuildInstallDir if defined $msBuildInstallDir;
    724614
    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    }
    735619    chomp($msBuildInstallDir = `cygpath "$msBuildInstallDir"`) if isCygwin();
    736620
     
    744628
    745629    my $installDir = visualStudioInstallDir();
    746     $vsVersion = visualStudioVersionFromInstallDir($installDir);
     630
     631    $vsVersion = ($installDir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) ? $1 : "14";
    747632
    748633    print "Using Visual Studio $vsVersion\n";
    749634    return $vsVersion;
    750 }
    751 
    752 sub visualStudioVersionFromInstallDir
    753 {
    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;
    768635}
    769636
     
    22182085        }
    22192086    } 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"';
    22252088    }
    22262089    # 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.