OLD | NEW |
---|---|
1 .. _download: | 1 .. _download: |
2 | 2 |
3 Download the Native Client SDK | 3 Download the Native Client SDK |
4 ============================== | 4 ============================== |
5 | 5 |
6 To build Native Client modules, you must download and install the Native Client | 6 This page provides an overview of the Native Client SDK, and instructions for |
7 Software Development Kit (SDK). This page provides an overview of the Native | 7 downloading and installing the SDK. |
8 Client SDK, and instructions for how to download and install the SDK. | |
9 | 8 |
10 .. raw:: html | 9 .. raw:: html |
11 | 10 |
12 <div id="home"> | 11 <div id="home"> |
13 <a class="button-nacl button-download" href="http://storage.googleapis.com/nat iveclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a> | 12 <a class="button-nacl button-download" href="http://storage.googleapis.com/nat iveclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a> |
14 </div> | 13 </div> |
15 | 14 |
15 .. _sdk-overview: | |
16 | |
16 Overview | 17 Overview |
17 -------- | 18 -------- |
18 | 19 |
19 The Native Client SDK includes the following: | 20 The Native Client SDK includes: |
20 | 21 |
21 - **Support for multiple Pepper versions** to compile for specific minimum | 22 - **Support for multiple Pepper versions** to compile for specific minimum |
22 versions of Chrome. | 23 versions of Chrome. |
23 - **Update utility** to download new bundles that are available, as well as new | 24 - **Update utility** to download new bundles and updates to existing bundles. |
24 versions of existing bundles. | |
25 - **Toolchains** to compile for Portable Native Client (PNaCl), traditional | 25 - **Toolchains** to compile for Portable Native Client (PNaCl), traditional |
26 Native Client (NaCl), and for compiling architecture-specific Native Client | 26 Native Client (NaCl), and for compiling architecture-specific Native Client |
27 applications with glibc. | 27 applications with glibc. |
28 - **Examples** Including C or C++ source files and header files illustrating | 28 - **Examples** Including C or C++ source files and header files illustrating |
29 how to use NaCl and Pepper, and Makefiles to build the example with each of | 29 how to use NaCl and Pepper, and Makefiles to build the example with each of |
30 the toolchains. | 30 the toolchains. |
31 - **Tools** for validating Native Client modules and running modules from the | 31 - **Tools** for validating Native Client modules and running modules from the |
32 command line. | 32 command line. |
33 | 33 |
34 Follow the steps below to download and install the Native Client SDK. | 34 Follow the steps below to download and install the Native Client SDK. |
35 | 35 |
36 .. _prerequisites: | |
37 | |
36 Prerequisites | 38 Prerequisites |
37 ------------- | 39 ------------- |
38 | 40 |
39 * **Python 2.6 or 2.7:** Make sure that the Python executable is in your path. | 41 .. _python26-27: |
JF
2014/09/22 20:02:57
This should probably be updated to _python_prereq
| |
40 Python 2.7 is preferred. Python 3.x is not yet supported. | 42 |
43 Python 2.7 | |
44 ^^^^^^^^^^^^^^^^^ | |
45 | |
46 Make sure that the Python executable is in your ``PATH`` variable. Python 3.x is | |
47 not yet supported. | |
41 | 48 |
42 * On Mac and Linux, Python is likely preinstalled. Run the command "``python | 49 * On Mac and Linux, Python is likely preinstalled. Run the command ``python -V`` |
43 -V``" in a terminal window, and make sure that the version you have is 2.6.x | 50 in a terminal window, and make sure that the version you have is 2.6.x or |
44 or 2.7.x. | 51 2.7.x. |
45 * On Windows, you may need to install Python. Go to | 52 * On Windows, you may need to install Python. Go to `http://www.python.org/ |
46 `http://www.python.org/download/ <http://www.python.org/download/>`_ and | 53 download/ <http://www.python.org/download/>`_ and select the latest 2.x |
47 select the latest 2.x version. In addition, be sure to add the Python | 54 version. In addition, be sure to add the Python directory (for example, |
48 directory (for example, ``C:\python27``) to the PATH `environment | 55 ``C:\python27``) to the ``PATH`` `environment variable <http://en.wikipedia. |
49 variable <http://en.wikipedia.org/wiki/Environment_variable>`_. Run | 56 org/wiki/Environment_variable>`_. Run ``python -V`` from a command line to |
50 "``python -V``" from a command line to verify that you properly configured | 57 verify that you properly configured the PATH variable. |
51 the PATH variable. | |
52 | 58 |
53 * **Make:** On the Mac, you need to install the ``make`` command on your system | 59 .. _make: |
54 before you can build and run the examples in the SDK. One easy way to get | 60 |
55 ``make``, along with several other useful tools, is to install | 61 Make |
56 `Xcode Developer Tools <https://developer.apple.com/technologies/tools/>`_. | 62 ^^^^ |
57 After installing Xcode, go to the XCode menu, open the Preferences dialog box | 63 |
58 then select Downloads and Components. Verify that Command Line Tools are | 64 * On the Mac, you need to install ``make`` on your system before you can build |
59 installed. If you'd rather not install Xcode, you can download and build an | 65 and run the examples in the SDK. One easy way to get ``make``, along with |
60 `open source version | 66 several other useful tools, is to install `Xcode Developer Tools |
67 <https://developer.apple.com/technologies/tools/>`_. After installing Xcode, | |
68 go to the XCode menu, open the Preferences dialog box then select Downloads | |
69 and Components. Verify that Command Line Tools are installed. If you'd rather | |
70 not install Xcode, you can download and build an `open source version | |
61 <http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of ``make``. | 71 <http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of ``make``. |
62 To build the command you may also need to download and install | 72 To build the program you may also need to download and install `gcc |
63 `gcc <https://github.com/kennethreitz/osx-gcc-installer>`_. | 73 <https://github.com/kennethreitz/osx-gcc-installer>`_. |
74 * On Windows, the Native Client SDK includes a copy of GNU Make. | |
75 | |
76 .. _installing-the-sdk: | |
64 | 77 |
65 Installing the SDK | 78 Installing the SDK |
66 ------------------ | 79 ------------------ |
67 | 80 |
68 #. Download the SDK update zip file: `nacl_sdk.zip | 81 .. _downloading-and-unzipping: |
82 | |
83 Downloading and Unzipping | |
84 ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
85 | |
86 #. Download the `SDK update zip file | |
69 <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip >`_. | 87 <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip >`_. |
70 | 88 |
71 #. Unzip the file: | 89 #. Unzip the file: |
72 | 90 |
73 * On Mac/Linux, run the command "``unzip nacl_sdk.zip``" in a terminal | 91 * On Mac/Linux, run the command ``unzip nacl_sdk.zip`` in a terminal |
74 window. | 92 window. |
75 * On Windows, right-click on the .zip file and select "Extract All...". A | 93 * On Windows, right-click on the .zip file and select "Extract All...". A |
76 dialog box will open; enter a location and click "Extract". | 94 dialog box opens; enter a location and click "Extract". |
77 | 95 |
78 A directory is created called ``nacl_sdk`` with the following files and | 96 A directory is created called ``nacl_sdk`` with the following files and |
79 directories: | 97 directories: |
80 | 98 |
81 * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility, | 99 * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility, |
82 which is the command you run to download and update bundles. | 100 which is the command you run to download and update bundles. |
83 * ``sdk_cache`` --- a directory with a manifest file that lists the bundles | 101 * ``sdk_cache`` --- a directory with a manifest file that lists the bundles |
84 you have already downloaded. | 102 you have already downloaded. |
85 * ``sdk_tools`` --- the code run by the ``naclsdk`` command. | 103 * ``sdk_tools`` --- the code run by the ``naclsdk`` command. |
86 | 104 |
87 .. installing-bundles: | 105 .. _installing-the-stable-bundle: |
88 | 106 |
89 Installing bundles | 107 Installing the stable bundle |
90 ------------------ | 108 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
91 | 109 |
92 #. To see the SDK bundles that are available for download, go to the | 110 #. To see the SDK bundles that are available for download, go to the |
93 ``nacl_sdk`` directory and run ``naclsdk`` with the "``list``" command. The | 111 ``nacl_sdk`` directory and run ``naclsdk`` with the ``list`` command. The SDK |
94 SDK includes a separate bundle for each version of Chrome/Pepper. | 112 includes a separate bundle for each version of Chrome/Pepper. |
95 | 113 |
96 On Mac/Linux:: | 114 On Mac/Linux:: |
97 | 115 |
98 $ cd nacl_sdk | 116 $ cd nacl_sdk |
99 $ ./naclsdk list | 117 $ ./naclsdk list |
100 | 118 |
101 On Windows:: | 119 On Windows:: |
102 | 120 |
103 > cd nacl_sdk | 121 > cd nacl_sdk |
104 > naclsdk list | 122 > naclsdk list |
(...skipping 12 matching lines...) Expand all Loading... | |
117 pepper_34 (post_stable) | 135 pepper_34 (post_stable) |
118 pepper_35 (stable) | 136 pepper_35 (stable) |
119 pepper_36 (beta) | 137 pepper_36 (beta) |
120 pepper_37 (dev) | 138 pepper_37 (dev) |
121 pepper_canary (canary) | 139 pepper_canary (canary) |
122 bionic_canary (canary) | 140 bionic_canary (canary) |
123 | 141 |
124 | 142 |
125 The sample output above shows that several bundles are available for | 143 The sample output above shows that several bundles are available for |
126 download, and that you have already installed the latest revision of the | 144 download, and that you have already installed the latest revision of the |
127 ``sdk_tools`` bundle. (It was included in the zip file you downloaded.) Each | 145 ``sdk_tools`` bundle, which was included in the zip file. You never need to |
128 bundle is labeled post-stable, stable, beta, dev, or canary. These labels | 146 update the ``sdk_tools`` bundle. It is updated automatically (if necessary) |
129 usually correspond to the current versions of Chrome. | 147 whenever you run ``naclsdk``. |
130 | 148 |
131 We recommend that you download and use a "stable" bundle, because | 149 Bundles are labeled post-stable, stable, beta, dev, or canary. These labels |
132 applications developed with "stable" bundles can be used by all current | 150 usually correspond to the current versions of Chrome. We recommend that you |
133 Chrome users. This is because Native Client is designed to be | 151 develop against a "stable" bundle, because such bundles can be used by all |
134 backward-compatible (for example, applications developed with the | 152 current Chrome users. Native Client is designed to be backward-compatible.For |
135 ``pepper_31`` bundle can run in Chrome 31, Chrome 32, etc.). | 153 example, applications developed with the ``pepper_31`` bundle can run in |
154 Chrome 31, Chrome 32, etc.. | |
136 | 155 |
137 #. Run ``naclsdk`` with the "update" command to download recommended bundles. | 156 #. Run ``naclsdk`` with the ``update`` command to download recommended bundles, |
157 including the current "stable" bundle. | |
138 | 158 |
139 On Mac/Linux:: | 159 On Mac/Linux:: |
140 | 160 |
141 $ ./naclsdk update | 161 $ ./naclsdk update |
142 | 162 |
143 On Windows:: | 163 On Windows:: |
144 | 164 |
145 > naclsdk update | 165 > naclsdk update |
146 | 166 |
147 By default, ``naclsdk`` only downloads bundles that are recommended--- | 167 By default, ``naclsdk`` only downloads bundles that are recommended, |
148 generally those that are "stable." Continuing with the earlier example, the | 168 generally those that are "stable." For example, if the current "stable" |
149 "update" command would only download the ``pepper_35`` bundle, since the | 169 bundle is ``pepper_35``, then the ``update`` downloads that bundle. To |
150 bundles ``pepper_36`` and greater are not yet stable. If you want the | 170 download the ``pepper_36`` bundle you must ask for it explicitly:: |
151 ``pepper_36`` bundle, you must ask for it explicitly:: | |
152 | 171 |
153 $ ./naclsdk update pepper_36 | 172 $ ./naclsdk update pepper_36 |
173 | |
174 | |
154 | 175 |
155 .. Note:: | 176 .. _updating-bundles: |
156 :class: note | |
157 | |
158 You never need to update the ``sdk_tools`` bundle. It is updated | |
159 automatically (if necessary) whenever you run ``naclsdk``. | |
160 | |
161 .. updating-bundles: | |
162 | 177 |
163 Updating bundles | 178 Updating bundles |
164 ------------------------------------------------------ | 179 ---------------- |
165 | 180 |
166 #. Run ``naclsdk`` with the "list" command. This shows you the list of available | 181 #. Run ``naclsdk`` with the ``list`` command. This shows you the list of availab le |
167 bundles and verifies which bundles you have installed. | 182 bundles and verifies which bundles you have installed. |
168 | 183 |
169 On Mac/Linux:: | 184 On Mac/Linux:: |
170 | 185 |
171 $ ./naclsdk list | 186 $ ./naclsdk list |
172 | 187 |
173 On Windows:: | 188 On Windows:: |
174 | 189 |
175 > naclsdk list | 190 > naclsdk list |
176 | 191 |
177 If an update is available, you'll see something like this.:: | 192 An asterisk (*) next to a bundle indicates that there is an update available |
193 it. For example:: | |
178 | 194 |
179 Bundles: | 195 Bundles: |
180 I: installed | 196 I: installed |
181 *: update available | 197 *: update available |
182 | 198 |
183 I sdk_tools (stable) | 199 I sdk_tools (stable) |
184 vs_addin (dev) | 200 vs_addin (dev) |
185 pepper_31 (post_stable) | 201 pepper_31 (post_stable) |
186 pepper_32 (post_stable) | 202 pepper_32 (post_stable) |
187 pepper_33 (post_stable) | 203 pepper_33 (post_stable) |
188 pepper_34 (post_stable) | 204 pepper_34 (post_stable) |
189 I* pepper_35 (stable) | 205 I* pepper_35 (stable) |
190 pepper_36 (beta) | 206 pepper_36 (beta) |
191 pepper_37 (dev) | 207 pepper_37 (dev) |
192 pepper_canary (canary) | 208 pepper_canary (canary) |
193 bionic_canary (canary) | 209 bionic_canary (canary) |
194 | 210 |
195 An asterisk next to a bundle indicates that there is an update available it. | 211 |
196 If you run "``naclsdk update``" now, it warns you with a message similar to | 212 If you run ``naclsdk update`` now, it warns you with a message similar to |
197 this:: | 213 this:: |
198 | 214 |
199 WARNING: pepper_35 already exists, but has an update available. Run update | 215 WARNING: pepper_35 already exists, but has an update available. Run update |
200 with the --force option to overwrite the existing directory. Warning: This | 216 with the --force option to overwrite the existing directory. Warning: This |
201 will overwrite any modifications you have made within this directory. | 217 will overwrite any modifications you have made within this directory. |
202 | 218 |
203 #. To download and install the new bundle, run: | 219 #. To download and install the new bundle, run: |
204 | 220 |
205 On Mac/Linux:: | 221 On Mac/Linux:: |
206 | 222 |
207 $ ./naclsdk update --force | 223 $ ./naclsdk update --force |
208 | 224 |
209 On Windows:: | 225 On Windows:: |
210 | 226 |
211 > naclsdk update --force | 227 > naclsdk update --force |
228 | |
229 .. _help-with-the-naclsdk-utility: | |
212 | 230 |
213 Help with the ``naclsdk`` utility | 231 Help with the ``naclsdk`` utility |
214 --------------------------------- | 232 --------------------------------- |
215 | 233 |
216 #. For more information about the ``naclsdk`` utility, run: | 234 #. For more information about the ``naclsdk`` utility, run: |
217 | 235 |
218 On Mac/Linux:: | 236 On Mac/Linux:: |
219 | 237 |
220 $ ./naclsdk help | 238 $ ./naclsdk help |
221 | 239 |
222 On Windows:: | 240 On Windows:: |
223 | 241 |
224 > naclsdk help | 242 > naclsdk help |
225 | 243 |
226 **Next steps:** | 244 .. _next-steps: |
227 | 245 |
228 * Browse through the `Release Notes <release-notes>`_ for important | 246 Next steps |
247 ---------- | |
248 | |
249 * Browse the `Release Notes <release-notes>`_ for important | |
229 information about the SDK and new bundles. | 250 information about the SDK and new bundles. |
230 * If you're just starting with Native Client, we recommend reading the | 251 * If you're just starting with Native Client, we recommend reading the |
231 `Technical Overview <../overview>`_ and walking through the | 252 `Technical Overview <../overview>`_ and walking through the |
232 `Getting Started Tutorial <devguide/tutorial/tutorial-part1>`_. | 253 `Getting Started Tutorial <devguide/tutorial/tutorial-part1>`_. |
233 * If you'd rather dive into information about the toolchains, see | 254 * If you'd rather dive in, see |
234 `Building Native Client Modules <devguide/devcycle/building>`_. | 255 `Building Native Client Modules <devguide/devcycle/building>`_. |
OLD | NEW |