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 Follow the steps below to download and install the SDK: | 6 To build Native Client modules, you must download and install the Native |
| 7 Client Software Development Kit (SDK). This page provides an overview |
| 8 of the Native Client SDK, and instructions for how to download and |
| 9 install the SDK. |
| 10 |
| 11 Overview |
| 12 -------- |
| 13 |
| 14 The Native Client SDK includes the following: |
| 15 |
| 16 support for multiple Pepper versions |
| 17 The SDK contains **bundles** that let you compile Native Client modules |
| 18 using different versions of the |
| 19 :ref:`link_pepper` (e.g., Pepper 31 or Pepper Canary). Review the |
| 20 :doc:`Release Notes <release-notes>` for a description of the new features |
| 21 included in each Pepper version to help you decide which bundle to |
| 22 use to develop your application. In general, Native Client modules |
| 23 compiled using a particular Pepper version will work in |
| 24 corresponding versions of Chrome and higher. For example, a module |
| 25 compiled using the Pepper 31 bundle will work in Chrome 31 and |
| 26 higher. |
| 27 |
| 28 update utility |
| 29 The ``naclsdk`` utility (``naclsdk.bat`` on Windows) lets you download new |
| 30 bundles that are available, as well as new versions of existing bundles. |
| 31 |
| 32 toolchains |
| 33 Each platform includes three toolchains: one for compiling |
| 34 Portable Native Client (PNaCl) applications, one for compiling |
| 35 architecture-specific Native Client applications with newlib, and |
| 36 one for compiling architecture-specific Native Client applications with glibc. |
| 37 Newlib and glibc are two different implementations |
| 38 of the C standard library. All three toolchains contain |
| 39 Native Client-compatible versions of standard compilers, linkers, |
| 40 and other tools. See :doc:`NaCl and PNaCl </nacl-and-pnacl>` to help |
| 41 you choose the right toolchain. |
| 42 |
| 43 examples |
| 44 Each example in the SDK includes C or C++ source files and header files |
| 45 illustrating how to use NaCl and Pepper, along with a Makefile to build |
| 46 the example using each of the toolchains. |
| 47 |
| 48 tools |
| 49 The SDK includes a number of additional tools that you can use for |
| 50 tasks such as validating Native Client modules and running modules |
| 51 from the command line. |
| 52 |
| 53 Follow the steps below to download and install the Native Client SDK. |
7 | 54 |
8 Prerequisites | 55 Prerequisites |
9 ------------- | 56 ------------- |
10 | 57 |
11 * Python: Make sure you have Python 2.6 or 2.7 installed, and that the Python | 58 * **Python:** Make sure you have Python 2.6 or 2.7 installed, and that the |
12 executable is in your path. | 59 Python executable is in your path. |
13 | 60 |
14 * On Mac/Linux, Python is probably preinstalled. Run the command ``"python | 61 * On Mac/Linux, Python is likely preinstalled. Run the command ``"python |
15 -V``" in a terminal window, and make sure that the version of Python you | 62 -V``" in a terminal window, and make sure that the version of Python you |
16 have is 2.6.x or 2.7.x (if it's not, upgrade to one of those versions). | 63 have is 2.6.x or 2.7.x (if it's not, upgrade to one of those versions). |
17 * On Windows, you may need to install Python. Go to | 64 * On Windows, you may need to install Python. Go to |
18 `http://www.python.org/download/ <http://www.python.org/download/>`_ and | 65 `http://www.python.org/download/ <http://www.python.org/download/>`_ and |
19 select the latest 2.x version. In addition, be sure to add the Python | 66 select the latest 2.x version. In addition, be sure to add the Python |
20 directory (for example, ``C:\python27``) to the PATH `environment | 67 directory (for example, ``C:\python27``) to the PATH `environment |
21 variable <http://en.wikipedia.org/wiki/Environment_variable>`_. After | 68 variable <http://en.wikipedia.org/wiki/Environment_variable>`_. After |
22 you've installed Python, run the command ``"python -V``" in a Command | 69 you've installed Python, run the command ``"python -V``" in a Command |
23 Prompt window and verify that the version of Python you have is 2.6.x or | 70 Prompt window and verify that the version of Python you have is 2.6.x or |
24 2.7.x. | 71 2.7.x. |
25 * Note that Python 3.x is not yet supported. | 72 * Note that Python 3.x is not yet supported. |
26 | 73 |
27 * Make: On the Mac, you need to install the ``make`` command on your system befo
re | 74 * **Make:** On the Mac, you need to install the ``make`` command on your system |
28 you can build and run the examples. One easy way to get ``make``, along | 75 before you can build and run the examples in the SDK. One easy way to get |
29 with several other useful tools, is to install `Xcode Developer Tools | 76 ``make``, along with several other useful tools, is to install |
30 <https://developer.apple.com/technologies/tools/>`_. After installing | 77 `Xcode Developer Tools <https://developer.apple.com/technologies/tools/>`_. |
31 Xcode, go to the Preferences menu, select Downloads and Components, and | 78 After installing Xcode, go to the Preferences menu, select |
32 verify that Command Line Tools are installed. If you'd rather not install | 79 Downloads and Components, and verify that Command Line Tools are installed. |
33 Xcode, you can download and build an `open source version | 80 If you'd rather not install Xcode, you can download and build an |
| 81 `open source version |
34 <http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of | 82 <http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of |
35 ``make``. In order to build the command you may also need to download and | 83 ``make``. In order to build the command you may also need to download and |
36 install a copy of `gcc | 84 install a copy of `gcc <https://github.com/kennethreitz/osx-gcc-installer>`_. |
37 <https://github.com/kennethreitz/osx-gcc-installer>`_. | |
38 | 85 |
39 Download Steps | 86 Download and install the SDK |
40 -------------- | 87 ---------------------------- |
41 | 88 |
42 #. Download the SDK update utility: `nacl_sdk.zip | 89 #. Download the SDK update utility: `nacl_sdk.zip |
43 <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
>`_. | 90 <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
>`_. |
44 | 91 |
45 #. Unzip the SDK update utility: | 92 #. Unzip the SDK update utility: |
46 | 93 |
47 * On Mac/Linux, run the command "``unzip nacl_sdk.zip``" in a Terminal window
. | 94 * On Mac/Linux, run the command "``unzip nacl_sdk.zip``" in a terminal |
| 95 window. |
48 * On Windows, right-click on the .zip file and select "Extract All...". A | 96 * On Windows, right-click on the .zip file and select "Extract All...". A |
49 dialog box will open; enter a location and click "Extract". | 97 dialog box will open; enter a location and click "Extract". |
50 | 98 |
51 Unzipping the SDK update utility creates a directory called ``nacl_sdk`` with | 99 Unzipping the SDK update utility creates a directory called ``nacl_sdk`` with |
52 the following files and directories: | 100 the following files and directories: |
53 | 101 |
54 * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the front end of the upda
te | 102 * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the front end of the upda
te |
55 utility, i.e., the command you run to download the latest bundles | 103 utility, i.e., the command you run to download the latest bundles |
56 * ``sdk_cache`` --- a directory with a manifest file that lists the bundles y
ou | 104 * ``sdk_cache`` --- a directory with a manifest file that lists the bundles |
57 have already downloaded | 105 you have already downloaded |
58 * ``sdk_tools`` --- the back end of the update utility, also known as the | 106 * ``sdk_tools`` --- the back end of the update utility, also known as the |
59 "sdk_tools" bundle | 107 "sdk_tools" bundle |
60 | 108 |
61 #. See which SDK versions are available: Go to the ``nacl_sdk`` directory and | 109 #. To see the SDK bundles that are available for download, go to the ``nacl_sdk`
` |
62 run ``naclsdk`` with the ``"list"`` command to see a list of available bundle
s. | 110 directory and run ``naclsdk`` with the ``"list"`` command. |
63 The SDK includes a separate bundle for each version of Chrome/Pepper | 111 The SDK includes a separate bundle for each version of Chrome/Pepper. |
64 (see versioning information). | |
65 | 112 |
66 On Mac/Linux:: | 113 On Mac/Linux:: |
67 | 114 |
68 $ cd nacl_sdk | 115 $ cd nacl_sdk |
69 $ ./naclsdk list | 116 $ ./naclsdk list |
70 | 117 |
71 On Windows:: | 118 On Windows:: |
72 | 119 |
73 > cd nacl_sdk | 120 > cd nacl_sdk |
74 > naclsdk list | 121 > naclsdk list |
75 | 122 |
76 You should see output similar to this:: | 123 You should see output similar to this:: |
77 | 124 |
78 Bundles: | 125 Bundles: |
79 I: installed | 126 I: installed |
80 *: update available | 127 *: update available |
81 | 128 |
82 I sdk_tools (stable) | 129 I sdk_tools (stable) |
83 vs_addin (dev) | 130 vs_addin (dev) |
84 pepper_26 (post_stable) | |
85 pepper_27 (post_stable) | 131 pepper_27 (post_stable) |
86 pepper_28 (post_stable) | 132 pepper_28 (post_stable) |
87 pepper_29 (post_stable) | 133 pepper_29 (post_stable) |
88 pepper_30 (stable) | 134 pepper_30 (post_stable) |
89 pepper_31 (beta) | 135 pepper_31 (stable) |
| 136 pepper_32 (beta) |
90 pepper_canary (canary) | 137 pepper_canary (canary) |
91 | 138 |
92 This sample output shows many bundles available for download, and that you | 139 The sample output above shows that there are a number of bundles available |
93 have already installed the latest revision of the sdk_tools bundle (it was | 140 for download, and that you have already installed the latest revision of the |
94 included in the zip file you downloaded). Note that the bundles are labelled | 141 ``sdk_tools`` bundle (it was included in the zip file you downloaded). |
95 "post-stable", "stable", "beta", "dev" and "canary". These labels correspond | 142 Each bundle is labeled post-stable, stable, beta, dev, or canary. |
96 to the current versions of Chrome. In this example, Chrome 30 is stable, | 143 These labels usually correspond to the current versions of |
97 Chrome 31 is beta, etc. Therefore ``pepper_30`` is the recommended bundle to | 144 Chrome. (In the example above, Chrome 31 is stable, Chrome 32 is beta, etc.). |
98 download, because if you released an application that used it today, it | 145 We generally recommend that you download and use a "stable" bundle, |
99 could be used by all current Chrome users. Note that Native Client is | 146 as applications developed with "stable" bundles can be used by all current |
100 designed to be backward compatible---users of Chrome 31 can use the features | 147 Chrome users. This is because Native Client is designed to be |
101 of ``pepper_30`` and earlier. | 148 backward-compatible (for example, applications developed with the |
| 149 ``pepper_31`` bundle can run in Chrome 31, Chrome 32, etc.). |
| 150 Thus in the example above, ``pepper_31`` is the recommended bundle to use. |
102 | 151 |
103 #. Run ``naclsdk`` with the "update" command to download particular bundles that | 152 #. Run ``naclsdk`` with the "update" command to download recommended bundles. |
104 are available. | |
105 | 153 |
106 On Mac/Linux:: | 154 On Mac/Linux:: |
107 | 155 |
108 $ ./naclsdk update | 156 $ ./naclsdk update |
109 | 157 |
110 On Windows:: | 158 On Windows:: |
111 | 159 |
112 > naclsdk update | 160 > naclsdk update |
113 | 161 |
114 By default, ``naclsdk`` only downloads bundles that are recommended. In | 162 By default, ``naclsdk`` only downloads bundles that are |
115 general, only the "stable" bundles are recommended. Continuing with the | 163 recommended---generally those that are "stable." Continuing with the earlier
example, the |
116 earlier example, the "update" command would only download the ``pepper_30`` | 164 "update" command would only download the ``pepper_31`` |
117 bundles, since the bundles ``pepper_31`` and greater are not yet recommended. | 165 bundle, since the bundles ``pepper_32`` and greater are not yet stable. |
118 If you want the ``pepper_31`` bundle, you must ask for it explicitly:: | 166 If you want the ``pepper_32`` bundle, you must ask for it explicitly:: |
119 | 167 |
120 $ ./naclsdk update pepper_31 | 168 $ ./naclsdk update pepper_32 |
121 | 169 |
122 Note that you never need update the ``sdk_tools`` bundle, it is | 170 Note that you never need to update the ``sdk_tools`` bundle---it is |
123 updated automatically as necessary whenever ``naclsdk`` is run. | 171 updated automatically (if necessary) whenever you run ``naclsdk``. |
124 | 172 |
125 .. Note:: | 173 .. Note:: |
126 :class: note | 174 :class: note |
127 | 175 |
128 The minimum SDK version that supports PNaCl is ``pepper_31``. | 176 The minimum SDK bundle that supports PNaCl is ``pepper_31``. |
129 | 177 |
130 Staying up-to-date and getting new versions | 178 Staying up-to-date and getting new versions of bundles |
131 ------------------------------------------- | 179 ------------------------------------------------------ |
132 | 180 |
133 #. Run ``naclsdk`` with the "list" command again; this will show you the list of | 181 #. Run ``naclsdk`` with the "list" command again; this will show you the list of |
134 available bundles and verify which bundles are installed. | 182 available bundles and verify which bundles you have installed. |
135 | 183 |
136 On Mac/Linux:: | 184 On Mac/Linux:: |
137 | 185 |
138 $ ./naclsdk list | 186 $ ./naclsdk list |
139 | 187 |
140 On Windows:: | 188 On Windows:: |
141 | 189 |
142 > naclsdk list | 190 > naclsdk list |
143 | 191 |
144 Continuing with the earlier example, if you previously downloaded the | 192 Continuing with the earlier example, if you previously downloaded the |
145 ``pepper_30`` bundle, you should see output similar to this:: | 193 ``pepper_31`` bundle, you should see output similar to this:: |
146 | 194 |
147 Bundles: | 195 Bundles: |
148 I: installed | 196 I: installed |
149 *: update available | 197 *: update available |
150 | 198 |
151 I sdk_tools (stable) | 199 I sdk_tools (stable) |
152 vs_addin (dev) | 200 vs_addin (dev) |
153 pepper_26 (post_stable) | |
154 pepper_27 (post_stable) | 201 pepper_27 (post_stable) |
155 pepper_28 (post_stable) | 202 pepper_28 (post_stable) |
156 pepper_29 (post_stable) | 203 pepper_29 (post_stable) |
157 I pepper_30 (stable) | 204 pepper_30 (post_stable) |
158 pepper_31 (beta) | 205 I pepper_31 (stable) |
| 206 pepper_32 (beta) |
159 pepper_canary (canary) | 207 pepper_canary (canary) |
160 | 208 |
161 #. Running ``naclsdk`` with the "update" command again will verify that your | 209 #. Running ``naclsdk`` with the "update" command again will verify that your |
162 bundles are up-to-date, or warn if you there are new versions of previously | 210 bundles are up-to-date, or warn if you there are new versions of previously |
163 installed bundles. | 211 installed bundles. |
164 | 212 |
165 On Mac/Linux:: | 213 On Mac/Linux:: |
166 | 214 |
167 $ ./naclsdk update | 215 $ ./naclsdk update |
168 | 216 |
169 On Windows:: | 217 On Windows:: |
170 | 218 |
171 > naclsdk update | 219 > naclsdk update |
172 | 220 |
173 Continuing with the earlier example, you should see output similar to this:: | 221 Continuing with the earlier example, you should see output similar to this:: |
174 | 222 |
175 pepper_30 is already up-to-date. | 223 pepper_31 is already up-to-date. |
176 | 224 |
177 #. To check if there is a new version of a previously installed bundle, you can | 225 #. To check if there is a new version of a previously installed bundle, you can |
178 run the "list" command again:: | 226 run the "list" command again:: |
179 | 227 |
180 Bundles: | 228 Bundles: |
181 I: installed | 229 I: installed |
182 *: update available | 230 *: update available |
183 | 231 |
184 I sdk_tools (stable) | 232 I sdk_tools (stable) |
185 vs_addin (dev) | 233 vs_addin (dev) |
186 pepper_26 (post_stable) | |
187 pepper_27 (post_stable) | 234 pepper_27 (post_stable) |
188 pepper_28 (post_stable) | 235 pepper_28 (post_stable) |
189 pepper_29 (post_stable) | 236 pepper_29 (post_stable) |
190 I* pepper_30 (stable) | 237 pepper_30 (post_stable) |
191 pepper_31 (beta) | 238 I* pepper_31 (stable) |
| 239 pepper_32 (beta) |
192 pepper_canary (canary) | 240 pepper_canary (canary) |
193 | 241 |
194 The asterisk next to the bundle name indicates that there is an update | 242 An asterisk next to a bundle indicates that there is an update |
195 available. If you run the "update" command now, ``naclsdk`` will warn you | 243 available for that bundle. If you run the "update" command now, |
196 with a message similar to this:: | 244 ``naclsdk`` will warn you with a message similar to this:: |
197 | 245 |
198 WARNING: pepper_30 already exists, but has an update available. | 246 WARNING: pepper_31 already exists, but has an update available. |
199 Run update with the --force option to overwrite the existing directory. | 247 Run update with the --force option to overwrite the existing directory. |
200 Warning: This will overwrite any modifications you have made within this di
rectory. | 248 Warning: This will overwrite any modifications you have made within this di
rectory. |
201 | 249 |
202 To dowload the new version of a bundle and overwrite the existing directory | 250 To dowload the new version of a bundle and overwrite the existing directory |
203 for that bundle, run ``naclsdk`` with the ``--force`` option. | 251 for that bundle, run ``naclsdk`` with the ``--force`` option. |
204 | 252 |
205 On Mac/Linux:: | 253 On Mac/Linux:: |
206 | 254 |
207 $ ./naclsdk update --force | 255 $ ./naclsdk update --force |
208 | 256 |
(...skipping 10 matching lines...) Expand all Loading... |
219 On Windows:: | 267 On Windows:: |
220 | 268 |
221 > naclsdk help | 269 > naclsdk help |
222 | 270 |
223 Next steps: | 271 Next steps: |
224 | 272 |
225 * Browse through the :doc:`Release Notes <release-notes>` for important | 273 * Browse through the :doc:`Release Notes <release-notes>` for important |
226 information about the SDK and new bundles. | 274 information about the SDK and new bundles. |
227 * If you're just getting started with Native Client, we recommend reading | 275 * If you're just getting started with Native Client, we recommend reading |
228 the :doc:`Technical Overview <../overview>` and walking through the | 276 the :doc:`Technical Overview <../overview>` and walking through the |
229 :doc:`Getting Started Tutorial </devguide/tutorial/index>`. | 277 :doc:`Getting Started Tutorial </devguide/tutorial/tutorial-part1>`. |
230 * If you'd rather dive into information about the toolchains, see | 278 * If you'd rather dive into information about the toolchains, see |
231 :doc:`Building Native Client Modules </devguide/devcycle/building>`. | 279 :doc:`Building Native Client Modules </devguide/devcycle/building>`. |
OLD | NEW |