blob: 6052da14a168600a4747ad73f8049fc8d4e32bcc [file] [log] [blame]
{{+bindTo:partials.standard_nacl_article}}
<section id="download-the-native-client-sdk">
<span id="download"></span><h1 id="download-the-native-client-sdk"><span id="download"></span>Download the Native Client SDK</h1>
<p>This page provides an overview of the Native Client SDK, and instructions for
downloading and installing the SDK.</p>
<div id="home">
<a class="button-nacl button-download" href="https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a>
</div><h2 id="overview"><span id="sdk-overview"></span>Overview</h2>
<p>The Native Client SDK includes:</p>
<ul class="small-gap">
<li><strong>Support for multiple Pepper versions</strong> to compile for specific minimum
versions of Chrome.</li>
<li><strong>Update utility</strong> to download new bundles and updates to existing bundles.</li>
<li><strong>Toolchains</strong> to compile for Portable Native Client (PNaCl), traditional
Native Client (NaCl), and for compiling architecture-specific Native Client
applications with glibc.</li>
<li><strong>Examples</strong> Including C or C++ source files and header files illustrating
how to use NaCl and Pepper, and Makefiles to build the example with each of
the toolchains.</li>
<li><strong>Tools</strong> for validating Native Client modules and running modules from the
command line.</li>
</ul>
<p>Follow the steps below to download and install the Native Client SDK.</p>
<h2 id="prerequisites"><span id="id1"></span>Prerequisites</h2>
<h3 id="python-2-7"><span id="python27"></span>Python 2.7</h3>
<p>Make sure that the Python executable is in your <code>PATH</code> variable. Python 3.x is
not yet supported.</p>
<ul class="small-gap">
<li>On Mac and Linux, Python is likely preinstalled. Run the command <code>python -V</code>
in a terminal window, and make sure that the version you have is 2.7.x.</li>
<li>On Windows, you may need to install Python. Go to <a class="reference external" href="https://www.python.org/download/">https://www.python.org/
download/</a> and select the latest 2.x
version. In addition, be sure to add the Python directory (for example,
<code>C:\python27</code>) to the <code>PATH</code> <a class="reference external" href="https://en.wikipedia.org/wiki/Environment_variable">environment variable</a>. Run <code>python -V</code> from a command line to
verify that you properly configured the PATH variable.</li>
</ul>
<h3 id="make"><span id="id2"></span>Make</h3>
<ul class="small-gap">
<li>On the Mac, you need to install <code>make</code> on your system before you can build
and run the examples in the SDK. One easy way to get <code>make</code>, along with
several other useful tools, is to install <a class="reference external" href="https://developer.apple.com/technologies/tools/">Xcode Developer Tools</a>. After installing Xcode,
go to the XCode menu, open the Preferences dialog box then select Downloads
and Components. Verify that Command Line Tools are installed.</li>
<li>On Windows, the Native Client SDK includes a copy of GNU Make.</li>
</ul>
<h2 id="platforms"><span id="id3"></span>Platforms</h2>
<p>Native Client supports several operating systems, including Windows, Linux, OSX,
and ChromeOS. It supports several architectures including on x86-32, x86-64,
ARM, and MIPS.</p>
<h2 id="versions"><span id="versioning"></span>Versions</h2>
<p>Chrome is released on a six week cycle, and developer versions of Chrome are
pushed to the public beta channel three weeks before each release. As with any
software, each release of Chrome may include changes to Native Client and the
Pepper interfaces that may require modification to existing applications.
However, modules compiled for one version of Pepper/Chrome should work with
subsequent versions of Pepper/Chrome. The SDK includes multiple versions of the
Pepper APIs to help developers make adjustments to API changes and take
advantage of new features: <a class="reference external" href="/native-client/pepper_stable">stable</a>, <a class="reference external" href="/native-client/pepper_beta">beta</a> and <a class="reference external" href="/native-client/pepper_dev">dev</a>.</p>
<h2 id="installing-the-sdk"><span id="id4"></span>Installing the SDK</h2>
<h3 id="downloading-and-unzipping"><span id="id5"></span>Downloading and Unzipping</h3>
<ol class="arabic">
<li><p class="first">Download the <a class="reference external" href="https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">SDK update zip file</a>.</p>
</li>
<li><p class="first">Unzip the file:</p>
<ul class="small-gap">
<li><p class="first">On Mac/Linux, run the command <code>unzip nacl_sdk.zip</code> in a terminal
window.</p>
</li>
<li><p class="first">On Windows, right-click on the .zip file and select &#8220;Extract All...&#8221;. A
dialog box opens; enter a location and click &#8220;Extract&#8221;.</p>
</li>
</ul>
<p>A directory is created called <code>nacl_sdk</code> with the following files and
directories:</p>
<ul class="small-gap">
<li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Windows) &#8212; the update utility,
which is the command you run to download and update bundles.</p>
</li>
<li><p class="first"><code>sdk_cache</code> &#8212; a directory with a manifest file that lists the bundles
you have already downloaded.</p>
</li>
<li><p class="first"><code>sdk_tools</code> &#8212; the code run by the <code>naclsdk</code> command.</p>
</li>
</ul>
</li>
</ol>
<h3 id="installing-the-stable-bundle"><span id="id6"></span>Installing the stable bundle</h3>
<ol class="arabic">
<li><p class="first">To see the SDK bundles that are available for download, go to the
<code>nacl_sdk</code> directory and run <code>naclsdk</code> with the <code>list</code> command. The SDK
includes a separate bundle for each version of Chrome/Pepper.</p>
<p>On Mac/Linux:</p>
<pre class="prettyprint">
$ cd nacl_sdk
$ ./naclsdk list
</pre>
<p>On Windows:</p>
<pre class="prettyprint">
&gt; cd nacl_sdk
&gt; naclsdk list
</pre>
<p>You should see output similar to this:</p>
<pre class="prettyprint">
Bundles:
I: installed
*: update available
I sdk_tools (stable)
vs_addin (dev)
pepper_31 (post_stable)
pepper_32 (post_stable)
pepper_33 (post_stable)
pepper_34 (post_stable)
pepper_35 (stable)
pepper_36 (beta)
pepper_37 (dev)
pepper_canary (canary)
</pre>
<p>The sample output above shows that several bundles are available for
download, and that you have already installed the latest revision of the
<code>sdk_tools</code> bundle, which was included in the zip file. You never need to
update the <code>sdk_tools</code> bundle. It is updated automatically (if necessary)
whenever you run <code>naclsdk</code>.</p>
<p>Bundles are labeled post-stable, stable, beta, dev, or canary. These labels
usually correspond to the current versions of Chrome. We recommend that you
develop against a &#8220;stable&#8221; bundle, because such bundles can be used by all
current Chrome users. Native Client is designed to be backward-compatible.For
example, applications developed with the <code>pepper_37</code> bundle can run in
Chrome 37, Chrome 38, etc..</p>
</li>
<li><p class="first">Run <code>naclsdk</code> with the <code>update</code> command to download recommended bundles,
including the current &#8220;stable&#8221; bundle.</p>
<p>On Mac/Linux:</p>
<pre class="prettyprint">
$ ./naclsdk update
</pre>
<p>On Windows:</p>
<pre class="prettyprint">
&gt; naclsdk update
</pre>
<p>By default, <code>naclsdk</code> only downloads bundles that are recommended,
generally those that are &#8220;stable.&#8221; For example, if the current &#8220;stable&#8221;
bundle is <code>pepper_35</code>, then the <code>update</code> downloads that bundle. To
download the <code>pepper_36</code> bundle you must ask for it explicitly:</p>
<pre class="prettyprint">
$ ./naclsdk update pepper_36
</pre>
</li>
</ol>
<h2 id="updating-bundles"><span id="id7"></span>Updating bundles</h2>
<ol class="arabic">
<li><p class="first">Run <code>naclsdk</code> with the <code>list</code> command. This shows you the list of available
bundles and verifies which bundles you have installed.</p>
<p>On Mac/Linux:</p>
<pre class="prettyprint">
$ ./naclsdk list
</pre>
<p>On Windows:</p>
<pre class="prettyprint">
&gt; naclsdk list
</pre>
<p>An asterisk (*) next to a bundle indicates that there is an update available
it. For example:</p>
<pre class="prettyprint">
Bundles:
I: installed
*: update available
I sdk_tools (stable)
vs_addin (dev)
pepper_31 (post_stable)
pepper_32 (post_stable)
pepper_33 (post_stable)
pepper_34 (post_stable)
I* pepper_35 (stable)
pepper_36 (beta)
pepper_37 (dev)
pepper_canary (canary)
</pre>
<p>If you run <code>naclsdk update</code> now, it warns you with a message similar to
this:</p>
<pre class="prettyprint">
WARNING: pepper_35 already exists, but has an update available. Run update
with the --force option to overwrite the existing directory. Warning: This
will overwrite any modifications you have made within this directory.
</pre>
</li>
<li><p class="first">To download and install the new bundle, run:</p>
<p>On Mac/Linux:</p>
<pre class="prettyprint">
$ ./naclsdk update --force
</pre>
<p>On Windows:</p>
<pre class="prettyprint">
&gt; naclsdk update --force
</pre>
</li>
</ol>
<h2 id="help-with-the-naclsdk-utility"><span id="id8"></span>Help with the <code>naclsdk</code> utility</h2>
<ol class="arabic">
<li><p class="first">For more information about the <code>naclsdk</code> utility, run:</p>
<p>On Mac/Linux:</p>
<pre class="prettyprint">
$ ./naclsdk help
</pre>
<p>On Windows:</p>
<pre class="prettyprint">
&gt; naclsdk help
</pre>
</li>
</ol>
<h2 id="next-steps"><span id="id9"></span>Next steps</h2>
<ul class="small-gap">
<li>Browse the <a class="reference external" href="release-notes">Release Notes</a> for important
information about the SDK and new bundles.</li>
<li>If you&#8217;re just starting with Native Client, we recommend reading the
<a class="reference external" href="../overview">Technical Overview</a> and walking through the
<a class="reference external" href="devguide/tutorial/tutorial-part1">Getting Started Tutorial</a>.</li>
<li>If you&#8217;d rather dive in, see
<a class="reference external" href="devguide/devcycle/building">Building Native Client Modules</a>.</li>
</ul>
</section>
{{/partials.standard_nacl_article}}