1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
{{+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 “Extract All...”. A
dialog box opens; enter a location and click “Extract”.</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) — the update utility,
which is the command you run to download and update bundles.</p>
</li>
<li><p class="first"><code>sdk_cache</code> — a directory with a manifest file that lists the bundles
you have already downloaded.</p>
</li>
<li><p class="first"><code>sdk_tools</code> — 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">
> cd nacl_sdk
> 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 “stable” 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 “stable” bundle.</p>
<p>On Mac/Linux:</p>
<pre class="prettyprint">
$ ./naclsdk update
</pre>
<p>On Windows:</p>
<pre class="prettyprint">
> naclsdk update
</pre>
<p>By default, <code>naclsdk</code> only downloads bundles that are recommended,
generally those that are “stable.” For example, if the current “stable”
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">
> 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">
> 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">
> 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’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’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}}
|