Skip direct map from apk check for Samsung Mega.
[chromium-blink-merge.git] / native_client_sdk / doc_generated / sdk / download.html
blobacb1b324a35abef81e4d835353d1ecfe27ad0eef
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>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="python27"></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.7.x.</li>
32 <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/
33 download/</a> and select the latest 2.x
34 version. In addition, be sure to add the Python directory (for example,
35 <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 verify that you properly configured the PATH variable.</li>
37 </ul>
38 <h3 id="make"><span id="id2"></span>Make</h3>
39 <ul class="small-gap">
40 <li>On the Mac, you need to install <code>make</code> on your system before you can build
41 and run the examples in the SDK. One easy way to get <code>make</code>, along with
42 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,
43 go to the XCode menu, open the Preferences dialog box then select Downloads
44 and Components. Verify that Command Line Tools are installed. If you&#8217;d rather
45 not install Xcode, you can download and build an <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>.
46 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>
47 <li>On Windows, the Native Client SDK includes a copy of GNU Make.</li>
48 </ul>
49 <h2 id="platforms"><span id="id3"></span>Platforms</h2>
50 <p>Native Client supports several operating systems, including Windows, Linux, OSX,
51 and ChromeOS. It supports several architectures including on x86-32, x86-64,
52 ARM, and MIPS.</p>
53 <h2 id="versions"><span id="versioning"></span>Versions</h2>
54 <p>Chrome is released on a six week cycle, and developer versions of Chrome are
55 pushed to the public beta channel three weeks before each release. As with any
56 software, each release of Chrome may include changes to Native Client and the
57 Pepper interfaces that may require modification to existing applications.
58 However, modules compiled for one version of Pepper/Chrome should work with
59 subsequent versions of Pepper/Chrome. The SDK includes multiple versions of the
60 Pepper APIs to help developers make adjustments to API changes and take
61 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>
62 <h2 id="installing-the-sdk"><span id="id4"></span>Installing the SDK</h2>
63 <h3 id="downloading-and-unzipping"><span id="id5"></span>Downloading and Unzipping</h3>
64 <ol class="arabic">
65 <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>
66 </li>
67 <li><p class="first">Unzip the file:</p>
68 <ul class="small-gap">
69 <li><p class="first">On Mac/Linux, run the command <code>unzip nacl_sdk.zip</code> in a terminal
70 window.</p>
71 </li>
72 <li><p class="first">On Windows, right-click on the .zip file and select &#8220;Extract All...&#8221;. A
73 dialog box opens; enter a location and click &#8220;Extract&#8221;.</p>
74 </li>
75 </ul>
76 <p>A directory is created called <code>nacl_sdk</code> with the following files and
77 directories:</p>
78 <ul class="small-gap">
79 <li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Windows) &#8212; the update utility,
80 which is the command you run to download and update bundles.</p>
81 </li>
82 <li><p class="first"><code>sdk_cache</code> &#8212; a directory with a manifest file that lists the bundles
83 you have already downloaded.</p>
84 </li>
85 <li><p class="first"><code>sdk_tools</code> &#8212; the code run by the <code>naclsdk</code> command.</p>
86 </li>
87 </ul>
88 </li>
89 </ol>
90 <h3 id="installing-the-stable-bundle"><span id="id6"></span>Installing the stable bundle</h3>
91 <ol class="arabic">
92 <li><p class="first">To see the SDK bundles that are available for download, go to the
93 <code>nacl_sdk</code> directory and run <code>naclsdk</code> with the <code>list</code> command. The SDK
94 includes a separate bundle for each version of Chrome/Pepper.</p>
95 <p>On Mac/Linux:</p>
96 <pre class="prettyprint">
97 $ cd nacl_sdk
98 $ ./naclsdk list
99 </pre>
100 <p>On Windows:</p>
101 <pre class="prettyprint">
102 &gt; cd nacl_sdk
103 &gt; naclsdk list
104 </pre>
105 <p>You should see output similar to this:</p>
106 <pre class="prettyprint">
107 Bundles:
108 I: installed
109 *: update available
111 I sdk_tools (stable)
112 vs_addin (dev)
113 pepper_31 (post_stable)
114 pepper_32 (post_stable)
115 pepper_33 (post_stable)
116 pepper_34 (post_stable)
117 pepper_35 (stable)
118 pepper_36 (beta)
119 pepper_37 (dev)
120 pepper_canary (canary)
121 bionic_canary (canary)
122 </pre>
123 <p>The sample output above shows that several bundles are available for
124 download, and that you have already installed the latest revision of the
125 <code>sdk_tools</code> bundle, which was included in the zip file. You never need to
126 update the <code>sdk_tools</code> bundle. It is updated automatically (if necessary)
127 whenever you run <code>naclsdk</code>.</p>
128 <p>Bundles are labeled post-stable, stable, beta, dev, or canary. These labels
129 usually correspond to the current versions of Chrome. We recommend that you
130 develop against a &#8220;stable&#8221; bundle, because such bundles can be used by all
131 current Chrome users. Native Client is designed to be backward-compatible.For
132 example, applications developed with the <code>pepper_37</code> bundle can run in
133 Chrome 37, Chrome 38, etc..</p>
134 </li>
135 <li><p class="first">Run <code>naclsdk</code> with the <code>update</code> command to download recommended bundles,
136 including the current &#8220;stable&#8221; bundle.</p>
137 <p>On Mac/Linux:</p>
138 <pre class="prettyprint">
139 $ ./naclsdk update
140 </pre>
141 <p>On Windows:</p>
142 <pre class="prettyprint">
143 &gt; naclsdk update
144 </pre>
145 <p>By default, <code>naclsdk</code> only downloads bundles that are recommended,
146 generally those that are &#8220;stable.&#8221; For example, if the current &#8220;stable&#8221;
147 bundle is <code>pepper_35</code>, then the <code>update</code> downloads that bundle. To
148 download the <code>pepper_36</code> bundle you must ask for it explicitly:</p>
149 <pre class="prettyprint">
150 $ ./naclsdk update pepper_36
151 </pre>
152 </li>
153 </ol>
154 <h2 id="updating-bundles"><span id="id7"></span>Updating bundles</h2>
155 <ol class="arabic">
156 <li><p class="first">Run <code>naclsdk</code> with the <code>list</code> command. This shows you the list of available
157 bundles and verifies which bundles you have installed.</p>
158 <p>On Mac/Linux:</p>
159 <pre class="prettyprint">
160 $ ./naclsdk list
161 </pre>
162 <p>On Windows:</p>
163 <pre class="prettyprint">
164 &gt; naclsdk list
165 </pre>
166 <p>An asterisk (*) next to a bundle indicates that there is an update available
167 it. For example:</p>
168 <pre class="prettyprint">
169 Bundles:
170 I: installed
171 *: update available
173 I sdk_tools (stable)
174 vs_addin (dev)
175 pepper_31 (post_stable)
176 pepper_32 (post_stable)
177 pepper_33 (post_stable)
178 pepper_34 (post_stable)
179 I* pepper_35 (stable)
180 pepper_36 (beta)
181 pepper_37 (dev)
182 pepper_canary (canary)
183 bionic_canary (canary)
184 </pre>
185 <p>If you run <code>naclsdk update</code> now, it warns you with a message similar to
186 this:</p>
187 <pre class="prettyprint">
188 WARNING: pepper_35 already exists, but has an update available. Run update
189 with the --force option to overwrite the existing directory. Warning: This
190 will overwrite any modifications you have made within this directory.
191 </pre>
192 </li>
193 <li><p class="first">To download and install the new bundle, run:</p>
194 <p>On Mac/Linux:</p>
195 <pre class="prettyprint">
196 $ ./naclsdk update --force
197 </pre>
198 <p>On Windows:</p>
199 <pre class="prettyprint">
200 &gt; naclsdk update --force
201 </pre>
202 </li>
203 </ol>
204 <h2 id="help-with-the-naclsdk-utility"><span id="id8"></span>Help with the <code>naclsdk</code> utility</h2>
205 <ol class="arabic">
206 <li><p class="first">For more information about the <code>naclsdk</code> utility, run:</p>
207 <p>On Mac/Linux:</p>
208 <pre class="prettyprint">
209 $ ./naclsdk help
210 </pre>
211 <p>On Windows:</p>
212 <pre class="prettyprint">
213 &gt; naclsdk help
214 </pre>
215 </li>
216 </ol>
217 <h2 id="next-steps"><span id="id9"></span>Next steps</h2>
218 <ul class="small-gap">
219 <li>Browse the <a class="reference external" href="release-notes">Release Notes</a> for important
220 information about the SDK and new bundles.</li>
221 <li>If you&#8217;re just starting with Native Client, we recommend reading the
222 <a class="reference external" href="../overview">Technical Overview</a> and walking through the
223 <a class="reference external" href="devguide/tutorial/tutorial-part1">Getting Started Tutorial</a>.</li>
224 <li>If you&#8217;d rather dive in, see
225 <a class="reference external" href="devguide/devcycle/building">Building Native Client Modules</a>.</li>
226 </ul>
227 </section>
229 {{/partials.standard_nacl_article}}