1 {{+bindTo:partials.standard_nacl_article}} 2 3 <section id="download-the-native-client-sdk"> 4 <span id="download"></span><h1 id="download-the-native-client-sdk"><span id="download"></span>Download the Native Client SDK</h1> 5 <p>This page provides an overview of the Native Client SDK, and instructions for 6 downloading and installing the SDK.</p> 7 <div id="home"> 8 <a class="button-nacl button-download" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a> 9 </div><h2 id="overview"><span id="sdk-overview"></span>Overview</h2> 10 <p>The Native Client SDK includes:</p> 11 <ul class="small-gap"> 12 <li><strong>Support for multiple Pepper versions</strong> to compile for specific minimum 13 versions of Chrome.</li> 14 <li><strong>Update utility</strong> to download new bundles and updates to existing bundles.</li> 15 <li><strong>Toolchains</strong> to compile for Portable Native Client (PNaCl), traditional 16 Native Client (NaCl), and for compiling architecture-specific Native Client 17 applications with glibc.</li> 18 <li><strong>Examples</strong> Including C or C++ source files and header files illustrating 19 how to use NaCl and Pepper, and Makefiles to build the example with each of 20 the toolchains.</li> 21 <li><strong>Tools</strong> for validating Native Client modules and running modules from the 22 command line.</li> 23 </ul> 24 <p>Follow the steps below to download and install the Native Client SDK.</p> 25 <h2 id="prerequisites"><span id="id1"></span>Prerequisites</h2> 26 <h3 id="python-2-7"><span id="python26-27"></span>Python 2.7</h3> 27 <p>Make sure that the Python executable is in your <code>PATH</code> variable. Python 3.x is 28 not yet supported.</p> 29 <ul class="small-gap"> 30 <li>On Mac and Linux, Python is likely preinstalled. Run the command <code>python -V</code> 31 in a terminal window, and make sure that the version you have is 2.6.x or 32 2.7.x.</li> 33 <li>On Windows, you may need to install Python. Go to <a class="reference external" href="http://www.python.org/download/">http://www.python.org/ 34 download/</a> and select the latest 2.x 35 version. In addition, be sure to add the Python directory (for example, 36 <code>C:\python27</code>) to the <code>PATH</code> <a class="reference external" href="http://en.wikipedia.org/wiki/Environment_variable">environment variable</a>. Run <code>python -V</code> from a command line to 37 verify that you properly configured the PATH variable.</li> 38 </ul> 39 <h3 id="make"><span id="id2"></span>Make</h3> 40 <ul class="small-gap"> 41 <li>On the Mac, you need to install <code>make</code> on your system before you can build 42 and run the examples in the SDK. One easy way to get <code>make</code>, along with 43 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, 44 go to the XCode menu, open the Preferences dialog box then select Downloads 45 and Components. Verify that Command Line Tools are installed. If you’d rather 46 not install Xcode, you can download and build an <a class="reference external" href="http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1">open source version</a> of <code>make</code>. 47 To build the program you may also need to download and install <a class="reference external" href="https://github.com/kennethreitz/osx-gcc-installer">gcc</a>.</li> 48 <li>On Windows, the Native Client SDK includes a copy of GNU Make.</li> 49 </ul> 50 <h2 id="versioning"><span id="id3"></span>Versioning</h2> 51 <p>Chrome is released on a six week cycle, and developer versions of Chrome are 52 pushed to the public beta channel three weeks before each release. As with any 53 software, each release of Chrome may include changes to Native Client and the 54 Pepper interfaces that may require modification to existing applications. 55 However, modules compiled for one version of Pepper/Chrome should work with 56 subsequent versions of Pepper/Chrome. The SDK includes multiple versions of the 57 Pepper APIs to help developers make adjustments to API changes and take 58 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> 59 <h2 id="installing-the-sdk"><span id="id4"></span>Installing the SDK</h2> 60 <h3 id="downloading-and-unzipping"><span id="id5"></span>Downloading and Unzipping</h3> 61 <ol class="arabic"> 62 <li><p class="first">Download the <a class="reference external" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">SDK update zip file</a>.</p> 63 </li> 64 <li><p class="first">Unzip the file:</p> 65 <ul class="small-gap"> 66 <li><p class="first">On Mac/Linux, run the command <code>unzip nacl_sdk.zip</code> in a terminal 67 window.</p> 68 </li> 69 <li><p class="first">On Windows, right-click on the .zip file and select “Extract All...”. A 70 dialog box opens; enter a location and click “Extract”.</p> 71 </li> 72 </ul> 73 <p>A directory is created called <code>nacl_sdk</code> with the following files and 74 directories:</p> 75 <ul class="small-gap"> 76 <li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Windows) — the update utility, 77 which is the command you run to download and update bundles.</p> 78 </li> 79 <li><p class="first"><code>sdk_cache</code> — a directory with a manifest file that lists the bundles 80 you have already downloaded.</p> 81 </li> 82 <li><p class="first"><code>sdk_tools</code> — the code run by the <code>naclsdk</code> command.</p> 83 </li> 84 </ul> 85 </li> 86 </ol> 87 <h3 id="installing-the-stable-bundle"><span id="id6"></span>Installing the stable bundle</h3> 88 <ol class="arabic"> 89 <li><p class="first">To see the SDK bundles that are available for download, go to the 90 <code>nacl_sdk</code> directory and run <code>naclsdk</code> with the <code>list</code> command. The SDK 91 includes a separate bundle for each version of Chrome/Pepper.</p> 92 <p>On Mac/Linux:</p> 93 <pre class="prettyprint"> 94 $ cd nacl_sdk 95 $ ./naclsdk list 96 </pre> 97 <p>On Windows:</p> 98 <pre class="prettyprint"> 99 > cd nacl_sdk 100 > naclsdk list 101 </pre> 102 <p>You should see output similar to this:</p> 103 <pre class="prettyprint"> 104 Bundles: 105 I: installed 106 *: update available 107 108 I sdk_tools (stable) 109 vs_addin (dev) 110 pepper_31 (post_stable) 111 pepper_32 (post_stable) 112 pepper_33 (post_stable) 113 pepper_34 (post_stable) 114 pepper_35 (stable) 115 pepper_36 (beta) 116 pepper_37 (dev) 117 pepper_canary (canary) 118 bionic_canary (canary) 119 </pre> 120 <p>The sample output above shows that several bundles are available for 121 download, and that you have already installed the latest revision of the 122 <code>sdk_tools</code> bundle, which was included in the zip file. You never need to 123 update the <code>sdk_tools</code> bundle. It is updated automatically (if necessary) 124 whenever you run <code>naclsdk</code>.</p> 125 <p>Bundles are labeled post-stable, stable, beta, dev, or canary. These labels 126 usually correspond to the current versions of Chrome. We recommend that you 127 develop against a “stable” bundle, because such bundles can be used by all 128 current Chrome users. Native Client is designed to be backward-compatible.For 129 example, applications developed with the <code>pepper_31</code> bundle can run in 130 Chrome 31, Chrome 32, etc..</p> 131 </li> 132 <li><p class="first">Run <code>naclsdk</code> with the <code>update</code> command to download recommended bundles, 133 including the current “stable” bundle.</p> 134 <p>On Mac/Linux:</p> 135 <pre class="prettyprint"> 136 $ ./naclsdk update 137 </pre> 138 <p>On Windows:</p> 139 <pre class="prettyprint"> 140 > naclsdk update 141 </pre> 142 <p>By default, <code>naclsdk</code> only downloads bundles that are recommended, 143 generally those that are “stable.” For example, if the current “stable” 144 bundle is <code>pepper_35</code>, then the <code>update</code> downloads that bundle. To 145 download the <code>pepper_36</code> bundle you must ask for it explicitly:</p> 146 <pre class="prettyprint"> 147 $ ./naclsdk update pepper_36 148 </pre> 149 </li> 150 </ol> 151 <h2 id="updating-bundles"><span id="id7"></span>Updating bundles</h2> 152 <ol class="arabic"> 153 <li><p class="first">Run <code>naclsdk</code> with the <code>list</code> command. This shows you the list of available 154 bundles and verifies which bundles you have installed.</p> 155 <p>On Mac/Linux:</p> 156 <pre class="prettyprint"> 157 $ ./naclsdk list 158 </pre> 159 <p>On Windows:</p> 160 <pre class="prettyprint"> 161 > naclsdk list 162 </pre> 163 <p>An asterisk (*) next to a bundle indicates that there is an update available 164 it. For example:</p> 165 <pre class="prettyprint"> 166 Bundles: 167 I: installed 168 *: update available 169 170 I sdk_tools (stable) 171 vs_addin (dev) 172 pepper_31 (post_stable) 173 pepper_32 (post_stable) 174 pepper_33 (post_stable) 175 pepper_34 (post_stable) 176 I* pepper_35 (stable) 177 pepper_36 (beta) 178 pepper_37 (dev) 179 pepper_canary (canary) 180 bionic_canary (canary) 181 </pre> 182 <p>If you run <code>naclsdk update</code> now, it warns you with a message similar to 183 this:</p> 184 <pre class="prettyprint"> 185 WARNING: pepper_35 already exists, but has an update available. Run update 186 with the --force option to overwrite the existing directory. Warning: This 187 will overwrite any modifications you have made within this directory. 188 </pre> 189 </li> 190 <li><p class="first">To download and install the new bundle, run:</p> 191 <p>On Mac/Linux:</p> 192 <pre class="prettyprint"> 193 $ ./naclsdk update --force 194 </pre> 195 <p>On Windows:</p> 196 <pre class="prettyprint"> 197 > naclsdk update --force 198 </pre> 199 </li> 200 </ol> 201 <h2 id="help-with-the-naclsdk-utility"><span id="id8"></span>Help with the <code>naclsdk</code> utility</h2> 202 <ol class="arabic"> 203 <li><p class="first">For more information about the <code>naclsdk</code> utility, run:</p> 204 <p>On Mac/Linux:</p> 205 <pre class="prettyprint"> 206 $ ./naclsdk help 207 </pre> 208 <p>On Windows:</p> 209 <pre class="prettyprint"> 210 > naclsdk help 211 </pre> 212 </li> 213 </ol> 214 <h2 id="next-steps"><span id="id9"></span>Next steps</h2> 215 <ul class="small-gap"> 216 <li>Browse the <a class="reference external" href="release-notes">Release Notes</a> for important 217 information about the SDK and new bundles.</li> 218 <li>If you’re just starting with Native Client, we recommend reading the 219 <a class="reference external" href="../overview">Technical Overview</a> and walking through the 220 <a class="reference external" href="devguide/tutorial/tutorial-part1">Getting Started Tutorial</a>.</li> 221 <li>If you’d rather dive in, see 222 <a class="reference external" href="devguide/devcycle/building">Building Native Client Modules</a>.</li> 223 </ul> 224 </section> 225 226 {{/partials.standard_nacl_article}} 227