Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / native_client_sdk / doc_generated / sdk / download.html
blob3c471f495bef2bc01e96de99356b9c22e7518663
1 {{+bindTo:partials.standard_nacl_article}}
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>To build Native Client modules, you must download and install the Native Client
6 Software Development Kit (SDK). This page provides an overview of the Native
7 Client SDK, and instructions for how to download and install the SDK.</p>
8 <div id="home">
9 <a class="button-nacl button-download" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a>
10 </div><h2 id="overview">Overview</h2>
11 <p>The Native Client SDK includes the following:</p>
12 <ul class="small-gap">
13 <li><strong>Support for multiple Pepper versions</strong> to compile for specific minimum
14 versions of Chrome.</li>
15 <li><strong>Update utility</strong> to download new bundles that are available, as well as new
16 versions of existing bundles.</li>
17 <li><strong>Toolchains</strong> to compile for Portable Native Client (PNaCl), traditional
18 Native Client (NaCl), and for compiling architecture-specific Native Client
19 applications with glibc.</li>
20 <li><strong>Examples</strong> Including C or C++ source files and header files illustrating
21 how to use NaCl and Pepper, and Makefiles to build the example with each of
22 the toolchains.</li>
23 <li><strong>Tools</strong> for validating Native Client modules and running modules from the
24 command line.</li>
25 </ul>
26 <p>Follow the steps below to download and install the Native Client SDK.</p>
27 <h2 id="prerequisites">Prerequisites</h2>
28 <ul class="small-gap">
29 <li><p class="first"><strong>Python 2.6 or 2.7:</strong> Make sure that the Python executable is in your path.
30 Python 2.7 is preferred. Python 3.x is not yet supported.</p>
31 <ul class="small-gap">
32 <li>On Mac and Linux, Python is likely preinstalled. Run the command &#8220;<code>python
33 -V</code>&#8221; in a terminal window, and make sure that the version you have is 2.6.x
34 or 2.7.x.</li>
35 <li>On Windows, you may need to install Python. Go to
36 <a class="reference external" href="http://www.python.org/download/">http://www.python.org/download/</a> and
37 select the latest 2.x version. In addition, be sure to add the Python
38 directory (for example, <code>C:\python27</code>) to the PATH <a class="reference external" href="http://en.wikipedia.org/wiki/Environment_variable">environment
39 variable</a>. Run
40 &#8220;<code>python -V</code>&#8221; from a command line to verify that you properly configured
41 the PATH variable.</li>
42 </ul>
43 </li>
44 <li><strong>Make:</strong> On the Mac, you need to install the <code>make</code> command on your system
45 before you can build and run the examples in the SDK. One easy way to get
46 <code>make</code>, along with several other useful tools, is to install
47 <a class="reference external" href="https://developer.apple.com/technologies/tools/">Xcode Developer Tools</a>.
48 After installing Xcode, go to the XCode menu, open the Preferences dialog box
49 then select Downloads and Components. Verify that Command Line Tools are
50 installed. If you&#8217;d rather not install Xcode, you can download and build an
51 <a class="reference external" href="http://mac.softpedia.com/dyn-postdownload.php?p=44632&amp;t=4&amp;i=1">open source version</a> of <code>make</code>.
52 To build the command you may also need to download and install
53 <a class="reference external" href="https://github.com/kennethreitz/osx-gcc-installer">gcc</a>.</li>
54 </ul>
55 <h2 id="installing-the-sdk">Installing the SDK</h2>
56 <ol class="arabic">
57 <li><p class="first">Download the SDK update zip file: <a class="reference external" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">nacl_sdk.zip</a>.</p>
58 </li>
59 <li><p class="first">Unzip the file:</p>
60 <ul class="small-gap">
61 <li><p class="first">On Mac/Linux, run the command &#8220;<code>unzip nacl_sdk.zip</code>&#8221; in a terminal
62 window.</p>
63 </li>
64 <li><p class="first">On Windows, right-click on the .zip file and select &#8220;Extract All...&#8221;. A
65 dialog box will open; enter a location and click &#8220;Extract&#8221;.</p>
66 </li>
67 </ul>
68 <p>A directory is created called <code>nacl_sdk</code> with the following files and
69 directories:</p>
70 <ul class="small-gap">
71 <li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Windows) &#8212; the update utility,
72 which is the command you run to download and update bundles.</p>
73 </li>
74 <li><p class="first"><code>sdk_cache</code> &#8212; a directory with a manifest file that lists the bundles
75 you have already downloaded.</p>
76 </li>
77 <li><p class="first"><code>sdk_tools</code> &#8212; the code run by the <code>naclsdk</code> command.</p>
78 </li>
79 </ul>
80 </li>
81 </ol>
82 <h2 id="installing-bundles">Installing bundles</h2>
83 <ol class="arabic">
84 <li><p class="first">To see the SDK bundles that are available for download, go to the
85 <code>nacl_sdk</code> directory and run <code>naclsdk</code> with the &#8220;<code>list</code>&#8221; command. The
86 SDK includes a separate bundle for each version of Chrome/Pepper.</p>
87 <p>On Mac/Linux:</p>
88 <pre class="prettyprint">
89 $ cd nacl_sdk
90 $ ./naclsdk list
91 </pre>
92 <p>On Windows:</p>
93 <pre class="prettyprint">
94 &gt; cd nacl_sdk
95 &gt; naclsdk list
96 </pre>
97 <p>You should see output similar to this:</p>
98 <pre class="prettyprint">
99 Bundles:
100 I: installed
101 *: update available
103 I sdk_tools (stable)
104 vs_addin (dev)
105 pepper_31 (post_stable)
106 pepper_32 (post_stable)
107 pepper_33 (post_stable)
108 pepper_34 (post_stable)
109 pepper_35 (stable)
110 pepper_36 (beta)
111 pepper_37 (dev)
112 pepper_canary (canary)
113 bionic_canary (canary)
114 </pre>
115 <p>The sample output above shows that several bundles are available for
116 download, and that you have already installed the latest revision of the
117 <code>sdk_tools</code> bundle. (It was included in the zip file you downloaded.) Each
118 bundle is labeled post-stable, stable, beta, dev, or canary. These labels
119 usually correspond to the current versions of Chrome.</p>
120 <p>We recommend that you download and use a &#8220;stable&#8221; bundle, because
121 applications developed with &#8220;stable&#8221; bundles can be used by all current
122 Chrome users. This is because Native Client is designed to be
123 backward-compatible (for example, applications developed with the
124 <code>pepper_31</code> bundle can run in Chrome 31, Chrome 32, etc.).</p>
125 </li>
126 <li><p class="first">Run <code>naclsdk</code> with the &#8220;update&#8221; command to download recommended bundles.</p>
127 <p>On Mac/Linux:</p>
128 <pre class="prettyprint">
129 $ ./naclsdk update
130 </pre>
131 <p>On Windows:</p>
132 <pre class="prettyprint">
133 &gt; naclsdk update
134 </pre>
135 <p>By default, <code>naclsdk</code> only downloads bundles that are recommended&#8212;
136 generally those that are &#8220;stable.&#8221; Continuing with the earlier example, the
137 &#8220;update&#8221; command would only download the <code>pepper_35</code> bundle, since the
138 bundles <code>pepper_36</code> and greater are not yet stable. If you want the
139 <code>pepper_36</code> bundle, you must ask for it explicitly:</p>
140 <pre class="prettyprint">
141 $ ./naclsdk update pepper_36
142 </pre>
143 </li>
144 </ol>
145 <aside class="note">
146 <blockquote>
147 <div>You never need to update the <code>sdk_tools</code> bundle. It is updated
148 automatically (if necessary) whenever you run <code>naclsdk</code>.</div></blockquote>
150 </aside>
151 <h2 id="updating-bundles">Updating bundles</h2>
152 <ol class="arabic">
153 <li><p class="first">Run <code>naclsdk</code> with the &#8220;list&#8221; 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 &gt; naclsdk list
162 </pre>
163 <p>If an update is available, you&#8217;ll see something like this.:</p>
164 <pre class="prettyprint">
165 Bundles:
166 I: installed
167 *: update available
169 I sdk_tools (stable)
170 vs_addin (dev)
171 pepper_31 (post_stable)
172 pepper_32 (post_stable)
173 pepper_33 (post_stable)
174 pepper_34 (post_stable)
175 I* pepper_35 (stable)
176 pepper_36 (beta)
177 pepper_37 (dev)
178 pepper_canary (canary)
179 bionic_canary (canary)
180 </pre>
181 <p>An asterisk next to a bundle indicates that there is an update available it.
182 If you run &#8220;<code>naclsdk update</code>&#8221; 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 &gt; naclsdk update --force
198 </pre>
199 </li>
200 </ol>
201 <h2 id="help-with-the-naclsdk-utility">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 &gt; naclsdk help
211 </pre>
212 </li>
213 </ol>
214 <p><strong>Next steps:</strong></p>
215 <ul class="small-gap">
216 <li>Browse through 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&#8217;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&#8217;d rather dive into information about the toolchains, see
222 <a class="reference external" href="/devguide/devcycle/building">Building Native Client Modules</a>.</li>
223 </ul>
224 </section>
226 {{/partials.standard_nacl_article}}