blob: 628622ec48b119bf9f2e91c2c7935541c2bfbca6 [file] [log] [blame]
<?php
$title = "Building WebKit";
include("../header.inc");
?>
<h2>Building WebKit</h2>
Building WebKit requires that you have the proper <a href="tools.html">developer tools
installed</a> and that you have a copy of the <a href="checkout.html">WebKit source tree</a>.
<div class="windows-instructions">
<h4>Windows</h4>
<ol>
<li><p>Open a Cygwin Shell (if not already open from checking out sources)</p>
<p>Double-click the Cygwin icon on your Desktop to launch a new shell.
</ol>
</div>
<ol>
<li><p>Type this command to build WebKit:</p>
<p class="code">WebKit/WebKitTools/Scripts/build-webkit</p>
<p>Use the <tt>--debug</tt> option for a debug build, which includes debugging symbols and assertions:</p>
<p class="code">WebKit/WebKitTools/Scripts/build-webkit --debug</p>
</li>
</ol>
<p>By default, <tt>build-webkit</tt> places build products in <tt>WebKit/WebKitBuild</tt>. You can specify a different build
location on Mac in your Xcode preferences. On Windows, the <tt>WEBKITOUTPUTDIR</tt> environment variable can be used to
set a different build products location. If you have set up a custom build location, then <tt>build-webkit</tt> will
place the build products there.</p>
<div class="windows-instructions">
<h4>Windows</h4>
<p>A common source of build errors on Windows is Visual C++ Express forgetting the Platform SDK paths. If you have trouble building WebKit,
double check that the paths you set during <a href="http://msdn.microsoft.com/en-us/library/ms235626(VS.80).aspx">step 2 of the Platform SDK Installation</a>
are still there and add them again if necessary.</p>
<p>Another common error is forgetting to set the <tt>WEBKITOUTPUTDIR</tt> environment variable. If you omit this step, you will get build errors when the WebKit build process begins generating code. If you are not sure how to do this, Microsoft provides a good set of <a href="http://support.microsoft.com/kb/310519">instructions</a>.</p>
<p>Don't forget that if you have any questions or problems building WebKit, feel free to <a href="/contact.html">get in touch!</a></p>
</div>
<h2>Setting a Default Configuration</h2>
<ol>
<li><p>To set a default build configuration for <tt>build-webkit</tt> and other scripts, use the <tt>set-webkit-configuration</tt> script:</p>
<p class="code">WebKit/WebKitTools/Scripts/set-webkit-configuration --debug</p>
<p class="code">WebKit/WebKitTools/Scripts/set-webkit-configuration --release</p>
</li>
</ol>
<hr>
<p>It's handy to put <tt>WebKit/WebKitTools/Scripts</tt> in your shell path so you can type commands like <tt>build-webkit</tt> without specifying a full path.</p>
<p>Once your build has finished, you can <A href="run.html">run it inside Safari.</a></p>
<?php
include("../footer.inc");
?>