Changeset 51932 in webkit


Ignore:
Timestamp:
Dec 9, 2009 4:58:41 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-09 Marwan Al Jubeh <marwan.aljubeh@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@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.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitSite/ChangeLog

    r51929 r51932  
     12009-12-09  Marwan Al Jubeh  <marwan.aljubeh@gmail.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Fixes: https://bugs.webkit.org/show_bug.cgi?id=31228
     6        Set the WebKitOutputDir, WebKitLibrariesDir and Cygwin environment variables automatically
     7        in Windows as part of running update_webkit.
     8
     9        * building/build.html:
     10         - removed the reference to forgetting to set environment variables as a common source of errors
     11           on Windows. This is because this patch would make it unnecessary for the user to set these
     12           variables manually.
     13
    1142009-12-09  Chris Jerdonek  <chris.jerdonek@gmail.com>
    215
  • trunk/WebKitSite/building/build.html

    r51733 r51932  
    2828<p>By default, <tt>build-webkit</tt> places build products in <tt>WebKit/WebKitBuild</tt>.  You can specify a different build
    2929location on Mac in your Xcode preferences.  On Windows, the <tt>WEBKITOUTPUTDIR</tt> environment variable can be used to
    30 set a different build products location.  If you have set up a custom build location, then <tt>build-webkit</tt> will
     30set a different build products location. If you have set up a custom build location, then <tt>build-webkit</tt> will
    3131place the build products there.</p>
    3232
     
    3636double 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>
    3737are still there and add them again if necessary.</p>
    38 <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>
    3938<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>
    4039</div>
  • trunk/WebKitTools/ChangeLog

    r51923 r51932  
     12009-12-09  Marwan Al Jubeh  <marwan.aljubeh@gmail.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Fixes: https://bugs.webkit.org/show_bug.cgi?id=31228
     6        Set the WebKitOutputDir, WebKitLibrariesDir and Cygwin environment variables automatically
     7        in Windows as part of running update_webkit.
     8
     9        * Scripts/update-webkit:
     10         - Run setupAppleWinEnv() on Apple's Windows port.
     11        * Scripts/webkitdirs.pm:
     12         - Added functions that return the source directory, libraries directory and default build directory on Windows.
     13         - Added isWindowsNT() which tests if the current Windows version is from the Windows NT family.
     14         - Implemented setupAppleWinEnv() which sets the environment variables WebKitOutputDir, WebKitLibrariesDir
     15           and Cygwin to their desired values.
     16
    1172009-12-09  Adam Barth  <abarth@webkit.org>
    218
  • trunk/WebKitTools/Scripts/update-webkit

    r51745 r51932  
    8989}
    9090
     91setupAppleWinEnv() if isAppleWinWebKit();
     92
    9193exit 0;
    9294
  • trunk/WebKitTools/Scripts/webkitdirs.pm

    r51792 r51932  
    6868my $vcBuildPath;
    6969my $windowsTmpPath;
     70my $windowsSourceDir;
    7071
    7172sub determineSourceDir
     
    987988}
    988989
     990sub isWindowsNT()
     991{
     992    return $ENV{'OS'} eq 'Windows_NT';
     993}
     994
    989995sub relativeScriptsDir()
    990996{
     
    10521058    }
    10531059    # Win32 and other platforms may want to check for minimum config
     1060}
     1061
     1062sub determineWindowsSourceDir()
     1063{
     1064    return if $windowsSourceDir;
     1065    my $sourceDir = sourceDir();
     1066    chomp($windowsSourceDir = `cygpath -w $sourceDir`);
     1067}
     1068
     1069sub windowsSourceDir()
     1070{
     1071    determineWindowsSourceDir();
     1072    return $windowsSourceDir;
     1073}
     1074
     1075sub windowsLibrariesDir()
     1076{
     1077    return windowsSourceDir() . "\\WebKitLibraries\\win";
     1078}
     1079
     1080sub windowsOutputDir()
     1081{
     1082    return windowsSourceDir() . "\\WebKitBuild";
     1083}
     1084
     1085sub setupAppleWinEnv()
     1086{
     1087    return unless isAppleWinWebKit();
     1088
     1089    if (isWindowsNT()) {
     1090        my $restartNeeded = 0;
     1091        my %variablesToSet = ();
     1092
     1093        # Setting the environment variable 'CYGWIN' to 'tty' makes cygwin enable extra support (i.e., termios)
     1094        # for UNIX-like ttys in the Windows console
     1095        $variablesToSet{CYGWIN} = "tty" unless $ENV{CYGWIN};
     1096       
     1097        # Those environment variables must be set to be able to build inside Visual Studio.
     1098        $variablesToSet{WEBKITLIBRARIESDIR} = windowsLibrariesDir() unless $ENV{WEBKITLIBRARIESDIR};
     1099        $variablesToSet{WEBKITOUTPUTDIR} = windowsOutputDir() unless $ENV{WEBKITOUTPUTDIR};
     1100
     1101        foreach my $variable (keys %variablesToSet) {
     1102            print "Setting the Environment Variable '" . $variable . "' to '" . $variablesToSet{$variable} . "'\n\n";
     1103            system qw(regtool -s set), '\\HKEY_CURRENT_USER\\Environment\\' . $variable, $variablesToSet{$variable};
     1104            $restartNeeded ||= $variable eq "WEBKITLIBRARIESDIR" || $variable eq "WEBKITOUTPUTDIR";
     1105        }
     1106
     1107        if ($restartNeeded) {
     1108            print "Please restart your computer before attempting to build inside Visual Studio.\n\n";
     1109        }
     1110    } else {
     1111        if (!$ENV{'WEBKITLIBRARIESDIR'}) {
     1112            print "Warning: You must set the 'WebKitLibrariesDir' environment variable\n";
     1113            print "         to be able build WebKit from within Visual Studio.\n";
     1114            print "         Make sure that 'WebKitLibrariesDir' points to the\n";
     1115            print "         'WebKitLibraries/win' directory, not the 'WebKitLibraries/' directory.\n\n";
     1116        }
     1117        if (!$ENV{'WEBKITOUTPUTDIR'}) {
     1118            print "Warning: You must set the 'WebKitOutputDir' environment variable\n";
     1119            print "         to be able build WebKit from within Visual Studio.\n\n";
     1120        }
     1121    }
    10541122}
    10551123
Note: See TracChangeset for help on using the changeset viewer.