Chromium Code Reviews| 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: |
| 40 Python 2.7 is preferred. Python 3.x is not yet supported. | 42 |
| 43 Python 2.6 or 2.7 | |
|
JF
2014/09/22 16:20:34
DO you think it's worth saying that 2.7 is the lat
Sam Clegg
2014/09/22 17:25:10
We've already started using pythonn2.7 features (a
jpmedley
2014/09/22 19:51:29
Done.
| |
| 44 ^^^^^^^^^^^^^^^^^ | |
| 45 | |
| 46 Make sure that the Python executable is in your ``PATH`` variable. Python 2.7 is | |
| 47 preferred. Python 3.x is 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 and |
| 59 installed. If you'd rather not install Xcode, you can download and build an | 65 run the examples in the SDK. One easy way to get ``make``, along with several |
| 60 `open source version | 66 other useful tools, is to install `Xcode Developer Tools |
| 61 <http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of ``make``. | 67 <https://developer.apple.com/technologies/tools/>`_. After installing Xcode, go |
| 62 To build the command you may also need to download and install | 68 to the XCode menu, open the Preferences dialog box then select Downloads and |
| 63 `gcc <https://github.com/kennethreitz/osx-gcc-installer>`_. | 69 Components. Verify that Command Line Tools are installed. If you'd rather not |
| 70 install Xcode, you can download and build an `open source version | |
| 71 <http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of ``make``. | |
| 72 To build the program you may also need to download and install `gcc | |
| 73 <https://github.com/kennethreitz/osx-gcc-installer>`_. | |
|
JF
2014/09/22 16:20:34
Would it be worth adding instructions to install `
binji
2014/09/22 17:29:57
We include a copy of GNU make with the SDK on Wind
jpmedley
2014/09/22 19:51:29
Done.
| |
| 74 | |
| 75 .. _installing-the-sdk: | |
| 64 | 76 |
| 65 Installing the SDK | 77 Installing the SDK |
| 66 ------------------ | 78 ------------------ |
| 67 | 79 |
| 68 #. Download the SDK update zip file: `nacl_sdk.zip | 80 .. _downloading-and-unzipping: |
| 81 | |
| 82 Downloading and Unzipping | |
| 83 ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| 84 | |
| 85 #. Download the `SDK update zip file | |
| 69 <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip >`_. | 86 <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip >`_. |
| 70 | 87 |
| 71 #. Unzip the file: | 88 #. Unzip the file: |
| 72 | 89 |
| 73 * On Mac/Linux, run the command "``unzip nacl_sdk.zip``" in a terminal | 90 * On Mac/Linux, run the command ``unzip nacl_sdk.zip`` in a terminal |
| 74 window. | 91 window. |
| 75 * On Windows, right-click on the .zip file and select "Extract All...". A | 92 * On Windows, right-click on the .zip file and select "Extract All...". A |
| 76 dialog box will open; enter a location and click "Extract". | 93 dialog box opens; enter a location and click "Extract". |
| 77 | 94 |
| 78 A directory is created called ``nacl_sdk`` with the following files and | 95 A directory is created called ``nacl_sdk`` with the following files and |
| 79 directories: | 96 directories: |
| 80 | 97 |
| 81 * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility, | 98 * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility, |
| 82 which is the command you run to download and update bundles. | 99 which is the command you run to download and update bundles. |
| 83 * ``sdk_cache`` --- a directory with a manifest file that lists the bundles | 100 * ``sdk_cache`` --- a directory with a manifest file that lists the bundles |
| 84 you have already downloaded. | 101 you have already downloaded. |
| 85 * ``sdk_tools`` --- the code run by the ``naclsdk`` command. | 102 * ``sdk_tools`` --- the code run by the ``naclsdk`` command. |
| 86 | 103 |
| 87 .. installing-bundles: | 104 .. _installing-the-stable-bundle: |
| 88 | 105 |
| 89 Installing bundles | 106 Installing the stable bundle |
| 90 ------------------ | 107 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 91 | 108 |
| 92 #. To see the SDK bundles that are available for download, go to the | 109 #. 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 | 110 ``nacl_sdk`` directory and run ``naclsdk`` with the ``list`` command. The SDK |
| 94 SDK includes a separate bundle for each version of Chrome/Pepper. | 111 includes a separate bundle for each version of Chrome/Pepper. |
| 95 | 112 |
| 96 On Mac/Linux:: | 113 On Mac/Linux:: |
| 97 | 114 |
| 98 $ cd nacl_sdk | 115 $ cd nacl_sdk |
| 99 $ ./naclsdk list | 116 $ ./naclsdk list |
| 100 | 117 |
| 101 On Windows:: | 118 On Windows:: |
| 102 | 119 |
| 103 > cd nacl_sdk | 120 > cd nacl_sdk |
| 104 > naclsdk list | 121 > naclsdk list |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 117 pepper_34 (post_stable) | 134 pepper_34 (post_stable) |
| 118 pepper_35 (stable) | 135 pepper_35 (stable) |
| 119 pepper_36 (beta) | 136 pepper_36 (beta) |
| 120 pepper_37 (dev) | 137 pepper_37 (dev) |
| 121 pepper_canary (canary) | 138 pepper_canary (canary) |
| 122 bionic_canary (canary) | 139 bionic_canary (canary) |
| 123 | 140 |
| 124 | 141 |
| 125 The sample output above shows that several bundles are available for | 142 The sample output above shows that several bundles are available for |
| 126 download, and that you have already installed the latest revision of the | 143 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 | 144 ``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 | 145 update the ``sdk_tools`` bundle. It is updated automatically (if necessary) |
| 129 usually correspond to the current versions of Chrome. | 146 whenever you run ``naclsdk``. |
| 130 | 147 |
| 131 We recommend that you download and use a "stable" bundle, because | 148 Bundles are labeled post-stable, stable, beta, dev, or canary. These labels |
| 132 applications developed with "stable" bundles can be used by all current | 149 usually correspond to the current versions of Chrome. We recommend that you |
| 133 Chrome users. This is because Native Client is designed to be | 150 develop against a "stable" bundle, because such bundles can be used by all |
| 134 backward-compatible (for example, applications developed with the | 151 current Chrome users. Native Client is designed to be backward-compatible.For |
| 135 ``pepper_31`` bundle can run in Chrome 31, Chrome 32, etc.). | 152 example, applications developed with the ``pepper_31`` bundle can run in |
| 153 Chrome 31, Chrome 32, etc.. | |
|
JF
2014/09/22 16:20:34
Missing an extra period on the ellipsis..
jpmedley
2014/09/22 19:51:29
It's not an ellipse. The abbreviation gets a perio
JF
2014/09/22 20:02:57
Ha, I'd never seen that before :)
| |
| 136 | 154 |
| 137 #. Run ``naclsdk`` with the "update" command to download recommended bundles. | 155 #. Run ``naclsdk`` with the ``update`` command to download recommended bundles, |
| 156 including the current "stable" bundle. | |
| 138 | 157 |
| 139 On Mac/Linux:: | 158 On Mac/Linux:: |
| 140 | 159 |
| 141 $ ./naclsdk update | 160 $ ./naclsdk update |
| 142 | 161 |
| 143 On Windows:: | 162 On Windows:: |
| 144 | 163 |
| 145 > naclsdk update | 164 > naclsdk update |
| 146 | 165 |
| 147 By default, ``naclsdk`` only downloads bundles that are recommended--- | 166 By default, ``naclsdk`` only downloads bundles that are recommended, |
| 148 generally those that are "stable." Continuing with the earlier example, the | 167 generally those that are "stable." For example, if the current "stable" |
| 149 "update" command would only download the ``pepper_35`` bundle, since the | 168 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 | 169 download the ``pepper_36`` bundle you must ask for it explicitly:: |
| 151 ``pepper_36`` bundle, you must ask for it explicitly:: | |
| 152 | 170 |
| 153 $ ./naclsdk update pepper_36 | 171 $ ./naclsdk update pepper_36 |
| 172 | |
| 173 | |
| 154 | 174 |
| 155 .. Note:: | 175 .. _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 | 176 |
| 163 Updating bundles | 177 Updating bundles |
| 164 ------------------------------------------------------ | 178 ---------------- |
| 165 | 179 |
| 166 #. Run ``naclsdk`` with the "list" command. This shows you the list of available | 180 #. Run ``naclsdk`` with the ``list`` command. This shows you the list of availab le |
| 167 bundles and verifies which bundles you have installed. | 181 bundles and verifies which bundles you have installed. |
| 168 | 182 |
| 169 On Mac/Linux:: | 183 On Mac/Linux:: |
| 170 | 184 |
| 171 $ ./naclsdk list | 185 $ ./naclsdk list |
| 172 | 186 |
| 173 On Windows:: | 187 On Windows:: |
| 174 | 188 |
| 175 > naclsdk list | 189 > naclsdk list |
| 176 | 190 |
| 177 If an update is available, you'll see something like this.:: | 191 An asterisk (*) next to a bundle indicates that there is an update available |
| 192 it. For example:: | |
| 178 | 193 |
| 179 Bundles: | 194 Bundles: |
| 180 I: installed | 195 I: installed |
| 181 *: update available | 196 *: update available |
| 182 | 197 |
| 183 I sdk_tools (stable) | 198 I sdk_tools (stable) |
| 184 vs_addin (dev) | 199 vs_addin (dev) |
| 185 pepper_31 (post_stable) | 200 pepper_31 (post_stable) |
| 186 pepper_32 (post_stable) | 201 pepper_32 (post_stable) |
| 187 pepper_33 (post_stable) | 202 pepper_33 (post_stable) |
| 188 pepper_34 (post_stable) | 203 pepper_34 (post_stable) |
| 189 I* pepper_35 (stable) | 204 I* pepper_35 (stable) |
| 190 pepper_36 (beta) | 205 pepper_36 (beta) |
| 191 pepper_37 (dev) | 206 pepper_37 (dev) |
| 192 pepper_canary (canary) | 207 pepper_canary (canary) |
| 193 bionic_canary (canary) | 208 bionic_canary (canary) |
| 194 | 209 |
| 195 An asterisk next to a bundle indicates that there is an update available it. | 210 |
| 196 If you run "``naclsdk update``" now, it warns you with a message similar to | 211 If you run ``naclsdk update`` now, it warns you with a message similar to |
| 197 this:: | 212 this:: |
| 198 | 213 |
| 199 WARNING: pepper_35 already exists, but has an update available. Run update | 214 WARNING: pepper_35 already exists, but has an update available. Run update |
| 200 with the --force option to overwrite the existing directory. Warning: This | 215 with the --force option to overwrite the existing directory. Warning: This |
| 201 will overwrite any modifications you have made within this directory. | 216 will overwrite any modifications you have made within this directory. |
| 202 | 217 |
| 203 #. To download and install the new bundle, run: | 218 #. To download and install the new bundle, run: |
| 204 | 219 |
| 205 On Mac/Linux:: | 220 On Mac/Linux:: |
| 206 | 221 |
| 207 $ ./naclsdk update --force | 222 $ ./naclsdk update --force |
| 208 | 223 |
| 209 On Windows:: | 224 On Windows:: |
| 210 | 225 |
| 211 > naclsdk update --force | 226 > naclsdk update --force |
| 227 | |
| 228 .. _help-with-the-naclsdk-utility: | |
| 212 | 229 |
| 213 Help with the ``naclsdk`` utility | 230 Help with the ``naclsdk`` utility |
| 214 --------------------------------- | 231 --------------------------------- |
| 215 | 232 |
| 216 #. For more information about the ``naclsdk`` utility, run: | 233 #. For more information about the ``naclsdk`` utility, run: |
| 217 | 234 |
| 218 On Mac/Linux:: | 235 On Mac/Linux:: |
| 219 | 236 |
| 220 $ ./naclsdk help | 237 $ ./naclsdk help |
| 221 | 238 |
| 222 On Windows:: | 239 On Windows:: |
| 223 | 240 |
| 224 > naclsdk help | 241 > naclsdk help |
| 225 | 242 |
| 226 **Next steps:** | 243 .. _next-steps: |
| 227 | 244 |
| 228 * Browse through the `Release Notes <release-notes>`_ for important | 245 Next steps |
| 246 ---------- | |
| 247 | |
| 248 * Browse the `Release Notes <release-notes>`_ for important | |
| 229 information about the SDK and new bundles. | 249 information about the SDK and new bundles. |
| 230 * If you're just starting with Native Client, we recommend reading the | 250 * If you're just starting with Native Client, we recommend reading the |
| 231 `Technical Overview <../overview>`_ and walking through the | 251 `Technical Overview <../overview>`_ and walking through the |
| 232 `Getting Started Tutorial <devguide/tutorial/tutorial-part1>`_. | 252 `Getting Started Tutorial <devguide/tutorial/tutorial-part1>`_. |
| 233 * If you'd rather dive into information about the toolchains, see | 253 * If you'd rather dive in, see |
| 234 `Building Native Client Modules <devguide/devcycle/building>`_. | 254 `Building Native Client Modules <devguide/devcycle/building>`_. |
| OLD | NEW |