<!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>[191766] 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/191766">191766</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-10-29 17:20:10 -0700 (Thu, 29 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Win] build-jsc and run-javascriptcore-tests do not work
https://bugs.webkit.org/show_bug.cgi?id=150700

Reviewed by Mark Lam.
        
Correct our build system so that it expects Windows to be using CMake,
and to build the correct sub-projects for our JSC helper scripts.

* Scripts/build-jsc: Make sure to build the testapi harness when
  building for Windows.
* Scripts/build-webkit:
  (1) Use the existing 'cmakeBasedPortName()'
  (2) Use File::Spec rather than hard-coding path delimeters.
  (3) Refer to Visual Studio 14.0, rather than the unsupported 12.0.
method rather than hard-coding the name based on conditional.
* Scripts/run-javascriptcore-tests:
(testapiPath): Use File::Spec rather than hard-coding path delimeters.
* Scripts/run-jsc: Ditto.
* Scripts/webkitdirs.pm:
(cmakeBasedPortName): Update to return the right value for the Apple
Windows port and the WinCairo port.
(isCMakeBuild): Expect CMake build for all Windows ports.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsbuildjsc">trunk/Tools/Scripts/build-jsc</a></li>
<li><a href="#trunkToolsScriptsbuildwebkit">trunk/Tools/Scripts/build-webkit</a></li>
<li><a href="#trunkToolsScriptsrunjavascriptcoretests">trunk/Tools/Scripts/run-javascriptcore-tests</a></li>
<li><a href="#trunkToolsScriptsrunjsc">trunk/Tools/Scripts/run-jsc</a></li>
<li><a href="#trunkToolsScriptswebkitdirspm">trunk/Tools/Scripts/webkitdirs.pm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (191765 => 191766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-10-30 00:03:22 UTC (rev 191765)
+++ trunk/Tools/ChangeLog        2015-10-30 00:20:10 UTC (rev 191766)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2015-10-29  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] build-jsc and run-javascriptcore-tests do not work
+        https://bugs.webkit.org/show_bug.cgi?id=150700
+
+        Reviewed by Mark Lam.
+        
+        Correct our build system so that it expects Windows to be using CMake,
+        and to build the correct sub-projects for our JSC helper scripts.
+
+        * Scripts/build-jsc: Make sure to build the testapi harness when
+          building for Windows.
+        * Scripts/build-webkit:
+          (1) Use the existing 'cmakeBasedPortName()'
+          (2) Use File::Spec rather than hard-coding path delimeters.
+          (3) Refer to Visual Studio 14.0, rather than the unsupported 12.0.
+        method rather than hard-coding the name based on conditional.
+        * Scripts/run-javascriptcore-tests:
+        (testapiPath): Use File::Spec rather than hard-coding path delimeters.
+        * Scripts/run-jsc: Ditto.
+        * Scripts/webkitdirs.pm:
+        (cmakeBasedPortName): Update to return the right value for the Apple
+        Windows port and the WinCairo port.
+        (isCMakeBuild): Expect CMake build for all Windows ports.
+
</ins><span class="cx"> 2015-10-29  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix build-jsc on Mac after r191749.
</span></span></pre></div>
<a id="trunkToolsScriptsbuildjsc"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/build-jsc (191765 => 191766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/build-jsc        2015-10-30 00:03:22 UTC (rev 191765)
+++ trunk/Tools/Scripts/build-jsc        2015-10-30 00:20:10 UTC (rev 191766)
</span><span class="lines">@@ -101,7 +101,8 @@
</span><span class="cx">     $makeArgs .= ($makeArgs ? &quot; &quot; : &quot;&quot;) . &quot;-j&quot; . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
</span><span class="cx"> 
</span><span class="cx">     # This call only returns if nothing wrong happened
</span><del>-    buildCMakeProjectOrExit(0, cmakeBasedPortName(), undef, &quot;jsc $makeArgs&quot;, (cmakeBasedPortArguments(), $cmakeArgs));
</del><ins>+    my $testapi = (isAnyWindows() ? &quot;testapi&quot; : &quot;&quot;);
+    buildCMakeProjectOrExit(0, cmakeBasedPortName(), undef, &quot;jsc $testapi $makeArgs&quot;, (cmakeBasedPortArguments(), $cmakeArgs));
</ins><span class="cx">     writeCongrats();
</span><span class="cx">     exit exitStatus(0);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsScriptsbuildwebkit"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/build-webkit (191765 => 191766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/build-webkit        2015-10-30 00:03:22 UTC (rev 191765)
+++ trunk/Tools/Scripts/build-webkit        2015-10-30 00:20:10 UTC (rev 191766)
</span><span class="lines">@@ -252,15 +252,15 @@
</span><span class="cx"> my $baseProductDir = baseProductDir();
</span><span class="cx"> if (isAppleWinWebKit() || isWinCairo()) {
</span><span class="cx">     chdirWebKit();
</span><del>-    if (exitStatus(generateBuildSystemFromCMakeProject(isWinCairo() ? &quot;WinCairo&quot; : &quot;AppleWin&quot;))) {
-        die &quot;Run \&quot;C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall.bat\&quot; before build-webkit when using ninja&quot;;
</del><ins>+    if (exitStatus(generateBuildSystemFromCMakeProject(cmakeBasedPortName()))) {
+        die &quot;Run \&quot;C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat\&quot; before build-webkit when using ninja&quot;;
</ins><span class="cx">     }
</span><span class="cx">     chdirWebKit();
</span><span class="cx">     if (canUseNinja()) {
</span><del>-        chdir &quot;WebKitBuild/&quot; . configuration();
</del><ins>+        chdir File::Spec-&gt;catdir(&quot;WebKitBuild&quot;, configuration());
</ins><span class="cx">         $result = system(&quot;ninja&quot;);
</span><span class="cx">     } else {
</span><del>-        $result = buildVisualStudioProject(&quot;WebKitBuild/&quot; . configuration() . &quot;/WebKit.sln&quot;, $clean);
</del><ins>+        $result = buildVisualStudioProject(File::Spec-&gt;catfile(&quot;WebKitBuild&quot;, configuration(), &quot;WebKit.sln&quot;), $clean);
</ins><span class="cx">     }
</span><span class="cx">     if (exitStatus($result)) {
</span><span class="cx">         my $scriptDir = relativeScriptsDir();
</span></span></pre></div>
<a id="trunkToolsScriptsrunjavascriptcoretests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-javascriptcore-tests (191765 => 191766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-javascriptcore-tests        2015-10-30 00:03:22 UTC (rev 191765)
+++ trunk/Tools/Scripts/run-javascriptcore-tests        2015-10-30 00:20:10 UTC (rev 191766)
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">     push(@buildArgs, argumentsForConfiguration());
</span><span class="cx"> 
</span><span class="cx">     print &quot;Running: build-jsc &quot; . join(&quot; &quot;, @buildArgs) . &quot;\n&quot;;
</span><del>-    my $buildResult = system &quot;perl&quot;, &quot;Tools/Scripts/build-jsc&quot;, @buildArgs;
</del><ins>+    my $buildResult = system &quot;perl&quot;, File::Spec-&gt;catfile(&quot;Tools&quot;, &quot;Scripts&quot;, &quot;build-jsc&quot;), @buildArgs;
</ins><span class="cx">     if ($buildResult) {
</span><span class="cx">         print STDERR &quot;Compiling jsc failed!\n&quot;;
</span><span class="cx">         exit exitStatus($buildResult);
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx">     my ($productDir) = @_;
</span><span class="cx">     my $jscName = &quot;testapi&quot;;
</span><span class="cx">     $jscName .= &quot;_debug&quot; if configuration() eq &quot;Debug_All&quot;;
</span><del>-    return &quot;$productDir/$jscName&quot;;
</del><ins>+    return File::Spec-&gt;catfile($productDir, $jscName);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #run api tests
</span></span></pre></div>
<a id="trunkToolsScriptsrunjsc"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-jsc (191765 => 191766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-jsc        2015-10-30 00:03:22 UTC (rev 191765)
+++ trunk/Tools/Scripts/run-jsc        2015-10-30 00:20:10 UTC (rev 191766)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> setConfiguration();
</span><span class="cx"> 
</span><del>-my $jsc = jscProductDir() . &quot;/jsc @ARGV&quot;;
</del><ins>+my $jsc = File::Spec-&gt;catfile(jscProductDir(), &quot;jsc &quot;) . &quot;@ARGV&quot;;
</ins><span class="cx"> 
</span><span class="cx"> my $dyld = jscProductDir();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitdirspm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitdirs.pm (191765 => 191766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitdirs.pm        2015-10-30 00:03:22 UTC (rev 191765)
+++ trunk/Tools/Scripts/webkitdirs.pm        2015-10-30 00:20:10 UTC (rev 191766)
</span><span class="lines">@@ -2040,6 +2040,8 @@
</span><span class="cx">     return &quot;Efl&quot; if isEfl();
</span><span class="cx">     return &quot;GTK&quot; if isGtk();
</span><span class="cx">     return &quot;Mac&quot; if isAppleMacWebKit();
</span><ins>+    return &quot;WinCairo&quot; if isWinCairo();
+    return &quot;AppleWin&quot; if isAppleWinWebKit();
</ins><span class="cx">     return &quot;&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2051,7 +2053,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub isCMakeBuild()
</span><span class="cx"> {
</span><del>-    if (isEfl() || isGtk()) {
</del><ins>+    if (isEfl() || isGtk() || isAnyWindows()) {
</ins><span class="cx">         return 1;
</span><span class="cx">     }
</span><span class="cx">     determineIsCMakeBuild();
</span></span></pre>
</div>
</div>

</body>
</html>