[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:30:34 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 982156f7c0e72a4f18cbe9390c467aeac53fef24
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 10 00:58:41 2009 +0000

    2009-12-09  Marwan Al Jubeh  <marwan.aljubeh at gmail.com>
    
            Reviewed by Adam Roben.
    
            Fixes: https://bugs.webkit.org/show_bug.cgi?id=31228
            Set the WebKitOutputDir, WebKitLibrariesDir and Cygwin environment variables automatically
            in Windows as part of running update_webkit.
    
            * building/build.html:
             - removed the reference to forgetting to set environment variables as a common source of errors
               on Windows. This is because this patch would make it unnecessary for the user to set these
               variables manually.
    2009-12-09  Marwan Al Jubeh  <marwan.aljubeh at gmail.com>
    
            Reviewed by Adam Roben.
    
            Fixes: https://bugs.webkit.org/show_bug.cgi?id=31228
            Set the WebKitOutputDir, WebKitLibrariesDir and Cygwin environment variables automatically
            in Windows as part of running update_webkit.
    
            * Scripts/update-webkit:
             - Run setupAppleWinEnv() on Apple's Windows port.
            * Scripts/webkitdirs.pm:
             - Added functions that return the source directory, libraries directory and default build directory on Windows.
             - Added isWindowsNT() which tests if the current Windows version is from the Windows NT family.
             - Implemented setupAppleWinEnv() which sets the environment variables WebKitOutputDir, WebKitLibrariesDir
               and Cygwin to their desired values.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51932 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitSite/ChangeLog b/WebKitSite/ChangeLog
index d7a23e3..2e07bef 100644
--- a/WebKitSite/ChangeLog
+++ b/WebKitSite/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-09  Marwan Al Jubeh  <marwan.aljubeh at gmail.com>
+
+        Reviewed by Adam Roben.
+
+        Fixes: https://bugs.webkit.org/show_bug.cgi?id=31228
+        Set the WebKitOutputDir, WebKitLibrariesDir and Cygwin environment variables automatically
+        in Windows as part of running update_webkit.
+
+        * building/build.html:
+         - removed the reference to forgetting to set environment variables as a common source of errors
+           on Windows. This is because this patch would make it unnecessary for the user to set these
+           variables manually.
+
 2009-12-09  Chris Jerdonek  <chris.jerdonek at gmail.com>
 
         Reviewed by Darin Adler.
diff --git a/WebKitSite/building/build.html b/WebKitSite/building/build.html
index 0a1a503..f06bdfd 100644
--- a/WebKitSite/building/build.html
+++ b/WebKitSite/building/build.html
@@ -27,7 +27,7 @@ debugging symbols and assertions:</p>
 
 <p>By default, <tt>build-webkit</tt> places build products in <tt>WebKit/WebKitBuild</tt>.  You can specify a different build
 location on Mac in your Xcode preferences.  On Windows, the <tt>WEBKITOUTPUTDIR</tt> environment variable can be used to
-set a different build products location.  If you have set up a custom build location, then <tt>build-webkit</tt> will
+set a different build products location. If you have set up a custom build location, then <tt>build-webkit</tt> will
 place the build products there.</p>
 
 <div class="windows-instructions">
@@ -35,7 +35,6 @@ place the build products there.</p>
 <p>A common source of build errors on Windows is Visual C++ Express forgetting the Platform SDK paths.  If you have trouble building WebKit,
 double check that the paths you set during <a href="http://msdn.microsoft.com/en-us/library/ms235626(VS.80).aspx">step 2 of the Platform SDK Installation</a>
 are still there and add them again if necessary.</p>
-<p>Another common error is forgetting to set the <tt>WEBKITOUTPUTDIR</tt> environment variable.  If you omit this step, you will get build errors when the WebKit build process begins generating code.  If you are not sure how to do this, Microsoft provides a good set of <a href="http://support.microsoft.com/kb/310519">instructions</a>.</p>
 <p>Don't forget that if you have any questions or problems building WebKit, feel free to <a href="/contact.html">get in touch!</a></p>
 </div>
 
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index e95da06..92b3239 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-09  Marwan Al Jubeh  <marwan.aljubeh at gmail.com>
+
+        Reviewed by Adam Roben.
+
+        Fixes: https://bugs.webkit.org/show_bug.cgi?id=31228
+        Set the WebKitOutputDir, WebKitLibrariesDir and Cygwin environment variables automatically
+        in Windows as part of running update_webkit.
+
+        * Scripts/update-webkit:
+         - Run setupAppleWinEnv() on Apple's Windows port.
+        * Scripts/webkitdirs.pm:
+         - Added functions that return the source directory, libraries directory and default build directory on Windows.
+         - Added isWindowsNT() which tests if the current Windows version is from the Windows NT family.
+         - Implemented setupAppleWinEnv() which sets the environment variables WebKitOutputDir, WebKitLibrariesDir
+           and Cygwin to their desired values.
+
 2009-12-09  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/update-webkit b/WebKitTools/Scripts/update-webkit
index 5b9d419..7602c41 100755
--- a/WebKitTools/Scripts/update-webkit
+++ b/WebKitTools/Scripts/update-webkit
@@ -88,6 +88,8 @@ if (-d "../Internal") {
     system("perl", "WebKitTools/Scripts/update-webkit-auxiliary-libs") == 0 or die;
 }
 
+setupAppleWinEnv() if isAppleWinWebKit();
+
 exit 0;
 
 sub runSvnUpdate()
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index ad7f6ee..64e5dc4 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -67,6 +67,7 @@ my $isChromium;
 # Variables for Win32 support
 my $vcBuildPath;
 my $windowsTmpPath;
+my $windowsSourceDir;
 
 sub determineSourceDir
 {
@@ -986,6 +987,11 @@ sub isSnowLeopard()
     return isDarwin() && osXVersion()->{"minor"} == 6;
 }
 
+sub isWindowsNT()
+{
+    return $ENV{'OS'} eq 'Windows_NT';
+}
+
 sub relativeScriptsDir()
 {
     my $scriptDir = File::Spec->catpath("", File::Spec->abs2rel(dirname($0), getcwd()), "");
@@ -1053,6 +1059,68 @@ sub checkRequiredSystemConfig
     # Win32 and other platforms may want to check for minimum config
 }
 
+sub determineWindowsSourceDir()
+{
+    return if $windowsSourceDir;
+    my $sourceDir = sourceDir();
+    chomp($windowsSourceDir = `cygpath -w $sourceDir`);
+}
+
+sub windowsSourceDir()
+{
+    determineWindowsSourceDir();
+    return $windowsSourceDir;
+}
+
+sub windowsLibrariesDir()
+{
+    return windowsSourceDir() . "\\WebKitLibraries\\win";
+}
+
+sub windowsOutputDir()
+{
+    return windowsSourceDir() . "\\WebKitBuild";
+}
+
+sub setupAppleWinEnv()
+{
+    return unless isAppleWinWebKit();
+
+    if (isWindowsNT()) {
+        my $restartNeeded = 0;
+        my %variablesToSet = ();
+
+        # Setting the environment variable 'CYGWIN' to 'tty' makes cygwin enable extra support (i.e., termios)
+        # for UNIX-like ttys in the Windows console
+        $variablesToSet{CYGWIN} = "tty" unless $ENV{CYGWIN};
+        
+        # Those environment variables must be set to be able to build inside Visual Studio.
+        $variablesToSet{WEBKITLIBRARIESDIR} = windowsLibrariesDir() unless $ENV{WEBKITLIBRARIESDIR};
+        $variablesToSet{WEBKITOUTPUTDIR} = windowsOutputDir() unless $ENV{WEBKITOUTPUTDIR};
+
+        foreach my $variable (keys %variablesToSet) {
+            print "Setting the Environment Variable '" . $variable . "' to '" . $variablesToSet{$variable} . "'\n\n";
+            system qw(regtool -s set), '\\HKEY_CURRENT_USER\\Environment\\' . $variable, $variablesToSet{$variable};
+            $restartNeeded ||= $variable eq "WEBKITLIBRARIESDIR" || $variable eq "WEBKITOUTPUTDIR";
+        }
+
+        if ($restartNeeded) {
+            print "Please restart your computer before attempting to build inside Visual Studio.\n\n";
+        }
+    } else {
+        if (!$ENV{'WEBKITLIBRARIESDIR'}) {
+            print "Warning: You must set the 'WebKitLibrariesDir' environment variable\n";
+            print "         to be able build WebKit from within Visual Studio.\n";
+            print "         Make sure that 'WebKitLibrariesDir' points to the\n";
+            print "         'WebKitLibraries/win' directory, not the 'WebKitLibraries/' directory.\n\n";
+        }
+        if (!$ENV{'WEBKITOUTPUTDIR'}) {
+            print "Warning: You must set the 'WebKitOutputDir' environment variable\n";
+            print "         to be able build WebKit from within Visual Studio.\n\n";
+        }
+    }
+}
+
 sub setupCygwinEnv()
 {
     return if !isCygwin();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list