<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[181092] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/181092">181092</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-03-05 12:05:20 -0800 (Thu, 05 Mar 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Win] Switch to MSBuild so we get more useful stdout logging in buildbot
https://bugs.webkit.org/show_bug.cgi?id=140845
Reviewed by David Kilzer.
Update 'webkitdirs.pm' to locate the MSBuild used with Visual Studio 2013
and generate suitable build commands to drive a full build from our
existing solution files.
* Scripts/webkitdirs.pm:
(msBuildInstallDir): Added.
(determineConfigurationForVisualStudio): Revise to use MSBuild command
line arguments to drive the build.
(setupCygwinEnv): Warn user if MSBuild cannot be located.
(buildVisualStudioProject): Revise to use MSBuild command line arguments
to specify build architecture.
* win/AssembleBuildLogs/AssembleLogs.cmd: MSBuild doesn't produce individual
output logs, so don't attempt to consolidate them. Also: Drive-by fix: Don't
bother looking for CoreUI or SafariTheme build logs.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitdirspm">trunk/Tools/Scripts/webkitdirs.pm</a></li>
<li><a href="#trunkToolswinAssembleBuildLogsAssembleLogscmd">trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (181091 => 181092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-03-05 19:52:10 UTC (rev 181091)
+++ trunk/Tools/ChangeLog        2015-03-05 20:05:20 UTC (rev 181092)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-03-05 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Switch to MSBuild so we get more useful stdout logging in buildbot
+ https://bugs.webkit.org/show_bug.cgi?id=140845
+
+ Reviewed by David Kilzer.
+
+ Update 'webkitdirs.pm' to locate the MSBuild used with Visual Studio 2013
+ and generate suitable build commands to drive a full build from our
+ existing solution files.
+
+ * Scripts/webkitdirs.pm:
+ (msBuildInstallDir): Added.
+ (determineConfigurationForVisualStudio): Revise to use MSBuild command
+ line arguments to drive the build.
+ (setupCygwinEnv): Warn user if MSBuild cannot be located.
+ (buildVisualStudioProject): Revise to use MSBuild command line arguments
+ to specify build architecture.
+ * win/AssembleBuildLogs/AssembleLogs.cmd: MSBuild doesn't produce individual
+ output logs, so don't attempt to consolidate them. Also: Drive-by fix: Don't
+ bother looking for CoreUI or SafariTheme build logs.
+
</ins><span class="cx"> 2015-03-05 Csaba Osztrogonác <ossy@webkit.org>
</span><span class="cx">
</span><span class="cx"> [buildbot] mastercfg_unittest.py should be runnable easily
</span></span></pre></div>
<a id="trunkToolsScriptswebkitdirspm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitdirs.pm (181091 => 181092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitdirs.pm        2015-03-05 19:52:10 UTC (rev 181091)
+++ trunk/Tools/Scripts/webkitdirs.pm        2015-03-05 20:05:20 UTC (rev 181092)
</span><span class="lines">@@ -125,6 +125,7 @@
</span><span class="cx"> my $programFilesPath;
</span><span class="cx"> my $vcBuildPath;
</span><span class="cx"> my $vsInstallDir;
</span><ins>+my $msBuildInstallDir;
</ins><span class="cx"> my $vsVersion;
</span><span class="cx"> my $windowsSourceDir;
</span><span class="cx"> my $winVersion;
</span><span class="lines">@@ -515,6 +516,16 @@
</span><span class="cx"> return $vsInstallDir;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub msBuildInstallDir
+{
+ return $msBuildInstallDir if defined $msBuildInstallDir;
+
+ $msBuildInstallDir = File::Spec->catdir(programFilesPath(), "MSBuild", "12.0", "Bin");
+ chomp($msBuildInstallDir = `cygpath "$msBuildInstallDir"`) if isCygwin();
+
+ return $msBuildInstallDir;
+}
+
</ins><span class="cx"> sub visualStudioVersion
</span><span class="cx"> {
</span><span class="cx"> return $vsVersion if defined $vsVersion;
</span><span class="lines">@@ -531,7 +542,7 @@
</span><span class="cx"> return if defined $configurationForVisualStudio;
</span><span class="cx"> determineConfiguration();
</span><span class="cx"> # FIXME: We should detect when Debug_All or Production has been chosen.
</span><del>- $configurationForVisualStudio = $configuration . (isWin64() ? "|x64" : "|Win32");
</del><ins>+ $configurationForVisualStudio = "/p:Configuration=" . $configuration;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub usesPerConfigurationBuildDirectory
</span><span class="lines">@@ -1564,18 +1575,18 @@
</span><span class="cx"> return if $vcBuildPath;
</span><span class="cx">
</span><span class="cx"> my $programFilesPath = programFilesPath();
</span><del>- $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));
- if (-e $vcBuildPath) {
</del><ins>+ my $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));
+ if (-e $visualStudioPath) {
</ins><span class="cx"> # Visual Studio is installed;
</span><span class="cx"> if (visualStudioVersion() eq "12") {
</span><del>- $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe));
</del><ins>+ $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe));
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> # Visual Studio not found, try VC++ Express
</span><del>- $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe));
- if (! -e $vcBuildPath) {
</del><ins>+ $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe));
+ if (! -e $visualStudioPath) {
</ins><span class="cx"> print "*************************************************************\n";
</span><del>- print "Cannot find '$vcBuildPath'\n";
</del><ins>+ print "Cannot find '$visualStudioPath'\n";
</ins><span class="cx"> print "Please execute the file 'vcvars32.bat' from\n";
</span><span class="cx"> print "'$programFilesPath\\Microsoft Visual Studio 12.0\\VC\\bin\\'\n";
</span><span class="cx"> print "to setup the necessary environment variables.\n";
</span><span class="lines">@@ -1590,6 +1601,18 @@
</span><span class="cx"> print "WEBKIT_LIBRARIES is set to: ", $ENV{"WEBKIT_LIBRARIES"}, "\n";
</span><span class="cx"> # FIXME (125180): Remove the following temporary 64-bit support once official support is available.
</span><span class="cx"> print "WEBKIT_64_SUPPORT is set to: ", $ENV{"WEBKIT_64_SUPPORT"}, "\n" if isWin64();
</span><ins>+
+ # We will actually use MSBuild to build WebKit, but we need to find the Visual Studio install (above) to make
+ # sure we use the right options.
+ $vcBuildPath = File::Spec->catfile(msBuildInstallDir(), qw(MSBuild.exe));
+ if (! -e $vcBuildPath) {
+ print "*************************************************************\n";
+ print "Cannot find '$vcBuildPath'\n";
+ print "Please make sure execute that the Microsoft .NET Framework SDK\n";
+ print "is installed on this machine.\n";
+ print "*************************************************************\n";
+ die;
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub dieIfWindowsPlatformSDKNotInstalled
</span><span class="lines">@@ -1655,12 +1678,17 @@
</span><span class="cx">
</span><span class="cx"> chomp($project = `cygpath -w "$project"`) if isCygwin();
</span><span class="cx">
</span><del>- my $action = "/build";
</del><ins>+ my $action = "/t:build";
</ins><span class="cx"> if ($clean) {
</span><del>- $action = "/clean";
</del><ins>+ $action = "/t:clean";
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- my @command = ($vcBuildPath, $project, $action, $config);
</del><ins>+ my $platform = "/p:Platform=" . (isWin64() ? "x64" : "Win32");
+ my $logFile = File::Spec->catdir($baseProductDir, $configuration, "BuildOutput.htm");
+ chomp($logFile = `cygpath -w "$logFile"`) if isCygwin();
+ my $logging = "/flp:LogFile=" . $logFile . ";Verbosity=minimal";
+
+ my @command = ($vcBuildPath, "/verbosity:minimal", $project, $action, $config, $platform, "/fl", $logging);
</ins><span class="cx">
</span><span class="cx"> print join(" ", @command), "\n";
</span><span class="cx"> return system @command;
</span></span></pre></div>
<a id="trunkToolswinAssembleBuildLogsAssembleLogscmd"></a>
<div class="modfile"><h4>Modified: trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd (181091 => 181092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd        2015-03-05 19:52:10 UTC (rev 181091)
+++ trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd        2015-03-05 20:05:20 UTC (rev 181092)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx">
</span><span class="cx"> :SkipANGLEProjects
</span><span class="cx">
</span><ins>+if not exist "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WTF\BuildLog.htm" GOTO SkipIndividualBuilds
+
</ins><span class="cx"> echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="cx"> echo COMPILING WTF... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="cx"> echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="lines">@@ -116,16 +118,6 @@
</span><span class="cx"> echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="cx"> type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WebKitQuartzCoreAdditions\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="cx">
</span><del>-echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-echo COMPILING CoreUI... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\CoreUI\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-
-echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-echo COMPILING SafariTheme... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\SafariTheme\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
-
</del><span class="cx"> :SkipInternalProjects
</span><span class="cx">
</span><span class="cx"> echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="lines">@@ -211,4 +203,7 @@
</span><span class="cx"> echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="cx"> echo COMPILING TestWebKitAPI... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><span class="cx"> echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</span><del>-type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\TestWebKitAPI\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
</del><span class="cx">\ No newline at end of file
</span><ins>+type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\TestWebKitAPI\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+:SkipIndividualBuilds
+echo "No individual build logs to address"
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>