Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: native_client_sdk/src/doc/sdk/download.rst

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

Powered by Google App Engine
This is Rietveld 408576698