Title: [171840] branches/safari-600.1-branch

Diff

Modified: branches/safari-600.1-branch/Source/_javascript_Core/ChangeLog (171839 => 171840)


--- branches/safari-600.1-branch/Source/_javascript_Core/ChangeLog	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Source/_javascript_Core/ChangeLog	2014-07-31 05:49:47 UTC (rev 171840)
@@ -1,3 +1,18 @@
+2014-07-30  Lucas Forschler  <[email protected]>
+
+        Merge r171825
+
+    2014-07-29  Brent Fulgham  <[email protected]>
+
+            [Win] Modify version numbering scheme to support 5-tuple versions
+            https://bugs.webkit.org/show_bug.cgi?id=135400
+            <rdar://problem/17849033>
+
+            Reviewed by David Kilzer.
+
+            * _javascript_Core.vcxproj/_javascript_CorePostBuild.cmd: Use the
+            new version-stamp.pl script to version _javascript_Core.dll.
+
 2014-07-29  Lucas Forschler  <[email protected]>
 
         Merge r171689

Modified: branches/safari-600.1-branch/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_CorePostBuild.cmd (171839 => 171840)


--- branches/safari-600.1-branch/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_CorePostBuild.cmd	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_CorePostBuild.cmd	2014-07-31 05:49:47 UTC (rev 171840)
@@ -1,2 +1,2 @@
-if exist "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%"
+perl "%WEBKIT_LIBRARIES%\tools\scripts\version-stamp.pl" "%INTDIR%" "%TARGETPATH%"
 if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"

Modified: branches/safari-600.1-branch/Source/WTF/ChangeLog (171839 => 171840)


--- branches/safari-600.1-branch/Source/WTF/ChangeLog	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Source/WTF/ChangeLog	2014-07-31 05:49:47 UTC (rev 171840)
@@ -1,3 +1,20 @@
+2014-07-30  Lucas Forschler  <[email protected]>
+
+        Merge r171825
+
+    2014-07-29  Brent Fulgham  <[email protected]>
+    
+            [Win] Modify version numbering scheme to support 5-tuple versions
+            https://bugs.webkit.org/show_bug.cgi?id=135400
+            <rdar://problem/17849033>
+    
+            Reviewed by David Kilzer.
+    
+            * WTF.vcxproj/WTFPostBuild.cmd: Use new version-stamp.pl script
+            to version WTF.dll.
+            * WTF.vcxproj/WTFPreBuild.cmd: Make sure we have created the
+            appropriate version resource during builds.
+
 2014-07-17  Dean Jackson  <[email protected]>
 
         <rdar://problem/17675068> Disable some features on this branch.

Modified: branches/safari-600.1-branch/Source/WTF/WTF.vcxproj/WTFPostBuild.cmd (171839 => 171840)


--- branches/safari-600.1-branch/Source/WTF/WTF.vcxproj/WTFPostBuild.cmd	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Source/WTF/WTF.vcxproj/WTFPostBuild.cmd	2014-07-31 05:49:47 UTC (rev 171840)
@@ -1,2 +1,2 @@
 if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
-if exist "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%"
\ No newline at end of file
+perl "%WEBKIT_LIBRARIES%\tools\scripts\version-stamp.pl" "%INTDIR%" "%TARGETPATH%"

Modified: branches/safari-600.1-branch/Source/WTF/WTF.vcxproj/WTFPreBuild.cmd (171839 => 171840)


--- branches/safari-600.1-branch/Source/WTF/WTF.vcxproj/WTFPreBuild.cmd	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Source/WTF/WTF.vcxproj/WTFPreBuild.cmd	2014-07-31 05:49:47 UTC (rev 171840)
@@ -4,3 +4,5 @@
 if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
 if errorlevel 1 exit 1
 echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
+
+perl "%WEBKIT_LIBRARIES%\tools\scripts\auto-version.pl" "%INTDIR%"

Modified: branches/safari-600.1-branch/Source/WebKit/ChangeLog (171839 => 171840)


--- branches/safari-600.1-branch/Source/WebKit/ChangeLog	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Source/WebKit/ChangeLog	2014-07-31 05:49:47 UTC (rev 171840)
@@ -1,3 +1,18 @@
+2014-07-30  Lucas Forschler  <[email protected]>
+
+        Merge r171825
+
+    2014-07-29  Brent Fulgham  <[email protected]>
+    
+            [Win] Modify version numbering scheme to support 5-tuple versions
+            https://bugs.webkit.org/show_bug.cgi?id=135400
+            <rdar://problem/17849033>
+    
+            Reviewed by David Kilzer.
+    
+            * WebKit.vcxproj/WebKit/WebKitPostBuild.cmd: Use the new
+            version-stamp.pl script to version _javascript_Core.dll.
+
 2014-07-09  Brent Fulgham  <[email protected]>
 
         [Win] Remove uses of 'bash' in build system

Modified: branches/safari-600.1-branch/Source/WebKit/WebKit.vcxproj/WebKit/WebKitPostBuild.cmd (171839 => 171840)


--- branches/safari-600.1-branch/Source/WebKit/WebKit.vcxproj/WebKit/WebKitPostBuild.cmd	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Source/WebKit/WebKit.vcxproj/WebKit/WebKitPostBuild.cmd	2014-07-31 05:49:47 UTC (rev 171840)
@@ -18,6 +18,6 @@
 mkdir "%ResourcesDirectory%" 2>NUL
 xcopy /y /d "%PROJECTDIR%\..\..\win\WebKit.resources\Info.plist" "%ResourcesDirectory%" >NUL
 
-if exist "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%"
+perl "%WEBKIT_LIBRARIES%\tools\scripts\version-stamp.pl" "%INTDIR%" "%TARGETPATH%"
 
 if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"

Modified: branches/safari-600.1-branch/Tools/ChangeLog (171839 => 171840)


--- branches/safari-600.1-branch/Tools/ChangeLog	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/Tools/ChangeLog	2014-07-31 05:49:47 UTC (rev 171840)
@@ -1,3 +1,22 @@
+2014-07-30  Lucas Forschler  <[email protected]>
+
+        Merge r171825
+
+    2014-07-29  Brent Fulgham  <[email protected]>
+    
+            [Win] Modify version numbering scheme to support 5-tuple versions
+            https://bugs.webkit.org/show_bug.cgi?id=135400
+            <rdar://problem/17849033>
+    
+            Reviewed by David Kilzer.
+    
+            Update test cases to recognize that we can only support Major
+            values from 0-65535, Minor values from 0-64, Tiny values from 0-999,
+            Micro values from 0-64, and Nano values from 0-999.
+    
+            * Scripts/webkitperl/auto-version_unittest/autoVersionTests.pl: Update
+            test expectations for physical limits.
+
 2014-07-27  Matthew Hanson  <[email protected]>
 
         Merge r171626. <rdar://problem/17730536>

Modified: branches/safari-600.1-branch/WebKitLibraries/ChangeLog (171839 => 171840)


--- branches/safari-600.1-branch/WebKitLibraries/ChangeLog	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/WebKitLibraries/ChangeLog	2014-07-31 05:49:47 UTC (rev 171840)
@@ -1,3 +1,26 @@
+2014-07-30  Lucas Forschler  <[email protected]>
+
+        Merge r171825
+
+    2014-07-29  Brent Fulgham  <[email protected]>
+    
+            [Win] Modify version numbering scheme to support 5-tuple versions
+            https://bugs.webkit.org/show_bug.cgi?id=135400
+            <rdar://problem/17849033>
+    
+            Reviewed by David Kilzer.
+    
+            Revise the auto-version.pl script so that it generates a set of packed
+            version tuples that allow us to map 5-tuple versions into something
+            that will work with Windows' 3-tuple version structure.
+    
+            * win/tools/scripts/auto-version.pl:
+            (packTwoValues): Added,
+            (splitVersion): Revised to return packed combination of minor-tiny and
+            micro-nano to be used as "MINOR" and "TINY" portion of version.
+            (splitBuildMajorVersion): Deleted.
+            * win/tools/scripts/version-stamp.pl: Added.
+
 2014-07-22 Dana Burkart <[email protected]>
     
         Merge r171305.

Modified: branches/safari-600.1-branch/WebKitLibraries/win/tools/scripts/auto-version.pl (171839 => 171840)


--- branches/safari-600.1-branch/WebKitLibraries/win/tools/scripts/auto-version.pl	2014-07-31 05:40:02 UTC (rev 171839)
+++ branches/safari-600.1-branch/WebKitLibraries/win/tools/scripts/auto-version.pl	2014-07-31 05:49:47 UTC (rev 171840)
@@ -28,6 +28,8 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
+sub splitVersion($);
+
 die "You must supply an output path as the argument.\n" if ($#ARGV < 0);
 
 my $WEBKIT_LIBRARIES = $ENV{'WEBKIT_LIBRARIES'};
@@ -68,48 +70,10 @@
 my $PROPOSED_VERSION = (defined $ENVIRONMENT_VERSION) ? $ENVIRONMENT_VERSION : $FALLBACK_VERSION;
 chomp($PROPOSED_VERSION);
 
-# Split out the three components of the dotted version number.  We pad
-# the input with trailing dots to handle the case where the input version
-# has fewer components than we expect.
-$PROPOSED_VERSION =~ m/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/ or die "Couldn't parse $PROPOSED_VERSION";
-my $BUILD_MAJOR_VERSION = $1;
-my $BUILD_MINOR_VERSION = $2;
-my $BUILD_TINY_VERSION = $3;
+my ($BUILD_MAJOR_VERSION, $BUILD_MINOR_VERSION, $BUILD_TINY_VERSION, $BUILD_VARIANT_VERSION, $ADJUSTED_PROPOSED_VERSION) = splitVersion($PROPOSED_VERSION);
 
-# The default version (with no decimals) will be matched by the regexp
-# to $BUILD_TINY_VERSION. If that happens, we need to move it to
-# $BUILD_MAJOR_VERSION.
-if (!defined $BUILD_MAJOR_VERSION && !defined $BUILD_MINOR_VERSION) {
-    $BUILD_MAJOR_VERSION = $BUILD_TINY_VERSION;
-    $BUILD_TINY_VERSION = 0;
-}
-
-# Cut the major component down to three characters by dropping any
-# extra leading digits, then adjust the major version portion of the
-# version string to match.
-$BUILD_MAJOR_VERSION =~ s/^.*(\d\d\d)$/$1/;
-
-# Have the minor and tiny components default to zero if not present.
-if (!defined $BUILD_MINOR_VERSION) {
-    $BUILD_MINOR_VERSION = 0;
-}
-if (!defined $BUILD_TINY_VERSION) {
-    $BUILD_TINY_VERSION = 0;
-}
-
-$PROPOSED_VERSION = "$BUILD_MAJOR_VERSION.$BUILD_MINOR_VERSION.$BUILD_TINY_VERSION";
-
-# Split the first component further by using the first digit for the
-# major version and the remaining two characters as the minor version.
-# The minor version is shifted down to the tiny version, with the tiny
-# version becoming the variant version.
-$BUILD_MAJOR_VERSION =~ m/^[^\d]*(\d)(\d{1,})/;
-my $MAJOR_VERSION = $1;
-my $MINOR_VERSION = $2;
-my $TINY_VERSION = $BUILD_MINOR_VERSION;
-my $VARIANT_VERSION = $BUILD_TINY_VERSION;
-
-my $VERSION_TEXT = $PROPOSED_VERSION;
+my $TINY_VERSION = $BUILD_TINY_VERSION;
+my $VERSION_TEXT = $ADJUSTED_PROPOSED_VERSION;
 my $VERSION_TEXT_SHORT = $VERSION_TEXT;
 
 my $SVN_REVISION = '';
@@ -135,10 +99,10 @@
 #define __VERSION_TEXT__ "$VERSION_TEXT"
 #define __BUILD_NUMBER__ "$VERSION_TEXT"
 #define __BUILD_NUMBER_SHORT__ "$VERSION_TEXT_SHORT"
-#define __VERSION_MAJOR__ $MAJOR_VERSION
-#define __VERSION_MINOR__ $MINOR_VERSION
-#define __VERSION_TINY__ $TINY_VERSION
-#define __VERSION_BUILD__ $VARIANT_VERSION
+#define __VERSION_MAJOR__ $BUILD_MAJOR_VERSION
+#define __VERSION_MINOR__ $BUILD_MINOR_VERSION
+#define __VERSION_TINY__ $BUILD_TINY_VERSION
+#define __VERSION_BUILD__ $BUILD_VARIANT_VERSION
 #define __BUILD_NUMBER_MAJOR__ $BUILD_MAJOR_VERSION
 #define __BUILD_NUMBER_MINOR__ $BUILD_MINOR_VERSION
 #define __BUILD_NUMBER_VARIANT__ $BUILD_TINY_VERSION
@@ -149,3 +113,61 @@
     print OUTPUT_FILE "#define __COPYRIGHT_YEAR_END_TEXT__ \"$COPYRIGHT_END_YEAR\"\n";
 }
 close(OUTPUT_FILE);
+
+sub packTwoValues($$)
+{
+    my $first = shift;
+    my $second = shift;
+
+    die "First version component ($first) is too large. Must be between 0 and 99" if ($first > 99);
+    die "Second version component ($second) is too large. Must be between 0 and 999" if ($second > 999);
+
+    return $first * 1000 + $second;
+}
+
+sub splitVersion($)
+{
+    my $PROPOSED_VERSION = shift;
+
+    $PROPOSED_VERSION =~ s/^\s+//g; # Get rid of any leading whitespace
+    $PROPOSED_VERSION =~ s/\s+$//g; # Get rid of any trailing whitespace
+
+    # Split out the components of the dotted version number.
+    my @components = split(/\./, $PROPOSED_VERSION) or die "Couldn't parse $PROPOSED_VERSION";
+    my $componentCount = scalar(@components);
+
+    my $BUILD_MAJOR_VERSION = $components[0];
+
+    # Have the minor and tiny components default to zero if not present.
+    my $BUILD_MINOR_VERSION = 0;
+    my $BUILD_TINY_VERSION = 0;
+    my $BUILD_MICRO_VERSION = 0;
+    my $BUILD_NANO_VERSION = 0;
+    if ($componentCount > 1) {
+        $BUILD_MINOR_VERSION = $components[1];
+    }
+    if ($componentCount > 2) {
+        $BUILD_TINY_VERSION = $components[2];
+    }
+    if ($componentCount > 3) {
+        $BUILD_MICRO_VERSION = $components[3];
+    }
+
+    my $RETURN_NANO_VERSION = $BUILD_MICRO_VERSION;
+    if ($componentCount > 4) {
+        $BUILD_NANO_VERSION = $components[4];
+        $RETURN_NANO_VERSION = $BUILD_NANO_VERSION;
+    }
+
+    # Cut the major component down to three characters by dropping any
+    # extra leading digits, then adjust the major version portion of the
+    # version string to match.
+    my $originalLength = length($BUILD_MAJOR_VERSION);
+    $BUILD_MAJOR_VERSION =~ s/^.*(\d\d\d)$/$1/;
+
+    my $charactersToRemove = $originalLength - length($BUILD_MAJOR_VERSION);
+
+    $PROPOSED_VERSION = substr($PROPOSED_VERSION, $charactersToRemove);
+
+    return ($BUILD_MAJOR_VERSION, packTwoValues($BUILD_MINOR_VERSION, $BUILD_TINY_VERSION), packTwoValues($BUILD_MICRO_VERSION, $BUILD_NANO_VERSION), $RETURN_NANO_VERSION, $PROPOSED_VERSION);
+}

Copied: branches/safari-600.1-branch/WebKitLibraries/win/tools/scripts/version-stamp.pl (from rev 171825, tags/Safari-600.1.2.4/WebKitLibraries/win/tools/scripts/version-stamp.pl) (0 => 171840)


--- branches/safari-600.1-branch/WebKitLibraries/win/tools/scripts/version-stamp.pl	                        (rev 0)
+++ branches/safari-600.1-branch/WebKitLibraries/win/tools/scripts/version-stamp.pl	2014-07-31 05:49:47 UTC (rev 171840)
@@ -0,0 +1,113 @@
+#!/usr/bin/perl -w
+
+use strict;
+use File::Spec;
+
+# Copyright (C) 2007, 2009, 2014 Apple Inc.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+sub exitStatus($);
+
+my $WEBKIT_LIBRARIES = $ENV{'WEBKIT_LIBRARIES'};
+
+my $VERSION_STAMPER = File::Spec->catfile($WEBKIT_LIBRARIES, 'tools', 'VersionStamper', 'VersionStamper.exe');
+
+unless (-e $VERSION_STAMPER) {
+    print "No $VERSION_STAMPER executable. Exiting.\n";
+    exit(0);
+}
+
+my ($intdir, $target);
+if (scalar(@ARGV) > 1) {
+    $intdir = $ARGV[0];
+    $target = $ARGV[1];
+} else {
+    my @arguments = split(/\s+/, $ARGV[0]) or die "Couldn't parse $ARGV[0]";
+    die "You must supply the build output directory and the target to be stamped with version information.\n" if (scalar(@arguments) < 2);
+    $intdir = $arguments[0];
+    $target = $arguments[1];
+}
+
+# Make sure we don't have any leading or trailing quote characters.
+$intdir =~ s/^\"//;
+$intdir =~ s/\"$//;
+
+$target =~ s/^\"//;
+$target =~ s/\"$//;
+
+my %components =
+(
+    '__VERSION_TEXT__' => undef,
+    '__VERSION_MAJOR__' => undef,
+    '__VERSION_MINOR__' => undef,
+    '__VERSION_TINY__' => undef,
+    '__VERSION_BUILD__' => undef,
+);
+
+my $VERSION_FILE = File::Spec->catfile(File::Spec->canonpath($intdir), 'include', 'autoversion.h');
+
+open(VERSION_INFO, '<', $VERSION_FILE) or die "Unable to open $VERSION_FILE: $!\n";
+while (my $line = <VERSION_INFO>) {
+    foreach my $componentKey (keys %components) {
+        if ($line !~ m/$componentKey/) {
+            next;
+        }
+
+        $line =~ s/#define $componentKey//;
+        $line =~ s/^\s*(.*)\s*$/$1/;
+        $line =~ s/^"(.*)"$/$1/;
+        chomp($line);
+
+        $components{$componentKey} = $line;
+    }
+}
+close(VERSION_INFO);
+
+print "Processing version $components{'__VERSION_TEXT__'} for $target\n";
+
+my $TARGET_PATH = File::Spec->canonpath($target);
+
+my $rc = system($VERSION_STAMPER, '--verbose', $TARGET_PATH, '--fileMajor', $components{'__VERSION_MAJOR__'},
+    '--fileMinor', $components{'__VERSION_MINOR__'}, '--fileRevision', $components{'__VERSION_TINY__'},
+    '--fileBuild', $components{'__VERSION_BUILD__'}, '--productMajor', $components{'__VERSION_MAJOR__'},
+    '--productMinor', $components{'__VERSION_MINOR__'}, '--productRevision', $components{'__VERSION_TINY__'},
+    '--productBuild', $components{'__VERSION_BUILD__'}); 
+
+exit(exitStatus($rc));
+
+# This method is for portability. Return the system-appropriate exit
+# status of a child process.
+#
+# Args: pass the child error status returned by the last pipe close,
+#       for example "$?".
+sub exitStatus($)
+{
+    my ($returnvalue) = @_;
+    if ($^O eq "MSWin32") {
+        return $returnvalue >> 8;
+    }
+    if (!WIFEXITED($returnvalue)) {
+        return 254;
+    }
+    return WEXITSTATUS($returnvalue);
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to