<!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  &lt;bfulgham@apple.com&gt;
+
+        [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  &lt;ossy@webkit.org&gt;
</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-&gt;catdir(programFilesPath(), &quot;MSBuild&quot;, &quot;12.0&quot;, &quot;Bin&quot;);
+    chomp($msBuildInstallDir = `cygpath &quot;$msBuildInstallDir&quot;`) 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() ? &quot;|x64&quot; : &quot;|Win32&quot;);
</del><ins>+    $configurationForVisualStudio = &quot;/p:Configuration=&quot; . $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-&gt;catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));
-    if (-e $vcBuildPath) {
</del><ins>+    my $visualStudioPath = File::Spec-&gt;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 &quot;12&quot;) {
</span><del>-            $vcBuildPath = File::Spec-&gt;catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe));
</del><ins>+            $visualStudioPath = File::Spec-&gt;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-&gt;catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe));
-        if (! -e $vcBuildPath) {
</del><ins>+        $visualStudioPath = File::Spec-&gt;catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe));
+        if (! -e $visualStudioPath) {
</ins><span class="cx">             print &quot;*************************************************************\n&quot;;
</span><del>-            print &quot;Cannot find '$vcBuildPath'\n&quot;;
</del><ins>+            print &quot;Cannot find '$visualStudioPath'\n&quot;;
</ins><span class="cx">             print &quot;Please execute the file 'vcvars32.bat' from\n&quot;;
</span><span class="cx">             print &quot;'$programFilesPath\\Microsoft Visual Studio 12.0\\VC\\bin\\'\n&quot;;
</span><span class="cx">             print &quot;to setup the necessary environment variables.\n&quot;;
</span><span class="lines">@@ -1590,6 +1601,18 @@
</span><span class="cx">     print &quot;WEBKIT_LIBRARIES is set to: &quot;, $ENV{&quot;WEBKIT_LIBRARIES&quot;}, &quot;\n&quot;;
</span><span class="cx">     # FIXME (125180): Remove the following temporary 64-bit support once official support is available.
</span><span class="cx">     print &quot;WEBKIT_64_SUPPORT is set to: &quot;, $ENV{&quot;WEBKIT_64_SUPPORT&quot;}, &quot;\n&quot; 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-&gt;catfile(msBuildInstallDir(), qw(MSBuild.exe));
+    if (! -e $vcBuildPath) {
+        print &quot;*************************************************************\n&quot;;
+        print &quot;Cannot find '$vcBuildPath'\n&quot;;
+        print &quot;Please make sure execute that the Microsoft .NET Framework SDK\n&quot;;
+        print &quot;is installed on this machine.\n&quot;;
+        print &quot;*************************************************************\n&quot;;
+        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 &quot;$project&quot;`) if isCygwin();
</span><span class="cx"> 
</span><del>-    my $action = &quot;/build&quot;;
</del><ins>+    my $action = &quot;/t:build&quot;;
</ins><span class="cx">     if ($clean) {
</span><del>-        $action = &quot;/clean&quot;;
</del><ins>+        $action = &quot;/t:clean&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    my @command = ($vcBuildPath, $project, $action, $config);
</del><ins>+    my $platform = &quot;/p:Platform=&quot; . (isWin64() ? &quot;x64&quot; : &quot;Win32&quot;);
+    my $logFile = File::Spec-&gt;catdir($baseProductDir, $configuration, &quot;BuildOutput.htm&quot;);
+    chomp($logFile = `cygpath -w &quot;$logFile&quot;`) if isCygwin();
+    my $logging = &quot;/flp:LogFile=&quot; . $logFile . &quot;;Verbosity=minimal&quot;;
+    
+    my @command = ($vcBuildPath, &quot;/verbosity:minimal&quot;, $project, $action, $config, $platform, &quot;/fl&quot;, $logging);
</ins><span class="cx"> 
</span><span class="cx">     print join(&quot; &quot;, @command), &quot;\n&quot;;
</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 &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WTF\BuildLog.htm&quot; GOTO SkipIndividualBuilds
+
</ins><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> echo COMPILING WTF...                                          &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="lines">@@ -116,16 +118,6 @@
</span><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WebKitQuartzCoreAdditions\BuildLog.htm&quot; &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> 
</span><del>-echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-echo COMPILING CoreUI...                                       &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\CoreUI\BuildLog.htm&quot;       &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-
-echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-echo COMPILING SafariTheme...                                  &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\SafariTheme\BuildLog.htm&quot;  &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-
</del><span class="cx"> :SkipInternalProjects
</span><span class="cx"> 
</span><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="lines">@@ -211,4 +203,7 @@
</span><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> echo COMPILING TestWebKitAPI...                                &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><del>-type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\TestWebKitAPI\BuildLog.htm&quot; &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</del><span class="cx">\ No newline at end of file
</span><ins>+type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\TestWebKitAPI\BuildLog.htm&quot; &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
+
+:SkipIndividualBuilds
+echo &quot;No individual build logs to address&quot;
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>