[Win] Fix build failure when using 5-tuple build versions.
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jul 2014 18:00:41 +0000 (18:00 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jul 2014 18:00:41 +0000 (18:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135464
<rdar://problem/17872507>

Reviewed by David Kilzer.

* win/tools/scripts/version-stamp.pl: Modify the environment for
the VersionStamper sub-process to work around bug in that tool.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171870 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitLibraries/ChangeLog
WebKitLibraries/win/tools/scripts/version-stamp.pl

index b66906c..595fccc 100644 (file)
@@ -1,3 +1,14 @@
+2014-07-31  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Fix build failure when using 5-tuple build versions.
+        https://bugs.webkit.org/show_bug.cgi?id=135464
+        <rdar://problem/17872507>
+
+        Reviewed by David Kilzer.
+
+        * win/tools/scripts/version-stamp.pl: Modify the environment for
+        the VersionStamper sub-process to work around bug in that tool.
+
 2014-07-29  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Modify version numbering scheme to support 5-tuple versions
index f1775b5..a6f1cd4 100644 (file)
@@ -87,6 +87,17 @@ print "Processing version $components{'__VERSION_TEXT__'} for $target\n";
 
 my $TARGET_PATH = File::Spec->canonpath($target);
 
+print "Adjusting RC_PROJECTSOURCEVERSION and RC_ProjectSourceVersion to be safe for VersionStamper.\n";
+
+my $SAFE_PROJECT_VERSION = "$components{'__VERSION_MAJOR__'}.$components{'__VERSION_MINOR__'}.$components{'__VERSION_TINY__'}";
+
+print "Using RC_PROJECTSOURCEVERSION=$SAFE_PROJECT_VERSION and RC_PROJECTBUILDVERSION=$components{'__VERSION_BUILD__'}\n";
+
+# Note: These environment settings only affect this script and its child processes:
+$ENV{RC_PROJECTSOURCEVERSION} = $SAFE_PROJECT_VERSION;
+$ENV{RC_ProjectSourceVersion} = $SAFE_PROJECT_VERSION;
+$ENV{RC_PROJECTBUILDVERSION} = $components{'__VERSION_BUILD__'};
+
 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__'},