<!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>[197946] branches/safari-601-branch/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/197946">197946</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2016-03-10 11:26:32 -0800 (Thu, 10 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>&lt;rdar://problem/25074204&gt;
Unreviewed build fix attempt.
        
* Scripts/webkitdirs.pm:
(determineBaseProductDir):
(determineConfiguration):
(determineArchitecture):
(determineNumberOfCPUs):
(jscPath):
(visualStudioInstallDir):
(msBuildInstallDir):
(visualStudioVersion):
(determineConfigurationProductDir):
(productDir):
(executableProductDir):
(jscProductDir):
(configuration):
(determineGenerateDsym):
(hasIOSDevelopmentCertificate):
(argumentsForXcode):
(XcodeOptions):
(XcodeOptionString):
(determinePassedConfiguration):
(passedConfiguration):
(checkFrameworks):
(checkForArgumentAndRemoveFromArrayRef):
(prohibitUnknownPort):
(determinePortName):
(portName):
(isEfl):
(isGtk):
(isWinCairo):
(isWin64):
(determineIsWin64):
(determineIsWin64FromArchitecture):
(isCygwin):
(isARM):
(isX86_64):
(isCrossCompilation):
(isAppleMacWebKit):
(isAppleWinWebKit):
(iOSSimulatorDevicesPath):
(createiOSSimulatorDevice):
(willUseIOSDeviceSDK):
(willUseIOSSimulatorSDK):
(isIOSWebKit):
(determineNmPath):
(nmPath):
(splitVersionString):
(determineOSXVersion):
(osXVersion):
(determineIOSVersion):
(iosVersion):
(isWindowsNT):
(debugger):
(determineDebugger):
(appendToEnvironmentVariableList):
(prependToEnvironmentVariableList):
(setUpGuardMallocIfNeeded):
(launcherName):
(checkRequiredSystemConfig):
(determineWindowsSourceDir):
(setupAppleWinEnv):
(setupCygwinEnv):
(buildXCodeProject):
(buildVisualStudioProject):
(isCachedArgumentfileOutOfDate):
(wrapperPrefixIfNeeded):
(canUseNinja):
(canUseNinjaGenerator):
(canUseEclipseNinjaGenerator):
(cmakeGeneratedBuildfile):
(generateBuildSystemFromCMakeProject):
(buildCMakeGeneratedProject):
(cleanCMakeGeneratedProject):
(buildCMakeProjectOrExit):
(cmakeBasedPortName):
(determineIsCMakeBuild):
(isCMakeBuild):
(promptUser):
(setPathForRunningWebKitApp):
(printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
(argumentsForRunAndDebugMacWebKitApp):
(setupMacWebKitEnvironment):
(setupIOSWebKitEnvironment):
(waitUntilIOSSimulatorDeviceIsInState):
(shutDownIOSSimulatorDevice):
(restartIOSSimulatorDevice):
(relaunchIOSSimulator):
(runIOSWebKitAppInSimulator):
(runIOSWebKitApp):
(execMacWebKitAppForDebugging):
(debugSafari):
(runSafari):
(runMiniBrowser):
(determineIsEfl): Deleted.
(determineIsGtk): Deleted.
(determineIsWinCairo): Deleted.
(willUseIOSDeviceSDKWhenBuilding): Deleted.
(willUseIOSSimulatorSDKWhenBuilding): Deleted.
(shouldTargetWebProcess): Deleted.
(determineShouldTargetWebProcess): Deleted.
(shouldUseXPCServiceForWebProcess): Deleted.
(determineShouldUseXPCServiceForWebProcess): Deleted.
(jhbuildWrapperPrefixIfNeeded): Deleted.
(canUseEclipse): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchToolsChangeLog">branches/safari-601-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari601branchToolsScriptswebkitdirspm">branches/safari-601-branch/Tools/Scripts/webkitdirs.pm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Tools/ChangeLog (197945 => 197946)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Tools/ChangeLog        2016-03-10 18:39:46 UTC (rev 197945)
+++ branches/safari-601-branch/Tools/ChangeLog        2016-03-10 19:26:32 UTC (rev 197946)
</span><span class="lines">@@ -1,3 +1,112 @@
</span><ins>+2016-03-10  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
+        &lt;rdar://problem/25074204&gt;
+        Unreviewed build fix attempt.
+        
+        * Scripts/webkitdirs.pm:
+        (determineBaseProductDir):
+        (determineConfiguration):
+        (determineArchitecture):
+        (determineNumberOfCPUs):
+        (jscPath):
+        (visualStudioInstallDir):
+        (msBuildInstallDir):
+        (visualStudioVersion):
+        (determineConfigurationProductDir):
+        (productDir):
+        (executableProductDir):
+        (jscProductDir):
+        (configuration):
+        (determineGenerateDsym):
+        (hasIOSDevelopmentCertificate):
+        (argumentsForXcode):
+        (XcodeOptions):
+        (XcodeOptionString):
+        (determinePassedConfiguration):
+        (passedConfiguration):
+        (checkFrameworks):
+        (checkForArgumentAndRemoveFromArrayRef):
+        (prohibitUnknownPort):
+        (determinePortName):
+        (portName):
+        (isEfl):
+        (isGtk):
+        (isWinCairo):
+        (isWin64):
+        (determineIsWin64):
+        (determineIsWin64FromArchitecture):
+        (isCygwin):
+        (isARM):
+        (isX86_64):
+        (isCrossCompilation):
+        (isAppleMacWebKit):
+        (isAppleWinWebKit):
+        (iOSSimulatorDevicesPath):
+        (createiOSSimulatorDevice):
+        (willUseIOSDeviceSDK):
+        (willUseIOSSimulatorSDK):
+        (isIOSWebKit):
+        (determineNmPath):
+        (nmPath):
+        (splitVersionString):
+        (determineOSXVersion):
+        (osXVersion):
+        (determineIOSVersion):
+        (iosVersion):
+        (isWindowsNT):
+        (debugger):
+        (determineDebugger):
+        (appendToEnvironmentVariableList):
+        (prependToEnvironmentVariableList):
+        (setUpGuardMallocIfNeeded):
+        (launcherName):
+        (checkRequiredSystemConfig):
+        (determineWindowsSourceDir):
+        (setupAppleWinEnv):
+        (setupCygwinEnv):
+        (buildXCodeProject):
+        (buildVisualStudioProject):
+        (isCachedArgumentfileOutOfDate):
+        (wrapperPrefixIfNeeded):
+        (canUseNinja):
+        (canUseNinjaGenerator):
+        (canUseEclipseNinjaGenerator):
+        (cmakeGeneratedBuildfile):
+        (generateBuildSystemFromCMakeProject):
+        (buildCMakeGeneratedProject):
+        (cleanCMakeGeneratedProject):
+        (buildCMakeProjectOrExit):
+        (cmakeBasedPortName):
+        (determineIsCMakeBuild):
+        (isCMakeBuild):
+        (promptUser):
+        (setPathForRunningWebKitApp):
+        (printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
+        (argumentsForRunAndDebugMacWebKitApp):
+        (setupMacWebKitEnvironment):
+        (setupIOSWebKitEnvironment):
+        (waitUntilIOSSimulatorDeviceIsInState):
+        (shutDownIOSSimulatorDevice):
+        (restartIOSSimulatorDevice):
+        (relaunchIOSSimulator):
+        (runIOSWebKitAppInSimulator):
+        (runIOSWebKitApp):
+        (execMacWebKitAppForDebugging):
+        (debugSafari):
+        (runSafari):
+        (runMiniBrowser):
+        (determineIsEfl): Deleted.
+        (determineIsGtk): Deleted.
+        (determineIsWinCairo): Deleted.
+        (willUseIOSDeviceSDKWhenBuilding): Deleted.
+        (willUseIOSSimulatorSDKWhenBuilding): Deleted.
+        (shouldTargetWebProcess): Deleted.
+        (determineShouldTargetWebProcess): Deleted.
+        (shouldUseXPCServiceForWebProcess): Deleted.
+        (determineShouldUseXPCServiceForWebProcess): Deleted.
+        (jhbuildWrapperPrefixIfNeeded): Deleted.
+        (canUseEclipse): Deleted.
+
</ins><span class="cx"> 2016-03-03  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r188607. rdar://problem/24937998
</span></span></pre></div>
<a id="branchessafari601branchToolsScriptswebkitdirspm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Tools/Scripts/webkitdirs.pm (197945 => 197946)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Tools/Scripts/webkitdirs.pm        2016-03-10 18:39:46 UTC (rev 197945)
+++ branches/safari-601-branch/Tools/Scripts/webkitdirs.pm        2016-03-10 19:26:32 UTC (rev 197946)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-# Copyright (C) 2005-2007, 2010-2014 Apple Inc. All rights reserved.
</del><ins>+# Copyright (C) 2005-2007, 2010-2016 Apple Inc. All rights reserved.
</ins><span class="cx"> # Copyright (C) 2009 Google Inc. All rights reserved.
</span><span class="cx"> # Copyright (C) 2011 Research In Motion Limited. All rights reserved.
</span><span class="cx"> # Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
</span><span class="lines">@@ -58,39 +58,62 @@
</span><span class="cx">        &amp;XcodeOptions
</span><span class="cx">        &amp;XcodeStaticAnalyzerOption
</span><span class="cx">        &amp;appDisplayNameFromBundle
</span><ins>+       &amp;appendToEnvironmentVariableList
</ins><span class="cx">        &amp;baseProductDir
</span><span class="cx">        &amp;chdirWebKit
</span><span class="cx">        &amp;checkFrameworks
</span><span class="cx">        &amp;cmakeBasedPortArguments
</span><del>-       &amp;cmakeBasedPortName
</del><span class="cx">        &amp;currentSVNRevision
</span><span class="cx">        &amp;debugSafari
</span><ins>+       &amp;executableProductDir
</ins><span class="cx">        &amp;findOrCreateSimulatorForIOSDevice
</span><span class="cx">        &amp;iosSimulatorDeviceByName
</span><span class="cx">        &amp;nmPath
</span><span class="cx">        &amp;passedConfiguration
</span><ins>+       &amp;prependToEnvironmentVariableList
</ins><span class="cx">        &amp;printHelpAndExitForRunAndDebugWebKitAppIfNeeded
</span><span class="cx">        &amp;productDir
</span><span class="cx">        &amp;quitIOSSimulator
</span><span class="cx">        &amp;relaunchIOSSimulator
</span><ins>+       &amp;restartIOSSimulatorDevice
</ins><span class="cx">        &amp;runIOSWebKitApp
</span><span class="cx">        &amp;runMacWebKitApp
</span><span class="cx">        &amp;safariPath
</span><ins>+       &amp;iosVersion
</ins><span class="cx">        &amp;setConfiguration
</span><span class="cx">        &amp;setupMacWebKitEnvironment
</span><span class="cx">        &amp;sharedCommandLineOptions
</span><span class="cx">        &amp;sharedCommandLineOptionsUsage
</span><ins>+       &amp;shutDownIOSSimulatorDevice
+       &amp;willUseIOSDeviceSDK
+       &amp;willUseIOSSimulatorSDK
+       SIMULATOR_DEVICE_SUFFIX_FOR_WEBKIT_DEVELOPMENT
</ins><span class="cx">        USE_OPEN_COMMAND
</span><span class="cx">    );
</span><span class="cx">    %EXPORT_TAGS = ( );
</span><span class="cx">    @EXPORT_OK   = ();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+# Ports
+use constant {
+    AppleWin =&gt; &quot;AppleWin&quot;,
+    GTK      =&gt; &quot;GTK&quot;,
+    Efl      =&gt; &quot;Efl&quot;,
+    iOS      =&gt; &quot;iOS&quot;,
+    Mac      =&gt; &quot;Mac&quot;,
+    WinCairo =&gt; &quot;WinCairo&quot;,
+    Unknown  =&gt; &quot;Unknown&quot;
+};
+
</ins><span class="cx"> use constant USE_OPEN_COMMAND =&gt; 1; # Used in runMacWebKitApp().
</span><span class="cx"> use constant INCLUDE_OPTIONS_FOR_DEBUGGING =&gt; 1;
</span><span class="cx"> use constant SIMULATOR_DEVICE_STATE_SHUTDOWN =&gt; &quot;1&quot;;
</span><span class="cx"> use constant SIMULATOR_DEVICE_STATE_BOOTED =&gt; &quot;3&quot;;
</span><ins>+use constant SIMULATOR_DEVICE_SUFFIX_FOR_WEBKIT_DEVELOPMENT  =&gt; &quot;For WebKit Development&quot;;
</ins><span class="cx"> 
</span><ins>+# See table &quot;Certificate types and names&quot; on &lt;https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW41&gt;.
+use constant IOS_DEVELOPMENT_CERTIFICATE_NAME_PREFIX =&gt; &quot;iPhone Developer: &quot;;
+
</ins><span class="cx"> our @EXPORT_OK;
</span><span class="cx"> 
</span><span class="cx"> my $architecture;
</span><span class="lines">@@ -109,17 +132,18 @@
</span><span class="cx"> my $didLoadIPhoneSimulatorNotification;
</span><span class="cx"> my $nmPath;
</span><span class="cx"> my $osXVersion;
</span><ins>+my $iosVersion;
</ins><span class="cx"> my $generateDsym;
</span><del>-my $isGtk;
-my $isWinCairo;
</del><ins>+my $isCMakeBuild;
</ins><span class="cx"> my $isWin64;
</span><del>-my $isEfl;
</del><span class="cx"> my $isInspectorFrontend;
</span><del>-my $shouldTargetWebProcess;
-my $shouldUseXPCServiceForWebProcess;
</del><ins>+my $portName;
</ins><span class="cx"> my $shouldUseGuardMalloc;
</span><ins>+my $shouldNotUseNinja;
</ins><span class="cx"> my $xcodeVersion;
</span><span class="cx"> 
</span><ins>+my $unknownPortProhibited = 0;
+
</ins><span class="cx"> # Variables for Win32 support
</span><span class="cx"> my $programFilesPath;
</span><span class="cx"> my $vcBuildPath;
</span><span class="lines">@@ -243,7 +267,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!defined($baseProductDir)) { # Port-specific checks failed, use default
</span><del>-        $baseProductDir = &quot;$sourceDir/WebKitBuild&quot;;
</del><ins>+        $baseProductDir = File::Spec-&gt;catdir($sourceDir, &quot;WebKitBuild&quot;);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (isGit() &amp;&amp; isGitBranchBuild()) {
</span><span class="lines">@@ -267,7 +291,7 @@
</span><span class="cx">         $ENV{&quot;WEBKIT_OUTPUTDIR&quot;} = $dosBuildPath;
</span><span class="cx">         my $unixBuildPath = `cygpath --unix \&quot;$baseProductDir\&quot;`;
</span><span class="cx">         chomp $unixBuildPath;
</span><del>-        $baseProductDir = $unixBuildPath;
</del><ins>+        $baseProductDir = $dosBuildPath;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -292,12 +316,6 @@
</span><span class="cx">     } else {
</span><span class="cx">         $configuration = &quot;Release&quot;;
</span><span class="cx">     }
</span><del>-
-    if ($configuration &amp;&amp; isWinCairo()) {
-        unless ($configuration =~ /_WinCairo$/) {
-            $configuration .= &quot;_WinCairo&quot;;
-        }
-    }
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub determineArchitecture
</span><span class="lines">@@ -324,29 +342,36 @@
</span><span class="cx">             } elsif ($xcodeSDK =~ /^iphonesimulator/) {
</span><span class="cx">                 $architecture = 'x86_64';
</span><span class="cx">             } elsif ($xcodeSDK =~ /^iphoneos/) {
</span><del>-                $architecture = 'armv7';
</del><ins>+                $architecture = 'arm64';
</ins><span class="cx">             }
</span><span class="cx">         }
</span><del>-    } elsif (isEfl() || isGtk()) {
</del><ins>+    } elsif (isCMakeBuild()) {
</ins><span class="cx">         my $host_processor = &quot;&quot;;
</span><del>-        $host_processor = `cmake --system-information | grep CMAKE_SYSTEM_PROCESSOR`;
-        if ($host_processor =~ m/^CMAKE_SYSTEM_PROCESSOR \&quot;([^&quot;]+)\&quot;/) {
-            # We have a configured build tree; use it.
-            $architecture = $1;
-            $architecture = 'x86_64' if $architecture eq 'amd64';
</del><ins>+        if (open my $cmake_sysinfo, &quot;cmake --system-information |&quot;) {
+            while (&lt;$cmake_sysinfo&gt;) {
+                next unless index($_, 'CMAKE_SYSTEM_PROCESSOR') == 0;
+                if (/^CMAKE_SYSTEM_PROCESSOR \&quot;([^&quot;]+)\&quot;/) {
+                    $architecture = $1;
+                    $architecture = 'x86_64' if $architecture eq 'amd64';
+                    last;
+                }
+            }
+            close $cmake_sysinfo;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!$architecture &amp;&amp; (isGtk() || isAppleMacWebKit() || isEfl())) {
-        # Fall back to output of `arch', if it is present.
-        $architecture = `arch`;
-        chomp $architecture;
-    }
</del><ins>+    if (!isAnyWindows()) {
+        if (!$architecture) {
+            # Fall back to output of `arch', if it is present.
+            $architecture = `arch`;
+            chomp $architecture;
+        }
</ins><span class="cx"> 
</span><del>-    if (!$architecture &amp;&amp; (isGtk() || isAppleMacWebKit() || isEfl())) {
-        # Fall back to output of `uname -m', if it is present.
-        $architecture = `uname -m`;
-        chomp $architecture;
</del><ins>+        if (!$architecture) {
+            # Fall back to output of `uname -m', if it is present.
+            $architecture = `uname -m`;
+            chomp $architecture;
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     $architecture = 'x86_64' if ($architecture =~ /amd64/ &amp;&amp; isBSD());
</span><span class="lines">@@ -380,7 +405,7 @@
</span><span class="cx">         if ($numberOfCPUs eq &quot;&quot;) {
</span><span class="cx">             $numberOfCPUs = (grep /processor/, `cat /proc/cpuinfo`);
</span><span class="cx">         }
</span><del>-    } elsif (isWindows() || isCygwin()) {
</del><ins>+    } elsif (isAnyWindows()) {
</ins><span class="cx">         # Assumes cygwin
</span><span class="cx">         $numberOfCPUs = `ls /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor | wc -w`;
</span><span class="cx">     } elsif (isDarwin() || isBSD()) {
</span><span class="lines">@@ -401,7 +426,7 @@
</span><span class="cx">     my ($productDir) = @_;
</span><span class="cx">     my $jscName = &quot;jsc&quot;;
</span><span class="cx">     $jscName .= &quot;_debug&quot;  if configuration() eq &quot;Debug_All&quot;;
</span><del>-    $jscName .= &quot;.exe&quot; if (isWindows() || isCygwin());
</del><ins>+    $jscName .= &quot;.exe&quot; if (isAnyWindows());
</ins><span class="cx">     return &quot;$productDir/$jscName&quot; if -e &quot;$productDir/$jscName&quot;;
</span><span class="cx">     return &quot;$productDir/JavaScriptCore.framework/Resources/$jscName&quot;;
</span><span class="cx"> }
</span><span class="lines">@@ -508,10 +533,11 @@
</span><span class="cx">         $vsInstallDir = $ENV{'VSINSTALLDIR'};
</span><span class="cx">         $vsInstallDir =~ s|[\\/]$||;
</span><span class="cx">     } else {
</span><del>-        $vsInstallDir = File::Spec-&gt;catdir(programFilesPath(), &quot;Microsoft Visual Studio 12.0&quot;);
</del><ins>+        $vsInstallDir = File::Spec-&gt;catdir(programFilesPath(), &quot;Microsoft Visual Studio 14.0&quot;);
</ins><span class="cx">     }
</span><span class="cx">     chomp($vsInstallDir = `cygpath &quot;$vsInstallDir&quot;`) if isCygwin();
</span><span class="cx"> 
</span><ins>+    print &quot;Using Visual Studio: $vsInstallDir\n&quot;;
</ins><span class="cx">     return $vsInstallDir;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -519,9 +545,11 @@
</span><span class="cx"> {
</span><span class="cx">     return $msBuildInstallDir if defined $msBuildInstallDir;
</span><span class="cx"> 
</span><del>-    $msBuildInstallDir = File::Spec-&gt;catdir(programFilesPath(), &quot;MSBuild&quot;, &quot;12.0&quot;, &quot;Bin&quot;);
</del><ins>+    $msBuildInstallDir = File::Spec-&gt;catdir(programFilesPath(), &quot;MSBuild&quot;, &quot;14.0&quot;, &quot;Bin&quot;);
+   
</ins><span class="cx">     chomp($msBuildInstallDir = `cygpath &quot;$msBuildInstallDir&quot;`) if isCygwin();
</span><span class="cx"> 
</span><ins>+    print &quot;Using MSBuild: $msBuildInstallDir\n&quot;;
</ins><span class="cx">     return $msBuildInstallDir;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -531,8 +559,9 @@
</span><span class="cx"> 
</span><span class="cx">     my $installDir = visualStudioInstallDir();
</span><span class="cx"> 
</span><del>-    $vsVersion = ($installDir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) ? $1 : &quot;12&quot;;
</del><ins>+    $vsVersion = ($installDir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) ? $1 : &quot;14&quot;;
</ins><span class="cx"> 
</span><ins>+    print &quot;Using Visual Studio $vsVersion\n&quot;;
</ins><span class="cx">     return $vsVersion;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -559,8 +588,7 @@
</span><span class="cx">     determineBaseProductDir();
</span><span class="cx">     determineConfiguration();
</span><span class="cx">     if (isAppleWinWebKit() || isWinCairo()) {
</span><del>-        my $binDir = isWin64() ? &quot;bin64&quot; : &quot;bin32&quot;;
-        $configurationProductDir = File::Spec-&gt;catdir($baseProductDir, $configuration, $binDir);
</del><ins>+        $configurationProductDir = File::Spec-&gt;catdir($baseProductDir, $configuration);
</ins><span class="cx">     } else {
</span><span class="cx">         if (usesPerConfigurationBuildDirectory()) {
</span><span class="cx">             $configurationProductDir = &quot;$baseProductDir&quot;;
</span><span class="lines">@@ -611,14 +639,27 @@
</span><span class="cx">     return $configurationProductDir;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub jscProductDir
</del><ins>+sub executableProductDir
</ins><span class="cx"> {
</span><del>-    my $productDir = productDir();
-    $productDir .= &quot;/bin&quot; if (isEfl() || isGtk());
</del><ins>+    my $productDirectory = productDir();
</ins><span class="cx"> 
</span><del>-    return $productDir;
</del><ins>+    my $binaryDirectory;
+    if (isEfl() || isGtk()) {
+        $binaryDirectory = &quot;bin&quot;;
+    } elsif (isAnyWindows()) {
+        $binaryDirectory = isWin64() ? &quot;bin64&quot; : &quot;bin32&quot;;
+    } else {
+        return $productDirectory;
+    }
+
+    return File::Spec-&gt;catdir($productDirectory, $binaryDirectory);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub jscProductDir
+{
+    return executableProductDir();
+}
+
</ins><span class="cx"> sub configuration()
</span><span class="cx"> {
</span><span class="cx">     determineConfiguration();
</span><span class="lines">@@ -655,6 +696,11 @@
</span><span class="cx">     $generateDsym = checkForArgumentAndRemoveFromARGV(&quot;--dsym&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub hasIOSDevelopmentCertificate()
+{
+    return !exitStatus(system(&quot;security find-identity -p codesigning | grep '&quot; . IOS_DEVELOPMENT_CERTIFICATE_NAME_PREFIX . &quot;' &gt; /dev/null 2&gt;&amp;1&quot;));
+}
+
</ins><span class="cx"> sub argumentsForXcode()
</span><span class="cx"> {
</span><span class="cx">     my @args = ();
</span><span class="lines">@@ -670,11 +716,25 @@
</span><span class="cx">     determineASanIsEnabled();
</span><span class="cx">     determineXcodeSDK();
</span><span class="cx"> 
</span><del>-    my @sdkOption = ($xcodeSDK ? &quot;SDKROOT=$xcodeSDK&quot; : ());
-    my @architectureOption = ($architecture ? &quot;ARCHS=$architecture&quot; : ());
-    my @asanOption = ($asanIsEnabled ? (&quot;-xcconfig&quot;, sourceDir() . &quot;/Tools/asan/asan.xcconfig&quot;, &quot;ASAN_IGNORE=&quot; . sourceDir() . &quot;/Tools/asan/webkit-asan-ignore.txt&quot;) : ());
-
-    return (&quot;-UseSanitizedBuildSystemEnvironment=YES&quot;, @baseProductDirOption, &quot;-configuration&quot;, $configuration, @architectureOption, @sdkOption, @asanOption, argumentsForXcode());
</del><ins>+    my @options;
+    push @options, &quot;-UseSanitizedBuildSystemEnvironment=YES&quot;;
+    push @options, (&quot;-configuration&quot;, $configuration);
+    push @options, (&quot;-xcconfig&quot;, sourceDir() . &quot;/Tools/asan/asan.xcconfig&quot;, &quot;ASAN_IGNORE=&quot; . sourceDir() . &quot;/Tools/asan/webkit-asan-ignore.txt&quot;) if $asanIsEnabled;
+    push @options, @baseProductDirOption;
+    push @options, &quot;ARCHS=$architecture&quot; if $architecture;
+    push @options, &quot;SDKROOT=$xcodeSDK&quot; if $xcodeSDK;
+    if (willUseIOSDeviceSDK()) {
+        push @options, &quot;ENABLE_BITCODE=NO&quot;;
+        if (hasIOSDevelopmentCertificate()) {
+            # FIXME: May match more than one installed development certificate.
+            push @options, &quot;CODE_SIGN_IDENTITY=&quot; . IOS_DEVELOPMENT_CERTIFICATE_NAME_PREFIX;
+        } else {
+            push @options, &quot;CODE_SIGN_IDENTITY=&quot;; # No identity
+            push @options, &quot;CODE_SIGNING_REQUIRED=NO&quot;;
+        }
+    }
+    push @options, argumentsForXcode();
+    return @options;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub XcodeOptionString
</span><span class="lines">@@ -715,8 +775,6 @@
</span><span class="cx">     } elsif (checkForArgumentAndRemoveFromARGV(&quot;--profile&quot;) || checkForArgumentAndRemoveFromARGV(&quot;--profiling&quot;)) {
</span><span class="cx">         $passedConfiguration = &quot;Profiling&quot;;
</span><span class="cx">     }
</span><del>-
-    $passedConfiguration .= &quot;_WinCairo&quot; if (defined($passedConfiguration) &amp;&amp; isWinCairo());
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub passedConfiguration
</span><span class="lines">@@ -880,7 +938,7 @@
</span><span class="cx"> # Check to see that all the frameworks are built.
</span><span class="cx"> sub checkFrameworks # FIXME: This is a poor name since only the Mac calls built WebCore a Framework.
</span><span class="cx"> {
</span><del>-    return if isCygwin() || isWindows();
</del><ins>+    return if isAnyWindows();
</ins><span class="cx">     my @frameworks = (&quot;JavaScriptCore&quot;, &quot;WebCore&quot;);
</span><span class="cx">     push(@frameworks, &quot;WebKit&quot;) if isAppleMacWebKit(); # FIXME: This seems wrong, all ports should have a WebKit these days.
</span><span class="cx">     for my $framework (@frameworks) {
</span><span class="lines">@@ -975,28 +1033,73 @@
</span><span class="cx">     return scalar @indicesToRemove &gt; 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub determineIsEfl()
</del><ins>+sub prohibitUnknownPort()
</ins><span class="cx"> {
</span><del>-    return if defined($isEfl);
-    $isEfl = checkForArgumentAndRemoveFromARGV(&quot;--efl&quot;);
</del><ins>+    $unknownPortProhibited = 1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub isEfl()
</del><ins>+sub determinePortName()
</ins><span class="cx"> {
</span><del>-    determineIsEfl();
-    return $isEfl;
</del><ins>+    return if defined $portName;
+
+    my %argToPortName = (
+        efl =&gt; Efl,
+        gtk =&gt; GTK,
+        wincairo =&gt; WinCairo
+    );
+
+    for my $arg (sort keys %argToPortName) {
+        if (checkForArgumentAndRemoveFromARGV(&quot;--$arg&quot;)) {
+            die &quot;Argument '--$arg' conflicts with selected port '$portName'\n&quot;
+                if defined $portName;
+
+            $portName = $argToPortName{$arg};
+        }
+    }
+
+    return if defined $portName;
+
+    # Port was not selected via command line, use appropriate default value
+
+    if (isAnyWindows()) {
+        $portName = AppleWin;
+    } elsif (isDarwin()) {
+        determineXcodeSDK();
+        if (willUseIOSDeviceSDK() || willUseIOSSimulatorSDK()) {
+            $portName = iOS;
+        } else {
+            $portName = Mac;
+        }
+    } else {
+        if ($unknownPortProhibited) {
+            my $portsChoice = join &quot;\n\t&quot;, qw(
+                --efl
+                --gtk
+            );
+            die &quot;Please specify which WebKit port to build using one of the following options:&quot;
+                . &quot;\n\t$portsChoice\n&quot;;
+        }
+
+        # If script is run without arguments we cannot determine port
+        # TODO: This state should be outlawed
+        $portName = Unknown;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub determineIsGtk()
</del><ins>+sub portName()
</ins><span class="cx"> {
</span><del>-    return if defined($isGtk);
-    $isGtk = checkForArgumentAndRemoveFromARGV(&quot;--gtk&quot;);
</del><ins>+    determinePortName();
+    return $portName;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub isEfl()
+{
+    return portName() eq Efl;
+}
+
</ins><span class="cx"> sub isGtk()
</span><span class="cx"> {
</span><del>-    determineIsGtk();
-    return $isGtk;
</del><ins>+    return portName() eq GTK;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # Determine if this is debian, ubuntu, linspire, or something similar.
</span><span class="lines">@@ -1012,16 +1115,9 @@
</span><span class="cx"> 
</span><span class="cx"> sub isWinCairo()
</span><span class="cx"> {
</span><del>-    determineIsWinCairo();
-    return $isWinCairo;
</del><ins>+    return portName() eq WinCairo;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub determineIsWinCairo()
-{
-    return if defined($isWinCairo);
-    $isWinCairo = checkForArgumentAndRemoveFromARGV(&quot;--wincairo&quot;);
-}
-
</del><span class="cx"> sub isWin64()
</span><span class="cx"> {
</span><span class="cx">     determineIsWin64();
</span><span class="lines">@@ -1034,6 +1130,13 @@
</span><span class="cx">     $isWin64 = checkForArgumentAndRemoveFromARGV(&quot;--64-bit&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub determineIsWin64FromArchitecture($)
+{
+    my $arch = shift;
+    $isWin64 = ($arch eq &quot;x86_64&quot;);
+    return $isWin64;
+}
+
</ins><span class="cx"> sub isCygwin()
</span><span class="cx"> {
</span><span class="cx">     return ($^O eq &quot;cygwin&quot;) || 0;
</span><span class="lines">@@ -1109,6 +1212,11 @@
</span><span class="cx">     return ($Config{archname} =~ /^arm[v\-]/) || ($Config{archname} =~ /^aarch64[v\-]/);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub isX86_64()
+{
+    return (architecture() eq &quot;x86_64&quot;) || 0;
+}
+
</ins><span class="cx"> sub isCrossCompilation()
</span><span class="cx"> {
</span><span class="cx">   my $compiler = &quot;&quot;;
</span><span class="lines">@@ -1130,12 +1238,12 @@
</span><span class="cx"> 
</span><span class="cx"> sub isAppleMacWebKit()
</span><span class="cx"> {
</span><del>-    return isDarwin() &amp;&amp; !isGtk();
</del><ins>+    return (portName() eq Mac) || isIOSWebKit();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub isAppleWinWebKit()
</span><span class="cx"> {
</span><del>-    return (isCygwin() || isWindows()) &amp;&amp; !isWinCairo() &amp;&amp; !isGtk();
</del><ins>+    return portName() eq AppleWin;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub iOSSimulatorDevicesPath
</span><span class="lines">@@ -1186,20 +1294,19 @@
</span><span class="cx">     die &quot;Device $name $deviceTypeId $runtimeId wasn't found in &quot; . iOSSimulatorDevicesPath();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub willUseIOSDeviceSDKWhenBuilding()
</del><ins>+sub willUseIOSDeviceSDK()
</ins><span class="cx"> {
</span><span class="cx">     return xcodeSDKPlatformName() eq &quot;iphoneos&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub willUseIOSSimulatorSDKWhenBuilding()
</del><ins>+sub willUseIOSSimulatorSDK()
</ins><span class="cx"> {
</span><span class="cx">     return xcodeSDKPlatformName() eq &quot;iphonesimulator&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub isIOSWebKit()
</span><span class="cx"> {
</span><del>-    determineXcodeSDK();
-    return isAppleMacWebKit() &amp;&amp; (willUseIOSDeviceSDKWhenBuilding() || willUseIOSSimulatorSDKWhenBuilding());
</del><ins>+    return portName() eq iOS;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub determineNmPath()
</span><span class="lines">@@ -1219,6 +1326,18 @@
</span><span class="cx">     return $nmPath;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub splitVersionString
+{
+    my $versionString = shift;
+    my @splitVersion = split(/\./, $versionString);
+    @splitVersion &gt;= 2 or die &quot;Invalid version $versionString&quot;;
+    $osXVersion = {
+            &quot;major&quot; =&gt; $splitVersion[0],
+            &quot;minor&quot; =&gt; $splitVersion[1],
+            &quot;subminor&quot; =&gt; (defined($splitVersion[2]) ? $splitVersion[2] : 0),
+    };
+}
+
</ins><span class="cx"> sub determineOSXVersion()
</span><span class="cx"> {
</span><span class="cx">     return if $osXVersion;
</span><span class="lines">@@ -1228,14 +1347,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    my $version = `sw_vers -productVersion`;
-    my @splitVersion = split(/\./, $version);
-    @splitVersion &gt;= 2 or die &quot;Invalid version $version&quot;;
-    $osXVersion = {
-            &quot;major&quot; =&gt; $splitVersion[0],
-            &quot;minor&quot; =&gt; $splitVersion[1],
-            &quot;subminor&quot; =&gt; (defined($splitVersion[2]) ? $splitVersion[2] : 0),
-    };
</del><ins>+    my $versionString = `sw_vers -productVersion`;
+    $osXVersion = splitVersionString($versionString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub osXVersion()
</span><span class="lines">@@ -1244,33 +1357,28 @@
</span><span class="cx">     return $osXVersion;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub isWindowsNT()
</del><ins>+sub determineIOSVersion()
</ins><span class="cx"> {
</span><del>-    return $ENV{'OS'} eq 'Windows_NT';
-}
</del><ins>+    return if $iosVersion;
</ins><span class="cx"> 
</span><del>-sub shouldTargetWebProcess
-{
-    determineShouldTargetWebProcess();
-    return $shouldTargetWebProcess;
-}
</del><ins>+    if (!isIOSWebKit()) {
+        $iosVersion = -1;
+        return;
+    }
</ins><span class="cx"> 
</span><del>-sub determineShouldTargetWebProcess
-{
-    return if defined($shouldTargetWebProcess);
-    $shouldTargetWebProcess = checkForArgumentAndRemoveFromARGV(&quot;--target-web-process&quot;);
</del><ins>+    my $versionString = xcodeSDKVersion();
+    $iosVersion = splitVersionString($versionString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub shouldUseXPCServiceForWebProcess
</del><ins>+sub iosVersion()
</ins><span class="cx"> {
</span><del>-    determineShouldUseXPCServiceForWebProcess();
-    return $shouldUseXPCServiceForWebProcess;
</del><ins>+    determineIOSVersion();
+    return $iosVersion;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub determineShouldUseXPCServiceForWebProcess
</del><ins>+sub isWindowsNT()
</ins><span class="cx"> {
</span><del>-    return if defined($shouldUseXPCServiceForWebProcess);
-    $shouldUseXPCServiceForWebProcess = checkForArgumentAndRemoveFromARGV(&quot;--use-web-process-xpc-service&quot;);
</del><ins>+    return $ENV{'OS'} eq 'Windows_NT';
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub debugger
</span><span class="lines">@@ -1299,17 +1407,28 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub appendToEnvironmentVariableList
</del><ins>+sub appendToEnvironmentVariableList($$)
</ins><span class="cx"> {
</span><del>-    my ($environmentVariableName, $value) = @_;
</del><ins>+    my ($name, $value) = @_;
</ins><span class="cx"> 
</span><del>-    if (defined($ENV{$environmentVariableName})) {
-        $ENV{$environmentVariableName} .= &quot;:&quot; . $value;
</del><ins>+    if (defined($ENV{$name})) {
+        $ENV{$name} .= $Config{path_sep} . $value;
</ins><span class="cx">     } else {
</span><del>-        $ENV{$environmentVariableName} = $value;
</del><ins>+        $ENV{$name} = $value;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub prependToEnvironmentVariableList($$)
+{
+    my ($name, $value) = @_;
+
+    if (defined($ENV{$name})) {
+        $ENV{$name} = $value . $Config{path_sep} . $ENV{$name};
+    } else {
+        $ENV{$name} = $value;
+    }
+}
+
</ins><span class="cx"> sub sharedCommandLineOptions()
</span><span class="cx"> {
</span><span class="cx">     return (
</span><span class="lines">@@ -1350,6 +1469,7 @@
</span><span class="cx"> 
</span><span class="cx">     if ($shouldUseGuardMalloc) {
</span><span class="cx">         appendToEnvironmentVariableList(&quot;DYLD_INSERT_LIBRARIES&quot;, &quot;/usr/lib/libgmalloc.dylib&quot;);
</span><ins>+        appendToEnvironmentVariableList(&quot;__XPC_DYLD_INSERT_LIBRARIES&quot;, &quot;/usr/lib/libgmalloc.dylib&quot;);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1379,7 +1499,7 @@
</span><span class="cx">     } elsif (isAppleMacWebKit()) {
</span><span class="cx">         return &quot;Safari&quot;;
</span><span class="cx">     } elsif (isAppleWinWebKit()) {
</span><del>-        return &quot;WinLauncher&quot;;
</del><ins>+        return &quot;MiniBrowser&quot;;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1402,20 +1522,7 @@
</span><span class="cx">             print &quot;most likely fail. The latest Xcode is available from the App Store.\n&quot;;
</span><span class="cx">             print &quot;*************************************************************\n&quot;;
</span><span class="cx">         }
</span><del>-    } elsif (isGtk() or isEfl() or isWindows()) {
-        my @cmds = qw(bison gperf flex);
-        my @missing = ();
-        my $oldPath = $ENV{PATH};
-        foreach my $cmd (@cmds) {
-            push @missing, $cmd if not commandExists($cmd);
-        }
-
-        if (@missing) {
-            my $list = join &quot;, &quot;, @missing;
-            die &quot;ERROR: $list missing but required to build WebKit.\n&quot;;
-        }
</del><span class="cx">     }
</span><del>-    # Win32 and other platforms may want to check for minimum config
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub determineWindowsSourceDir()
</span><span class="lines">@@ -1517,6 +1624,8 @@
</span><span class="cx">         $variablesToSet{WEBKIT_LIBRARIES} = windowsLibrariesDir() unless $ENV{WEBKIT_LIBRARIES};
</span><span class="cx">         $variablesToSet{WEBKIT_OUTPUTDIR} = windowsOutputDir() unless $ENV{WEBKIT_OUTPUTDIR};
</span><span class="cx">         $variablesToSet{MSBUILDDISABLENODEREUSE} = &quot;1&quot; unless $ENV{MSBUILDDISABLENODEREUSE};
</span><ins>+        $variablesToSet{_IsNativeEnvironment} = &quot;true&quot; unless $ENV{_IsNativeEnvironment};
+        $variablesToSet{PreferredToolArchitecture} = &quot;x64&quot; unless $ENV{PreferredToolArchitecture};
</ins><span class="cx"> 
</span><span class="cx">         foreach my $variable (keys %variablesToSet) {
</span><span class="cx">             print &quot;Setting the Environment Variable '&quot; . $variable . &quot;' to '&quot; . $variablesToSet{$variable} . &quot;'\n\n&quot;;
</span><span class="lines">@@ -1555,7 +1664,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub setupCygwinEnv()
</span><span class="cx"> {
</span><del>-    return if !isCygwin() &amp;&amp; !isWindows();
</del><ins>+    return if !isAnyWindows();
</ins><span class="cx">     return if $vcBuildPath;
</span><span class="cx"> 
</span><span class="cx">     my $programFilesPath = programFilesPath();
</span><span class="lines">@@ -1572,7 +1681,7 @@
</span><span class="cx">             print &quot;*************************************************************\n&quot;;
</span><span class="cx">             print &quot;Cannot find '$visualStudioPath'\n&quot;;
</span><span class="cx">             print &quot;Please execute the file 'vcvars32.bat' from\n&quot;;
</span><del>-            print &quot;'$programFilesPath\\Microsoft Visual Studio 12.0\\VC\\bin\\'\n&quot;;
</del><ins>+            print &quot;'$programFilesPath\\Microsoft Visual Studio 14.0\\VC\\bin\\'\n&quot;;
</ins><span class="cx">             print &quot;to setup the necessary environment variables.\n&quot;;
</span><span class="cx">             print &quot;*************************************************************\n&quot;;
</span><span class="cx">             die;
</span><span class="lines">@@ -1639,8 +1748,6 @@
</span><span class="cx">         push(@extraOptions, &quot;clean&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    push(@extraOptions, (&quot;-sdk&quot;, xcodeSDK())) if isIOSWebKit();
-
</del><span class="cx">     chomp($ENV{DSYMUTIL_NUM_THREADS} = `sysctl -n hw.activecpu`);
</span><span class="cx">     return system &quot;xcodebuild&quot;, &quot;-project&quot;, &quot;$project.xcodeproj&quot;, @extraOptions;
</span><span class="cx"> }
</span><span class="lines">@@ -1680,7 +1787,6 @@
</span><span class="cx">     my $warningLogging = &quot;/flp1:LogFile=&quot; . $warningLogFile . &quot;;WarningsOnly&quot;;
</span><span class="cx"> 
</span><span class="cx">     my @command = ($vcBuildPath, &quot;/verbosity:minimal&quot;, $project, $action, $config, $platform, &quot;/fl&quot;, $errorLogging, &quot;/fl1&quot;, $warningLogging);
</span><del>-
</del><span class="cx">     print join(&quot; &quot;, @command), &quot;\n&quot;;
</span><span class="cx">     return system @command;
</span><span class="cx"> }
</span><span class="lines">@@ -1723,8 +1829,14 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub jhbuildWrapperPrefixIfNeeded()
</del><ins>+sub wrapperPrefixIfNeeded()
</ins><span class="cx"> {
</span><ins>+    if (isAnyWindows()) {
+        return ();
+    }
+    if (isAppleMacWebKit()) {
+        return (&quot;xcrun&quot;);
+    }
</ins><span class="cx">     if (-e getJhbuildPath()) {
</span><span class="cx">         my @prefix = (File::Spec-&gt;catfile(sourceDir(), &quot;Tools&quot;, &quot;jhbuild&quot;, &quot;jhbuild-wrapper&quot;));
</span><span class="cx">         if (isEfl()) {
</span><span class="lines">@@ -1797,20 +1909,39 @@
</span><span class="cx"> 
</span><span class="cx"> sub canUseNinja(@)
</span><span class="cx"> {
</span><ins>+    if (!defined($shouldNotUseNinja)) {
+        $shouldNotUseNinja = checkForArgumentAndRemoveFromARGV(&quot;--no-ninja&quot;);
+    }
+
+    if ($shouldNotUseNinja) {
+        return 0;
+    }
+
</ins><span class="cx">     # Test both ninja and ninja-build. Fedora uses ninja-build and has patched CMake to also call ninja-build.
</span><span class="cx">     return commandExists(&quot;ninja&quot;) || commandExists(&quot;ninja-build&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub canUseEclipse(@)
</del><ins>+sub canUseNinjaGenerator(@)
</ins><span class="cx"> {
</span><del>-    return commandExists(&quot;eclipse&quot;);
</del><ins>+    # Check that a Ninja generator is installed
+    my $devnull = File::Spec-&gt;devnull();
+    return exitStatus(system(&quot;cmake -N -G Ninja &gt;$devnull 2&gt;&amp;1&quot;)) == 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub canUseEclipseNinjaGenerator(@)
+{
+    # Check that eclipse and eclipse Ninja generator is installed
+    my $devnull = File::Spec-&gt;devnull();
+    return commandExists(&quot;eclipse&quot;) &amp;&amp; exitStatus(system(&quot;cmake -N -G 'Eclipse CDT4 - Ninja' &gt;$devnull 2&gt;&amp;1&quot;)) == 0;
+}
+
</ins><span class="cx"> sub cmakeGeneratedBuildfile(@)
</span><span class="cx"> {
</span><span class="cx">     my ($willUseNinja) = @_;
</span><span class="cx">     if ($willUseNinja) {
</span><span class="cx">         return File::Spec-&gt;catfile(baseProductDir(), configuration(), &quot;build.ninja&quot;)
</span><ins>+    } elsif (isAnyWindows()) {
+        return File::Spec-&gt;catfile(baseProductDir(), configuration(), &quot;WebKit.sln&quot;)
</ins><span class="cx">     } else {
</span><span class="cx">         return File::Spec-&gt;catfile(baseProductDir(), configuration(), &quot;Makefile&quot;)
</span><span class="cx">     }
</span><span class="lines">@@ -1818,15 +1949,16 @@
</span><span class="cx"> 
</span><span class="cx"> sub generateBuildSystemFromCMakeProject
</span><span class="cx"> {
</span><del>-    my ($port, $prefixPath, @cmakeArgs, $additionalCMakeArgs) = @_;
</del><ins>+    my ($prefixPath, @cmakeArgs) = @_;
</ins><span class="cx">     my $config = configuration();
</span><ins>+    my $port = cmakeBasedPortName();
</ins><span class="cx">     my $buildPath = File::Spec-&gt;catdir(baseProductDir(), $config);
</span><span class="cx">     File::Path::mkpath($buildPath) unless -d $buildPath;
</span><span class="cx">     my $originalWorkingDirectory = getcwd();
</span><span class="cx">     chdir($buildPath) or die;
</span><span class="cx"> 
</span><span class="cx">     # We try to be smart about when to rerun cmake, so that we can have faster incremental builds.
</span><del>-    my $willUseNinja = canUseNinja();
</del><ins>+    my $willUseNinja = canUseNinja() &amp;&amp; canUseNinjaGenerator();
</ins><span class="cx">     if (-e cmakeCachePath() &amp;&amp; -e cmakeGeneratedBuildfile($willUseNinja)) {
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="lines">@@ -1843,11 +1975,13 @@
</span><span class="cx"> 
</span><span class="cx">     if ($willUseNinja) {
</span><span class="cx">         push @args, &quot;-G&quot;;
</span><del>-        if (canUseEclipse()) {
</del><ins>+        if (canUseEclipseNinjaGenerator()) {
</ins><span class="cx">             push @args, &quot;'Eclipse CDT4 - Ninja'&quot;;
</span><span class="cx">         } else {
</span><span class="cx">             push @args, &quot;Ninja&quot;;
</span><span class="cx">         }
</span><ins>+    } elsif (isAnyWindows() &amp;&amp; isWin64()) {
+        push @args, '-G &quot;Visual Studio 14 2015 Win64&quot;';
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # GTK+ has a production mode, but build-webkit should always use developer mode.
</span><span class="lines">@@ -1856,20 +1990,20 @@
</span><span class="cx">     # Don't warn variables which aren't used by cmake ports.
</span><span class="cx">     push @args, &quot;--no-warn-unused-cli&quot;;
</span><span class="cx">     push @args, @cmakeArgs if @cmakeArgs;
</span><del>-    push @args, $additionalCMakeArgs if $additionalCMakeArgs;
</del><span class="cx"> 
</span><del>-    push @args, '&quot;' . sourceDir() . '&quot;';
</del><ins>+    my $cmakeSourceDir = isCygwin() ? windowsSourceDir() : sourceDir();
+    push @args, '&quot;' . $cmakeSourceDir . '&quot;';
</ins><span class="cx"> 
</span><span class="cx">     # Compiler options to keep floating point values consistent
</span><span class="cx">     # between 32-bit and 64-bit architectures.
</span><span class="cx">     determineArchitecture();
</span><del>-    if ($architecture ne &quot;x86_64&quot; &amp;&amp; !isARM() &amp;&amp; !isCrossCompilation()) {
</del><ins>+    if ($architecture ne &quot;x86_64&quot; &amp;&amp; !isARM() &amp;&amp; !isCrossCompilation() &amp;&amp; !isAnyWindows()) {
</ins><span class="cx">         $ENV{'CXXFLAGS'} = &quot;-march=pentium4 -msse2 -mfpmath=sse &quot; . ($ENV{'CXXFLAGS'} || &quot;&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # We call system(&quot;cmake @args&quot;) instead of system(&quot;cmake&quot;, @args) so that @args is
</span><span class="cx">     # parsed for shell metacharacters.
</span><del>-    my $wrapper = join(&quot; &quot;, jhbuildWrapperPrefixIfNeeded()) . &quot; &quot;;
</del><ins>+    my $wrapper = join(&quot; &quot;, wrapperPrefixIfNeeded()) . &quot; &quot;;
</ins><span class="cx">     my $returnCode = system($wrapper . &quot;cmake @args&quot;);
</span><span class="cx"> 
</span><span class="cx">     chdir($originalWorkingDirectory);
</span><span class="lines">@@ -1903,9 +2037,8 @@
</span><span class="cx"> 
</span><span class="cx">     # We call system(&quot;cmake @args&quot;) instead of system(&quot;cmake&quot;, @args) so that @args is
</span><span class="cx">     # parsed for shell metacharacters. In particular, $makeArgs may contain such metacharacters.
</span><del>-    my $wrapper = join(&quot; &quot;, jhbuildWrapperPrefixIfNeeded()) . &quot; &quot;;
</del><ins>+    my $wrapper = join(&quot; &quot;, wrapperPrefixIfNeeded()) . &quot; &quot;;
</ins><span class="cx">     return system($wrapper . &quot;$command @args&quot;);
</span><del>-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub cleanCMakeGeneratedProject()
</span><span class="lines">@@ -1918,9 +2051,9 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub buildCMakeProjectOrExit($$$$@)
</del><ins>+sub buildCMakeProjectOrExit($$$@)
</ins><span class="cx"> {
</span><del>-    my ($clean, $port, $prefixPath, $makeArgs, @cmakeArgs) = @_;
</del><ins>+    my ($clean, $prefixPath, $makeArgs, @cmakeArgs) = @_;
</ins><span class="cx">     my $returnCode;
</span><span class="cx"> 
</span><span class="cx">     exit(exitStatus(cleanCMakeGeneratedProject())) if $clean;
</span><span class="lines">@@ -1933,7 +2066,7 @@
</span><span class="cx">         system(&quot;perl&quot;, &quot;$sourceDir/Tools/Scripts/update-webkitgtk-libs&quot;) == 0 or die $!;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    $returnCode = exitStatus(generateBuildSystemFromCMakeProject($port, $prefixPath, @cmakeArgs));
</del><ins>+    $returnCode = exitStatus(generateBuildSystemFromCMakeProject($prefixPath, @cmakeArgs));
</ins><span class="cx">     exit($returnCode) if $returnCode;
</span><span class="cx"> 
</span><span class="cx">     $returnCode = exitStatus(buildCMakeGeneratedProject($makeArgs));
</span><span class="lines">@@ -1948,14 +2081,20 @@
</span><span class="cx"> 
</span><span class="cx"> sub cmakeBasedPortName()
</span><span class="cx"> {
</span><del>-    return &quot;Efl&quot; if isEfl();
-    return &quot;GTK&quot; if isGtk();
-    return &quot;&quot;;
</del><ins>+    return ucfirst portName();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub determineIsCMakeBuild()
+{
+    return if defined($isCMakeBuild);
+    $isCMakeBuild = checkForArgumentAndRemoveFromARGV(&quot;--cmake&quot;);
+}
+
</ins><span class="cx"> sub isCMakeBuild()
</span><span class="cx"> {
</span><del>-    return isEfl() || isGtk();
</del><ins>+    return 1 unless isAppleMacWebKit();
+    determineIsCMakeBuild();
+    return $isCMakeBuild;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub promptUser
</span><span class="lines">@@ -1983,12 +2122,15 @@
</span><span class="cx"> {
</span><span class="cx">     my ($env) = @_;
</span><span class="cx"> 
</span><del>-    if (isAppleWinWebKit()) {
-        $env-&gt;{PATH} = join(':', productDir(), appleApplicationSupportPath(), $env-&gt;{PATH} || &quot;&quot;);
-    } elsif (isWinCairo()) {
-        my $winCairoBin = sourceDir() . &quot;/WebKitLibraries/win/&quot; . (isWin64() ? &quot;bin64/&quot; : &quot;bin32/&quot;);
-        my $gstreamerBin = isWin64() ? $ENV{&quot;GSTREAMER_1_0_ROOT_X86_64&quot;} . &quot;bin&quot; : $ENV{&quot;GSTREAMER_1_0_ROOT_X86&quot;} . &quot;bin&quot;;
-        $env-&gt;{PATH} = join(':', productDir(), $winCairoBin, $gstreamerBin, $env-&gt;{PATH} || &quot;&quot;);
</del><ins>+    if (isAnyWindows()) {
+        my $productBinaryDir = executableProductDir();
+        if (isAppleWinWebKit()) {
+            $env-&gt;{PATH} = join(':', $productBinaryDir, appleApplicationSupportPath(), $env-&gt;{PATH} || &quot;&quot;);
+        } elsif (isWinCairo()) {
+            my $winCairoBin = sourceDir() . &quot;/WebKitLibraries/win/&quot; . (isWin64() ? &quot;bin64/&quot; : &quot;bin32/&quot;);
+            my $gstreamerBin = isWin64() ? $ENV{&quot;GSTREAMER_1_0_ROOT_X86_64&quot;} . &quot;bin&quot; : $ENV{&quot;GSTREAMER_1_0_ROOT_X86&quot;} . &quot;bin&quot;;
+            $env-&gt;{PATH} = join(':', $productBinaryDir, $winCairoBin, $gstreamerBin, $env-&gt;{PATH} || &quot;&quot;);
+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2003,12 +2145,10 @@
</span><span class="cx">   --help                            Show this help message
</span><span class="cx">   --no-saved-state                  Launch the application without state restoration (OS X 10.7 and later)
</span><span class="cx">   -g|--guard-malloc                 Enable Guard Malloc (OS X only)
</span><del>-  --use-web-process-xpc-service     Launch the Web Process as an XPC Service (OS X only)
</del><span class="cx"> EOF
</span><span class="cx"> 
</span><span class="cx">     if ($includeOptionsForDebugging) {
</span><span class="cx">         print STDERR &lt;&lt;EOF;
</span><del>-  --target-web-process              Debug the web process
</del><span class="cx">   --use-gdb                         Use GDB (this is the default when using Xcode 4.4 or earlier)
</span><span class="cx">   --use-lldb                        Use LLDB (this is the default when using Xcode 4.5 or later)
</span><span class="cx"> EOF
</span><span class="lines">@@ -2025,7 +2165,6 @@
</span><span class="cx">         # FIXME: Don't set ApplePersistenceIgnoreState once all supported OS versions respect ApplePersistenceIgnoreStateQuietly (rdar://15032886).
</span><span class="cx">         push @args, (&quot;-ApplePersistenceIgnoreState&quot;, &quot;YES&quot;);
</span><span class="cx">     }
</span><del>-    push @args, (&quot;-WebKit2UseXPCServiceForWebProcess&quot;, &quot;YES&quot;) if shouldUseXPCServiceForWebProcess();
</del><span class="cx">     unshift @args, @ARGV;
</span><span class="cx"> 
</span><span class="cx">     return @args;
</span><span class="lines">@@ -2037,8 +2176,8 @@
</span><span class="cx"> 
</span><span class="cx">     $dyldFrameworkPath = File::Spec-&gt;rel2abs($dyldFrameworkPath);
</span><span class="cx"> 
</span><del>-    $ENV{DYLD_FRAMEWORK_PATH} = $ENV{DYLD_FRAMEWORK_PATH} ? join(&quot;:&quot;, $dyldFrameworkPath, $ENV{DYLD_FRAMEWORK_PATH}) : $dyldFrameworkPath;
-    $ENV{__XPC_DYLD_FRAMEWORK_PATH} = $dyldFrameworkPath;
</del><ins>+    prependToEnvironmentVariableList(&quot;DYLD_FRAMEWORK_PATH&quot;, $dyldFrameworkPath);
+    prependToEnvironmentVariableList(&quot;__XPC_DYLD_FRAMEWORK_PATH&quot;, $dyldFrameworkPath);
</ins><span class="cx">     $ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = &quot;YES&quot;;
</span><span class="cx"> 
</span><span class="cx">     setUpGuardMallocIfNeeded();
</span><span class="lines">@@ -2049,8 +2188,8 @@
</span><span class="cx">     my ($dyldFrameworkPath) = @_;
</span><span class="cx">     $dyldFrameworkPath = File::Spec-&gt;rel2abs($dyldFrameworkPath);
</span><span class="cx"> 
</span><del>-    $ENV{DYLD_FRAMEWORK_PATH} = $dyldFrameworkPath;
-    $ENV{DYLD_LIBRARY_PATH} = $dyldFrameworkPath;
</del><ins>+    prependToEnvironmentVariableList(&quot;DYLD_FRAMEWORK_PATH&quot;, $dyldFrameworkPath);
+    prependToEnvironmentVariableList(&quot;DYLD_LIBRARY_PATH&quot;, $dyldFrameworkPath);
</ins><span class="cx"> 
</span><span class="cx">     setUpGuardMallocIfNeeded();
</span><span class="cx"> }
</span><span class="lines">@@ -2110,6 +2249,20 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub shutDownIOSSimulatorDevice($)
+{
+    my ($simulatorDevice) = @_;
+    system(&quot;xcrun --sdk iphonesimulator simctl shutdown $simulatorDevice-&gt;{UDID} &gt; /dev/null 2&gt;&amp;1&quot;);
+}
+
+sub restartIOSSimulatorDevice($)
+{
+    my ($simulatorDevice) = @_;
+    shutDownIOSSimulatorDevice($simulatorDevice);
+
+    exitStatus(system(&quot;xcrun&quot;, &quot;--sdk&quot;, &quot;iphonesimulator&quot;, &quot;simctl&quot;, &quot;boot&quot;, $simulatorDevice-&gt;{UDID})) == 0 or die &quot;Failed to boot simulator device $simulatorDevice-&gt;{UDID}&quot;;
+}
+
</ins><span class="cx"> sub relaunchIOSSimulator($)
</span><span class="cx"> {
</span><span class="cx">     my ($simulatedDevice) = @_;
</span><span class="lines">@@ -2238,7 +2391,7 @@
</span><span class="cx">     my $productDir = productDir();
</span><span class="cx">     my $appDisplayName = appDisplayNameFromBundle($appBundle);
</span><span class="cx">     my $appIdentifier = appIdentifierFromBundle($appBundle);
</span><del>-    my $simulatedDevice = findOrCreateSimulatorForIOSDevice(&quot;For WebKit Development&quot;);
</del><ins>+    my $simulatedDevice = findOrCreateSimulatorForIOSDevice(SIMULATOR_DEVICE_SUFFIX_FOR_WEBKIT_DEVELOPMENT);
</ins><span class="cx">     my $simulatedDeviceUDID = $simulatedDevice-&gt;{UDID};
</span><span class="cx"> 
</span><span class="cx">     my $willUseSystemInstalledApp = isIOSSimulatorSystemInstalledApp($appBundle);
</span><span class="lines">@@ -2296,10 +2449,10 @@
</span><span class="cx"> sub runIOSWebKitApp($)
</span><span class="cx"> {
</span><span class="cx">     my ($appBundle) = @_;
</span><del>-    if (willUseIOSDeviceSDKWhenBuilding()) {
</del><ins>+    if (willUseIOSDeviceSDK()) {
</ins><span class="cx">         die &quot;Only running Safari in iOS Simulator is supported now.&quot;;
</span><span class="cx">     }
</span><del>-    if (willUseIOSSimulatorSDKWhenBuilding()) {
</del><ins>+    if (willUseIOSSimulatorSDK()) {
</ins><span class="cx">         return runIOSWebKitAppInSimulator($appBundle);
</span><span class="cx">     }
</span><span class="cx">     die &quot;Not using an iOS SDK.&quot;
</span><span class="lines">@@ -2347,23 +2500,8 @@
</span><span class="cx">     setupMacWebKitEnvironment($productDir);
</span><span class="cx"> 
</span><span class="cx">     my @architectureFlags = ($architectureSwitch, architecture());
</span><del>-    if (!shouldTargetWebProcess()) {
-        print &quot;Starting @{[basename($appPath)]} under $debugger with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n&quot;;
-        exec { $debuggerPath } $debuggerPath, @architectureFlags, $argumentsSeparator, $appPath, argumentsForRunAndDebugMacWebKitApp() or die;
-    } else {
-        if (shouldUseXPCServiceForWebProcess()) {
-            die &quot;Targeting the Web Process is not compatible with using an XPC Service for the Web Process at this time.&quot;;
-        }
-        
-        my $webProcessShimPath = File::Spec-&gt;catfile($productDir, &quot;SecItemShim.dylib&quot;);
-        my $webProcessPath = File::Spec-&gt;catdir($productDir, &quot;WebProcess.app&quot;);
-        my $webKit2ExecutablePath = File::Spec-&gt;catfile($productDir, &quot;WebKit2.framework&quot;, &quot;WebKit2&quot;);
-
-        appendToEnvironmentVariableList(&quot;DYLD_INSERT_LIBRARIES&quot;, $webProcessShimPath);
-
-        print &quot;Starting WebProcess under $debugger with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n&quot;;
-        exec { $debuggerPath } $debuggerPath, @architectureFlags, $argumentsSeparator, $webProcessPath, $webKit2ExecutablePath, &quot;-type&quot;, &quot;webprocess&quot;, &quot;-client-executable&quot;, $appPath or die;
-    }
</del><ins>+    print &quot;Starting @{[basename($appPath)]} under $debugger with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n&quot;;
+    exec { $debuggerPath } $debuggerPath, @architectureFlags, $argumentsSeparator, $appPath, argumentsForRunAndDebugMacWebKitApp() or die;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub debugSafari
</span><span class="lines">@@ -2388,8 +2526,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (isAppleWinWebKit()) {
</span><span class="cx">         my $result;
</span><del>-        my $productDir = productDir();
-        my $webKitLauncherPath = File::Spec-&gt;catfile(productDir(), &quot;WinLauncher.exe&quot;);
</del><ins>+        my $webKitLauncherPath = File::Spec-&gt;catfile(executableProductDir(), &quot;MiniBrowser.exe&quot;);
</ins><span class="cx">         return system { $webKitLauncherPath } $webKitLauncherPath, @ARGV;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2400,6 +2537,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (isAppleMacWebKit()) {
</span><span class="cx">         return runMacWebKitApp(File::Spec-&gt;catfile(productDir(), &quot;MiniBrowser.app&quot;, &quot;Contents&quot;, &quot;MacOS&quot;, &quot;MiniBrowser&quot;));
</span><ins>+    } elsif (isAppleWinWebKit()) {
+        my $result;
+        my $webKitLauncherPath = File::Spec-&gt;catfile(executableProductDir(), &quot;MiniBrowser.exe&quot;);
+        return system { $webKitLauncherPath } $webKitLauncherPath, @ARGV;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return 1;
</span></span></pre>
</div>
</div>

</body>
</html>