Changeset 182089 in webkit
- Timestamp:
- Mar 27, 2015, 4:08:01 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/WTF.vcxproj/WTFGenerated.make (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/Scripts/update-webkit-dependency (modified) (8 diffs)
-
Tools/Scripts/update-webkit-support-libs (modified) (8 diffs)
-
Tools/Scripts/webkitdirs.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r182032 r182089 1 2015-03-27 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Support building WTF on Windows without Cygwin 4 https://bugs.webkit.org/show_bug.cgi?id=143084 5 6 Reviewed by Brent Fulgham. 7 8 Windows doesn't have "touch". 9 10 * WTF.vcxproj/WTFGenerated.make: 11 1 12 2015-03-26 Alex Christensen <achristensen@webkit.org> 2 13 -
trunk/Source/WTF/WTF.vcxproj/WTFGenerated.make
r180676 r182089 1 1 all: WTFHeaderDetection.h 2 @t ouch"%ConfigurationBuildDir%\buildfailed"2 @type NUL > "%ConfigurationBuildDir%\buildfailed" 3 3 @perl build-generated-files.pl "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" "%PlatformArchitecture%" 4 4 !IF "$(OFFICIAL_BUILD)"!="1" -
trunk/Tools/ChangeLog
r182065 r182089 1 2015-03-27 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Support building WTF on Windows without Cygwin 4 https://bugs.webkit.org/show_bug.cgi?id=143084 5 6 Reviewed by Brent Fulgham. 7 8 Windows without Cygwin doesn't have curl, unzip, or grep. Luckily, Perl does all of these things. 9 This patch also migrates to using File::Spec->catfile() for directory separators. 10 11 * Scripts/update-webkit-dependency: 12 (wanted): 13 * Scripts/update-webkit-support-libs: 14 (wanted): 15 (downloadExpectedVersionNumber): 16 (zipFileVersion): 17 (toUnixPath): Deleted. 18 * Scripts/webkitdirs.pm: 19 (determineSourceDir): 20 (windowsSourceSourceDir): 21 (windowsLibrariesDir): 22 (windowsOutputDir): 23 (checkInstalledTools): 24 (buildVisualStudioProject): 25 1 26 2015-03-27 Alex Christensen <achristensen@webkit.org> 2 27 -
trunk/Tools/Scripts/update-webkit-dependency
r181982 r182089 71 71 my $file = getLibraryName($libsURL); 72 72 my $zipFile = "$file.zip"; 73 my $webkitLibrariesDir = $ENV{'WEBKIT_LIBRARIES'} || "$sourceDir/WebKitLibraries/win";73 my $webkitLibrariesDir = $ENV{'WEBKIT_LIBRARIES'} || File::Spec->catdir($sourceDir, "WebKitLibraries", "win"); 74 74 my $tmpRelativeDir = File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1); 75 75 my $tmpAbsDir = File::Spec->rel2abs($tmpRelativeDir); … … 81 81 if (defined $modified_time) { 82 82 83 open NEW, ">", "$tmpAbsDir/$file.headers";83 open NEW, ">", File::Spec->catfile($tmpAbsDir, "$file.headers"); 84 84 print NEW "Last-Modified: " . time2str($modified_time) . "\n"; 85 85 close NEW; … … 92 92 $headerURL =~ s/\.zip$/\.headers/; 93 93 94 my $result = getstore($headerURL, "$tmpAbsDir/$file.headers");94 my $result = getstore($headerURL, File::Spec->catfile($tmpAbsDir, "$file.headers")); 95 95 96 96 if (!is_success($result)) { … … 99 99 print STDERR "You may have to run \$ cpan LWP::Protocol::https\n"; 100 100 101 if (! -f "$webkitLibrariesDir/$file.headers") {101 if (! -f File::Spec->catfile($webkitLibrariesDir, "$file.headers")) { 102 102 print STDERR "Unable to check Last-Modified date and no version of $file to fall back to.\n"; 103 103 exit 1; … … 109 109 } 110 110 111 if (open NEW, "$tmpAbsDir/$file.headers") {111 if (open NEW, File::Spec->catfile($tmpAbsDir, "$file.headers")) { 112 112 my $new = lastModifiedToUnixTime(<NEW>); 113 113 close NEW; 114 114 115 if (defined $new && open OLD, "$webkitLibrariesDir/$file.headers") {115 if (defined $new && open OLD, File::Spec->catfile($webkitLibrariesDir, "$file.headers")) { 116 116 my $old = lastModifiedToUnixTime(<OLD>); 117 117 close OLD; … … 125 125 print "Downloading $zipFile...\n\n"; 126 126 print "$libsURL\n"; 127 my $result = getstore($libsURL, "$tmpAbsDir/$zipFile");127 my $result = getstore($libsURL, File::Spec->catfile($tmpAbsDir, $zipFile)); 128 128 die "Couldn't download $zipFile!" if is_error($result); 129 129 130 my $zip = Archive::Zip->new( "$tmpAbsDir/$zipFile");130 my $zip = Archive::Zip->new(File::Spec->catfile($tmpAbsDir, $zipFile)); 131 131 $result = $zip->extractTree("", $tmpAbsDir); 132 132 die "Couldn't unzip $zipFile." if $result != AZ_OK; … … 136 136 sub wanted 137 137 { 138 my $relativeName = File::Spec->abs2rel($File::Find::name, "$tmpAbsDir/$file/$prefixInZip");139 my $destination = "$webkitLibrariesDir/$relativeName";138 my $relativeName = File::Spec->abs2rel($File::Find::name, File::Spec->catdir($tmpAbsDir, $file, $prefixInZip)); 139 my $destination = File::Spec->catfile($webkitLibrariesDir, $relativeName); 140 140 141 141 if (-d $_) { … … 147 147 } 148 148 149 File::Find::find(\&wanted, "$tmpAbsDir/$file");149 File::Find::find(\&wanted, File::Spec->catfile($tmpAbsDir, $file)); 150 150 151 $result = move( "$tmpAbsDir/$file.headers", $webkitLibrariesDir);151 $result = move(File::Spec->catfile($tmpAbsDir, "$file.headers"), $webkitLibrariesDir); 152 152 print STDERR "Couldn't move $file.headers to $webkitLibrariesDir" . ".\n" if $result == 0; 153 153 -
trunk/Tools/Scripts/update-webkit-support-libs
r165676 r182089 33 33 use warnings; 34 34 35 use Archive::Zip qw( :ERROR_CODES ); 36 use File::Copy; 35 37 use File::Find; 36 38 use File::Temp (); … … 38 40 use FindBin; 39 41 use lib $FindBin::Bin; 42 use LWP::Simple; 40 43 use webkitdirs; 41 44 … … 45 48 my $file = "WebKitSupportLibrary"; 46 49 my $zipFile = "$file.zip"; 47 my $zipDirectory = toUnixPath($ENV{'WEBKITSUPPORTLIBRARIESZIPDIR'})|| $sourceDir;50 my $zipDirectory = $ENV{'WEBKITSUPPORTLIBRARIESZIPDIR'} || $sourceDir; 48 51 my $pathToZip = File::Spec->catfile($zipDirectory, $zipFile); 49 my $webkitLibrariesDir = toUnixPath($ENV{'WEBKIT_LIBRARIES'}) || "$sourceDir/WebKitLibraries/win";52 my $webkitLibrariesDir = $ENV{'WEBKIT_LIBRARIES'} || File::Spec->catdir($sourceDir, "WebKitLibraries", "win"); 50 53 my $versionFile = $file . "Version"; 51 54 my $pathToVersionFile = File::Spec->catfile($webkitLibrariesDir, $versionFile); … … 72 75 } 73 76 74 my $result = system "unzip", "-q", "-d", $tmpAbsDir, $pathToZip; 75 die "Couldn't unzip $zipFile." if $result; 77 my $zip = Archive::Zip->new($pathToZip); 78 my $result = $zip->extractTree("", $tmpAbsDir); 79 die "Couldn't unzip $zipFile." if $result != AZ_OK; 76 80 77 81 print "\nInstalling $file...\n"; … … 79 83 sub wanted 80 84 { 81 my $relativeName = File::Spec->abs2rel($File::Find::name, "$tmpAbsDir/$file/win");82 my $destination = "$webkitLibrariesDir/$relativeName";85 my $relativeName = File::Spec->abs2rel($File::Find::name, File::Spec->catdir($tmpAbsDir, "$file", "win")); 86 my $destination = File::Spec->catfile($webkitLibrariesDir, $relativeName); 83 87 84 88 if (-d $_) { … … 87 91 } 88 92 89 system "cp", $_, $destination;93 copy($_, $destination); 90 94 } 91 95 92 File::Find::find(\&wanted, "$tmpAbsDir/$file");96 File::Find::find(\&wanted, File::Spec->catfile($tmpAbsDir, $file)); 93 97 94 98 print "The $file has been sucessfully installed in\n $webkitLibrariesDir\n"; 95 99 exit; 96 97 sub toUnixPath98 {99 my $path = shift;100 return unless $path;101 chomp($path = `cygpath -u '$path'`);102 return $path;103 }104 100 105 101 sub extractedVersion … … 115 111 sub downloadExpectedVersionNumber 116 112 { 117 chomp(my $expectedVersion = `curl -s --sslv3 -k $versionFileURL`);118 return WEXITSTATUS($?) ? NOTAVERSION : $expectedVersion;113 chomp(my $expectedVersion = get($versionFileURL)); 114 return defined $expectedVersion ? $expectedVersion : NOTAVERSION; 119 115 } 120 116 … … 122 118 { 123 119 return NOTAVERSION unless -f $pathToZip; 124 chomp(my $zipFileVersion = `unzip -p "$pathToZip" $file/win/$versionFile`); 120 my $zip = Archive::Zip->new($pathToZip); 121 chomp(my $zipFileVersion = $zip->contents("$file/win/$versionFile")); 125 122 return $zipFileVersion; 126 123 } -
trunk/Tools/Scripts/webkitdirs.pm
r182065 r182089 145 145 # walks up path checking each directory to see if it is the main WebKit project dir, 146 146 # defined by containing Sources, WebCore, and WebKit 147 until ((-d "$sourceDir/Source" && -d "$sourceDir/Source/WebCore" && -d "$sourceDir/Source/WebKit") || (-d "$sourceDir/Internal" && -d "$sourceDir/OpenSource"))147 until ((-d File::Spec->catdir($sourceDir, "Source") && -d File::Spec->catdir($sourceDir, "Source", "WebCore") && -d File::Spec->catdir($sourceDir, "Source", "WebKit")) || (-d File::Spec->catdir($sourceDir, "Internal") && -d File::Spec->catdir($sourceDir, "OpenSource"))) 148 148 { 149 149 if ($sourceDir !~ s|/[^/]+$||) { … … 152 152 } 153 153 154 $sourceDir = "$sourceDir/OpenSource" if -d "$sourceDir/OpenSource";154 $sourceDir = File::Spec->catdir($sourceDir, "OpenSource") if -d File::Spec->catdir($sourceDir, "OpenSource"); 155 155 } 156 156 … … 1434 1434 sub windowsSourceSourceDir() 1435 1435 { 1436 return windowsSourceDir() . "\\Source";1436 return File::Spec->catdir(windowsSourceDir(), "Source"); 1437 1437 } 1438 1438 1439 1439 sub windowsLibrariesDir() 1440 1440 { 1441 return windowsSourceDir() . "\\WebKitLibraries\\win";1441 return File::Spec->catdir(windowsSourceDir(), "WebKitLibraries", "win"); 1442 1442 } 1443 1443 1444 1444 sub windowsOutputDir() 1445 1445 { 1446 return windowsSourceDir() . "\\WebKitBuild";1446 return File::Spec->catdir(windowsSourceDir(), "WebKitBuild"); 1447 1447 } 1448 1448 … … 1457 1457 sub checkInstalledTools() 1458 1458 { 1459 # SVN 1.7.10 is known to be compatible with current servers. SVN 1.8.x seems to be missing some authentication1460 # protocols we use for svn.webkit.org:1461 my $svnVersion = `svn --version 2> NUL | grep "\\sversion"`;1462 chomp($svnVersion);1463 if (!$? and $svnVersion =~ /1\.8\./) {1464 print "svn 1.7.10 is known to be compatible with our servers. You are running $svnVersion,\nwhich may not work properly.\n"1465 }1466 1467 1459 # environment variables. Avoid until this is corrected. 1468 1460 my $pythonVer = `python --version 2>&1`; … … 1470 1462 1471 1463 # cURL 7.34.0 has a bug that prevents authentication with opensource.apple.com (and other things using SSL3). 1472 my $curlVer = `curl --version 2> NUL | grep "curl"`; 1473 chomp($curlVer); 1474 if (!$? and $curlVer =~ /libcurl\/7\.34\.0/) { 1475 print "cURL version 7.34.0 has a bug that prevents authentication with SSL v2 or v3.\n"; 1476 print "cURL 7.33.0 is known to work. The cURL projects is preparing an update to\n"; 1477 print "correct this problem.\n\n"; 1478 die "Please install a working cURL and try again.\n"; 1464 my $curlVer = `curl --version 2> NUL`; 1465 if (!$? and $curlVer =~ "(.*curl.*)") { 1466 $curlVer = $1; 1467 if ($curlVer =~ /libcurl\/7\.34\.0/) { 1468 print "cURL version 7.34.0 has a bug that prevents authentication with SSL v2 or v3.\n"; 1469 print "cURL 7.33.0 is known to work. The cURL projects is preparing an update to\n"; 1470 print "correct this problem.\n\n"; 1471 die "Please install a working cURL and try again.\n"; 1472 } 1479 1473 } 1480 1474 … … 1676 1670 my $platform = "/p:Platform=" . (isWin64() ? "x64" : "Win32"); 1677 1671 my $logPath = File::Spec->catdir($baseProductDir, $configuration); 1678 File::Path->make_path($logPath) unless -d $logPath or $logPath eq ".";1672 make_path($logPath) unless -d $logPath or $logPath eq "."; 1679 1673 1680 1674 my $errorLogFile = File::Spec->catfile($logPath, "webkit_errors.log");
Note:
See TracChangeset
for help on using the changeset viewer.