OLD | NEW |
1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
2 | 2 |
3 <section id="download-the-native-client-sdk"> | 3 <section id="download-the-native-client-sdk"> |
4 <span id="download"></span><h1 id="download-the-native-client-sdk"><span id="dow
nload"></span>Download the Native Client SDK</h1> | 4 <span id="download"></span><h1 id="download-the-native-client-sdk"><span id="dow
nload"></span>Download the Native Client SDK</h1> |
5 <p>To build Native Client modules, you must download and install the Native Clie
nt | 5 <p>This page provides an overview of the Native Client SDK, and instructions for |
6 Software Development Kit (SDK). This page provides an overview of the Native | 6 downloading and installing the SDK.</p> |
7 Client SDK, and instructions for how to download and install the SDK.</p> | |
8 <div id="home"> | 7 <div id="home"> |
9 <a class="button-nacl button-download" href="http://storage.googleapis.com/nativ
eclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a> | 8 <a class="button-nacl button-download" href="http://storage.googleapis.com/nativ
eclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a> |
10 </div><h2 id="overview">Overview</h2> | 9 </div><h2 id="overview"><span id="sdk-overview"></span>Overview</h2> |
11 <p>The Native Client SDK includes the following:</p> | 10 <p>The Native Client SDK includes:</p> |
12 <ul class="small-gap"> | 11 <ul class="small-gap"> |
13 <li><strong>Support for multiple Pepper versions</strong> to compile for specifi
c minimum | 12 <li><strong>Support for multiple Pepper versions</strong> to compile for specifi
c minimum |
14 versions of Chrome.</li> | 13 versions of Chrome.</li> |
15 <li><strong>Update utility</strong> to download new bundles that are available,
as well as new | 14 <li><strong>Update utility</strong> to download new bundles and updates to exist
ing bundles.</li> |
16 versions of existing bundles.</li> | |
17 <li><strong>Toolchains</strong> to compile for Portable Native Client (PNaCl), t
raditional | 15 <li><strong>Toolchains</strong> to compile for Portable Native Client (PNaCl), t
raditional |
18 Native Client (NaCl), and for compiling architecture-specific Native Client | 16 Native Client (NaCl), and for compiling architecture-specific Native Client |
19 applications with glibc.</li> | 17 applications with glibc.</li> |
20 <li><strong>Examples</strong> Including C or C++ source files and header files i
llustrating | 18 <li><strong>Examples</strong> Including C or C++ source files and header files i
llustrating |
21 how to use NaCl and Pepper, and Makefiles to build the example with each of | 19 how to use NaCl and Pepper, and Makefiles to build the example with each of |
22 the toolchains.</li> | 20 the toolchains.</li> |
23 <li><strong>Tools</strong> for validating Native Client modules and running modu
les from the | 21 <li><strong>Tools</strong> for validating Native Client modules and running modu
les from the |
24 command line.</li> | 22 command line.</li> |
25 </ul> | 23 </ul> |
26 <p>Follow the steps below to download and install the Native Client SDK.</p> | 24 <p>Follow the steps below to download and install the Native Client SDK.</p> |
27 <h2 id="prerequisites">Prerequisites</h2> | 25 <h2 id="prerequisites"><span id="id1"></span>Prerequisites</h2> |
| 26 <h3 id="python-2-6-or-2-7"><span id="python26-27"></span>Python 2.6 or 2.7</h3> |
| 27 <p>Make sure that the Python executable is in your <code>PATH</code> variable. P
ython 2.7 is |
| 28 preferred. Python 3.x is not yet supported.</p> |
28 <ul class="small-gap"> | 29 <ul class="small-gap"> |
29 <li><p class="first"><strong>Python 2.6 or 2.7:</strong> Make sure that the Pyth
on executable is in your path. | 30 <li>On Mac and Linux, Python is likely preinstalled. Run the command <code>pytho
n -V</code> |
30 Python 2.7 is preferred. Python 3.x is not yet supported.</p> | 31 in a terminal window, and make sure that the version you have is 2.6.x or |
31 <ul class="small-gap"> | 32 2.7.x.</li> |
32 <li>On Mac and Linux, Python is likely preinstalled. Run the command “<cod
e>python | 33 <li>On Windows, you may need to install Python. Go to <a class="reference extern
al" href="http://www.python.org/download/">http://www.python.org/ |
33 -V</code>” in a terminal window, and make sure that the version you have i
s 2.6.x | 34 download/</a> and select the latest 2.x |
34 or 2.7.x.</li> | 35 version. In addition, be sure to add the Python directory (for example, |
35 <li>On Windows, you may need to install Python. Go to | 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 |
36 <a class="reference external" href="http://www.python.org/download/">http://www.
python.org/download/</a> and | 37 verify that you properly configured the PATH variable.</li> |
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="referenc
e external" href="http://en.wikipedia.org/wiki/Environment_variable">environment | |
39 variable</a>. Run | |
40 “<code>python -V</code>” from a command line to verify that you prop
erly configured | |
41 the PATH variable.</li> | |
42 </ul> | 38 </ul> |
43 </li> | 39 <h3 id="make"><span id="id2"></span>Make</h3> |
44 <li><strong>Make:</strong> On the Mac, you need to install the <code>make</code>
command on your system | 40 <p>On the Mac, you need to install <code>make</code> on your system before you c
an build and |
45 before you can build and run the examples in the SDK. One easy way to get | 41 run the examples in the SDK. One easy way to get <code>make</code>, along with s
everal |
46 <code>make</code>, along with several other useful tools, is to install | 42 other useful tools, is to install <a class="reference external" href="https://de
veloper.apple.com/technologies/tools/">Xcode Developer Tools</a>. After installi
ng Xcode, go |
47 <a class="reference external" href="https://developer.apple.com/technologies/too
ls/">Xcode Developer Tools</a>. | 43 to the XCode menu, open the Preferences dialog box then select Downloads and |
48 After installing Xcode, go to the XCode menu, open the Preferences dialog box | 44 Components. Verify that Command Line Tools are installed. If you’d rather
not |
49 then select Downloads and Components. Verify that Command Line Tools are | 45 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 sou
rce version</a> of <code>make</code>. |
50 installed. If you’d rather not install Xcode, you can download and build a
n | 46 To build the program you may also need to download and install <a class="referen
ce external" href="https://github.com/kennethreitz/osx-gcc-installer">gcc</a>.</
p> |
51 <a class="reference external" href="http://mac.softpedia.com/dyn-postdownload.ph
p?p=44632&t=4&i=1">open source version</a> of <code>make</code>. | 47 <h2 id="installing-the-sdk"><span id="id3"></span>Installing the SDK</h2> |
52 To build the command you may also need to download and install | 48 <h3 id="downloading-and-unzipping"><span id="id4"></span>Downloading and Unzippi
ng</h3> |
53 <a class="reference external" href="https://github.com/kennethreitz/osx-gcc-inst
aller">gcc</a>.</li> | |
54 </ul> | |
55 <h2 id="installing-the-sdk">Installing the SDK</h2> | |
56 <ol class="arabic"> | 49 <ol class="arabic"> |
57 <li><p class="first">Download the SDK update zip file: <a class="reference exter
nal" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_
sdk.zip">nacl_sdk.zip</a>.</p> | 50 <li><p class="first">Download the <a class="reference external" href="http://sto
rage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">SDK update z
ip file</a>.</p> |
58 </li> | 51 </li> |
59 <li><p class="first">Unzip the file:</p> | 52 <li><p class="first">Unzip the file:</p> |
60 <ul class="small-gap"> | 53 <ul class="small-gap"> |
61 <li><p class="first">On Mac/Linux, run the command “<code>unzip nacl_sdk.z
ip</code>” in a terminal | 54 <li><p class="first">On Mac/Linux, run the command <code>unzip nacl_sdk.zip</cod
e> in a terminal |
62 window.</p> | 55 window.</p> |
63 </li> | 56 </li> |
64 <li><p class="first">On Windows, right-click on the .zip file and select “
Extract All...”. A | 57 <li><p class="first">On Windows, right-click on the .zip file and select “
Extract All...”. A |
65 dialog box will open; enter a location and click “Extract”.</p> | 58 dialog box opens; enter a location and click “Extract”.</p> |
66 </li> | 59 </li> |
67 </ul> | 60 </ul> |
68 <p>A directory is created called <code>nacl_sdk</code> with the following files
and | 61 <p>A directory is created called <code>nacl_sdk</code> with the following files
and |
69 directories:</p> | 62 directories:</p> |
70 <ul class="small-gap"> | 63 <ul class="small-gap"> |
71 <li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Wind
ows) — the update utility, | 64 <li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Wind
ows) — the update utility, |
72 which is the command you run to download and update bundles.</p> | 65 which is the command you run to download and update bundles.</p> |
73 </li> | 66 </li> |
74 <li><p class="first"><code>sdk_cache</code> — a directory with a manifest
file that lists the bundles | 67 <li><p class="first"><code>sdk_cache</code> — a directory with a manifest
file that lists the bundles |
75 you have already downloaded.</p> | 68 you have already downloaded.</p> |
76 </li> | 69 </li> |
77 <li><p class="first"><code>sdk_tools</code> — the code run by the <code>na
clsdk</code> command.</p> | 70 <li><p class="first"><code>sdk_tools</code> — the code run by the <code>na
clsdk</code> command.</p> |
78 </li> | 71 </li> |
79 </ul> | 72 </ul> |
80 </li> | 73 </li> |
81 </ol> | 74 </ol> |
82 <h2 id="installing-bundles">Installing bundles</h2> | 75 <h3 id="installing-the-stable-bundle"><span id="id5"></span>Installing the stabl
e bundle</h3> |
83 <ol class="arabic"> | 76 <ol class="arabic"> |
84 <li><p class="first">To see the SDK bundles that are available for download, go
to the | 77 <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 “<co
de>list</code>” command. The | 78 <code>nacl_sdk</code> directory and run <code>naclsdk</code> with the <code>list
</code> command. The SDK |
86 SDK includes a separate bundle for each version of Chrome/Pepper.</p> | 79 includes a separate bundle for each version of Chrome/Pepper.</p> |
87 <p>On Mac/Linux:</p> | 80 <p>On Mac/Linux:</p> |
88 <pre class="prettyprint"> | 81 <pre class="prettyprint"> |
89 $ cd nacl_sdk | 82 $ cd nacl_sdk |
90 $ ./naclsdk list | 83 $ ./naclsdk list |
91 </pre> | 84 </pre> |
92 <p>On Windows:</p> | 85 <p>On Windows:</p> |
93 <pre class="prettyprint"> | 86 <pre class="prettyprint"> |
94 > cd nacl_sdk | 87 > cd nacl_sdk |
95 > naclsdk list | 88 > naclsdk list |
96 </pre> | 89 </pre> |
(...skipping 10 matching lines...) Expand all Loading... |
107 pepper_33 (post_stable) | 100 pepper_33 (post_stable) |
108 pepper_34 (post_stable) | 101 pepper_34 (post_stable) |
109 pepper_35 (stable) | 102 pepper_35 (stable) |
110 pepper_36 (beta) | 103 pepper_36 (beta) |
111 pepper_37 (dev) | 104 pepper_37 (dev) |
112 pepper_canary (canary) | 105 pepper_canary (canary) |
113 bionic_canary (canary) | 106 bionic_canary (canary) |
114 </pre> | 107 </pre> |
115 <p>The sample output above shows that several bundles are available for | 108 <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 | 109 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 | 110 <code>sdk_tools</code> bundle, which was included in the zip file. You never nee
d to |
118 bundle is labeled post-stable, stable, beta, dev, or canary. These labels | 111 update the <code>sdk_tools</code> bundle. It is updated automatically (if necess
ary) |
119 usually correspond to the current versions of Chrome.</p> | 112 whenever you run <code>naclsdk</code>.</p> |
120 <p>We recommend that you download and use a “stable” bundle, because | 113 <p>Bundles are labeled post-stable, stable, beta, dev, or canary. These labels |
121 applications developed with “stable” bundles can be used by all curr
ent | 114 usually correspond to the current versions of Chrome. We recommend that you |
122 Chrome users. This is because Native Client is designed to be | 115 develop against a “stable” bundle, because such bundles can be used
by all |
123 backward-compatible (for example, applications developed with the | 116 current Chrome users. Native Client is designed to be backward-compatible.For |
124 <code>pepper_31</code> bundle can run in Chrome 31, Chrome 32, etc.).</p> | 117 example, applications developed with the <code>pepper_31</code> bundle can run i
n |
| 118 Chrome 31, Chrome 32, etc..</p> |
125 </li> | 119 </li> |
126 <li><p class="first">Run <code>naclsdk</code> with the “update” comm
and to download recommended bundles.</p> | 120 <li><p class="first">Run <code>naclsdk</code> with the <code>update</code> comma
nd to download recommended bundles, |
| 121 including the current “stable” bundle.</p> |
127 <p>On Mac/Linux:</p> | 122 <p>On Mac/Linux:</p> |
128 <pre class="prettyprint"> | 123 <pre class="prettyprint"> |
129 $ ./naclsdk update | 124 $ ./naclsdk update |
130 </pre> | 125 </pre> |
131 <p>On Windows:</p> | 126 <p>On Windows:</p> |
132 <pre class="prettyprint"> | 127 <pre class="prettyprint"> |
133 > naclsdk update | 128 > naclsdk update |
134 </pre> | 129 </pre> |
135 <p>By default, <code>naclsdk</code> only downloads bundles that are recommended&
#8212; | 130 <p>By default, <code>naclsdk</code> only downloads bundles that are recommended, |
136 generally those that are “stable.” Continuing with the earlier examp
le, the | 131 generally those that are “stable.” For example, if the current ̶
0;stable” |
137 “update” command would only download the <code>pepper_35</code> bund
le, since the | 132 bundle is <code>pepper_35</code>, then the <code>update</code> downloads that bu
ndle. To |
138 bundles <code>pepper_36</code> and greater are not yet stable. If you want the | 133 download the <code>pepper_36</code> bundle you must ask for it explicitly:</p> |
139 <code>pepper_36</code> bundle, you must ask for it explicitly:</p> | |
140 <pre class="prettyprint"> | 134 <pre class="prettyprint"> |
141 $ ./naclsdk update pepper_36 | 135 $ ./naclsdk update pepper_36 |
142 </pre> | 136 </pre> |
143 </li> | 137 </li> |
144 </ol> | 138 </ol> |
145 <aside class="note"> | 139 <h2 id="updating-bundles"><span id="id6"></span>Updating bundles</h2> |
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></block
quote> | |
149 | |
150 </aside> | |
151 <h2 id="updating-bundles">Updating bundles</h2> | |
152 <ol class="arabic"> | 140 <ol class="arabic"> |
153 <li><p class="first">Run <code>naclsdk</code> with the “list” comman
d. This shows you the list of available | 141 <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> | 142 bundles and verifies which bundles you have installed.</p> |
155 <p>On Mac/Linux:</p> | 143 <p>On Mac/Linux:</p> |
156 <pre class="prettyprint"> | 144 <pre class="prettyprint"> |
157 $ ./naclsdk list | 145 $ ./naclsdk list |
158 </pre> | 146 </pre> |
159 <p>On Windows:</p> | 147 <p>On Windows:</p> |
160 <pre class="prettyprint"> | 148 <pre class="prettyprint"> |
161 > naclsdk list | 149 > naclsdk list |
162 </pre> | 150 </pre> |
163 <p>If an update is available, you’ll see something like this.:</p> | 151 <p>An asterisk (*) next to a bundle indicates that there is an update available |
| 152 it. For example:</p> |
164 <pre class="prettyprint"> | 153 <pre class="prettyprint"> |
165 Bundles: | 154 Bundles: |
166 I: installed | 155 I: installed |
167 *: update available | 156 *: update available |
168 | 157 |
169 I sdk_tools (stable) | 158 I sdk_tools (stable) |
170 vs_addin (dev) | 159 vs_addin (dev) |
171 pepper_31 (post_stable) | 160 pepper_31 (post_stable) |
172 pepper_32 (post_stable) | 161 pepper_32 (post_stable) |
173 pepper_33 (post_stable) | 162 pepper_33 (post_stable) |
174 pepper_34 (post_stable) | 163 pepper_34 (post_stable) |
175 I* pepper_35 (stable) | 164 I* pepper_35 (stable) |
176 pepper_36 (beta) | 165 pepper_36 (beta) |
177 pepper_37 (dev) | 166 pepper_37 (dev) |
178 pepper_canary (canary) | 167 pepper_canary (canary) |
179 bionic_canary (canary) | 168 bionic_canary (canary) |
180 </pre> | 169 </pre> |
181 <p>An asterisk next to a bundle indicates that there is an update available it. | 170 <p>If you run <code>naclsdk update</code> now, it warns you with a message simil
ar to |
182 If you run “<code>naclsdk update</code>” now, it warns you with a me
ssage similar to | |
183 this:</p> | 171 this:</p> |
184 <pre class="prettyprint"> | 172 <pre class="prettyprint"> |
185 WARNING: pepper_35 already exists, but has an update available. Run update | 173 WARNING: pepper_35 already exists, but has an update available. Run update |
186 with the --force option to overwrite the existing directory. Warning: This | 174 with the --force option to overwrite the existing directory. Warning: This |
187 will overwrite any modifications you have made within this directory. | 175 will overwrite any modifications you have made within this directory. |
188 </pre> | 176 </pre> |
189 </li> | 177 </li> |
190 <li><p class="first">To download and install the new bundle, run:</p> | 178 <li><p class="first">To download and install the new bundle, run:</p> |
191 <p>On Mac/Linux:</p> | 179 <p>On Mac/Linux:</p> |
192 <pre class="prettyprint"> | 180 <pre class="prettyprint"> |
193 $ ./naclsdk update --force | 181 $ ./naclsdk update --force |
194 </pre> | 182 </pre> |
195 <p>On Windows:</p> | 183 <p>On Windows:</p> |
196 <pre class="prettyprint"> | 184 <pre class="prettyprint"> |
197 > naclsdk update --force | 185 > naclsdk update --force |
198 </pre> | 186 </pre> |
199 </li> | 187 </li> |
200 </ol> | 188 </ol> |
201 <h2 id="help-with-the-naclsdk-utility">Help with the <code>naclsdk</code> utilit
y</h2> | 189 <h2 id="help-with-the-naclsdk-utility"><span id="id7"></span>Help with the <code
>naclsdk</code> utility</h2> |
202 <ol class="arabic"> | 190 <ol class="arabic"> |
203 <li><p class="first">For more information about the <code>naclsdk</code> utility
, run:</p> | 191 <li><p class="first">For more information about the <code>naclsdk</code> utility
, run:</p> |
204 <p>On Mac/Linux:</p> | 192 <p>On Mac/Linux:</p> |
205 <pre class="prettyprint"> | 193 <pre class="prettyprint"> |
206 $ ./naclsdk help | 194 $ ./naclsdk help |
207 </pre> | 195 </pre> |
208 <p>On Windows:</p> | 196 <p>On Windows:</p> |
209 <pre class="prettyprint"> | 197 <pre class="prettyprint"> |
210 > naclsdk help | 198 > naclsdk help |
211 </pre> | 199 </pre> |
212 </li> | 200 </li> |
213 </ol> | 201 </ol> |
214 <p><strong>Next steps:</strong></p> | 202 <h2 id="next-steps"><span id="id8"></span>Next steps</h2> |
215 <ul class="small-gap"> | 203 <ul class="small-gap"> |
216 <li>Browse through the <a class="reference external" href="release-notes">Releas
e Notes</a> for important | 204 <li>Browse the <a class="reference external" href="release-notes">Release Notes<
/a> for important |
217 information about the SDK and new bundles.</li> | 205 information about the SDK and new bundles.</li> |
218 <li>If you’re just starting with Native Client, we recommend reading the | 206 <li>If you’re just starting with Native Client, we recommend reading the |
219 <a class="reference external" href="../overview">Technical Overview</a> and walk
ing through the | 207 <a class="reference external" href="../overview">Technical Overview</a> and walk
ing through the |
220 <a class="reference external" href="devguide/tutorial/tutorial-part1">Getting St
arted Tutorial</a>.</li> | 208 <a class="reference external" href="devguide/tutorial/tutorial-part1">Getting St
arted Tutorial</a>.</li> |
221 <li>If you’d rather dive into information about the toolchains, see | 209 <li>If you’d rather dive in, see |
222 <a class="reference external" href="devguide/devcycle/building">Building Native
Client Modules</a>.</li> | 210 <a class="reference external" href="devguide/devcycle/building">Building Native
Client Modules</a>.</li> |
223 </ul> | 211 </ul> |
224 </section> | 212 </section> |
225 | 213 |
226 {{/partials.standard_nacl_article}} | 214 {{/partials.standard_nacl_article}} |
OLD | NEW |