Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / doc / sdk / download.rst
1 .. _download:
2
3 Download the Native Client SDK
4 ==============================
5
6 This page provides an overview of the Native Client SDK, and instructions for
7 downloading and installing the SDK.
8
9 .. raw:: html
10   
11   <div id="home">
12   <a class="button-nacl button-download" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a>
13   </div>
14
15 .. _sdk-overview:
16
17 Overview
18 --------
19
20 The Native Client SDK includes:
21
22 - **Support for multiple Pepper versions** to compile for specific minimum
23   versions of Chrome.
24 - **Update utility** to download new bundles and updates to existing bundles.
25 - **Toolchains** to compile for Portable Native Client (PNaCl), traditional
26   Native Client (NaCl), and for compiling architecture-specific Native Client
27   applications with glibc.
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
30   the toolchains.
31 - **Tools** for validating Native Client modules and running modules from the
32   command line.
33
34 Follow the steps below to download and install the Native Client SDK.
35
36 .. _prerequisites:
37
38 Prerequisites
39 -------------
40
41 .. _python26-27:
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.
48   
49 * On Mac and Linux, Python is likely preinstalled. Run the command ``python -V``
50   in a terminal window, and make sure that the version you have is 2.6.x or
51   2.7.x.
52 * On Windows, you may need to install Python. Go to `http://www.python.org/
53   download/ <http://www.python.org/download/>`_ and select the latest 2.x
54   version. In addition, be sure to add the Python directory (for example,
55   ``C:\python27``) to the ``PATH`` `environment variable <http://en.wikipedia.
56   org/wiki/Environment_variable>`_. Run ``python -V`` from a command line to
57   verify that you properly configured the PATH variable.
58
59 .. _make:
60
61 Make
62 ^^^^
63
64 * On the Mac, you need to install ``make`` on your system before you can build
65   and run the examples in the SDK. One easy way to get ``make``, along with
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 
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>`_.
74 * On Windows, the Native Client SDK includes a copy of GNU Make.
75
76 .. _platforms:
77
78 Platforms
79 ---------
80
81 Native Client supports several operating systems, including Windows, Linux, OSX,
82 and ChromeOS. It supports several architectures including on x86-32, x86-64,
83 ARM, and MIPS.
84
85 .. _versioning:
86
87 Versions
88 --------
89
90 Chrome is released on a six week cycle, and developer versions of Chrome are
91 pushed to the public beta channel three weeks before each release. As with any
92 software, each release of Chrome may include changes to Native Client and the
93 Pepper interfaces that may require modification to existing applications.
94 However, modules compiled for one version of Pepper/Chrome should work with
95 subsequent versions of Pepper/Chrome. The SDK includes multiple versions of the
96 Pepper APIs to help developers make adjustments to API changes and take
97 advantage of new features: `stable </native-client/pepper_stable>`_, `beta
98 </native-client/pepper_beta>`_ and `dev </native-client/pepper_dev>`_.
99
100 .. _installing-the-sdk:
101
102 Installing the SDK
103 ------------------
104
105 .. _downloading-and-unzipping:
106
107 Downloading and Unzipping
108 ^^^^^^^^^^^^^^^^^^^^^^^^^
109
110 #. Download the `SDK update zip file
111    <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip>`_.
112
113 #. Unzip the file:
114
115    * On Mac/Linux, run the command ``unzip nacl_sdk.zip`` in a terminal
116      window.
117    * On Windows, right-click on the .zip file and select "Extract All...". A
118      dialog box opens; enter a location and click "Extract".
119
120    A directory is created called ``nacl_sdk`` with the following files and
121    directories:
122
123    * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility,
124      which is the command you run to download and update bundles.
125    * ``sdk_cache`` --- a directory with a manifest file that lists the bundles
126      you have already downloaded.
127    * ``sdk_tools`` --- the code run by the ``naclsdk`` command.
128
129 .. _installing-the-stable-bundle:
130
131 Installing the stable bundle
132 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133
134 #. To see the SDK bundles that are available for download, go to the 
135    ``nacl_sdk`` directory and run ``naclsdk`` with the ``list`` command. The SDK
136    includes a separate bundle for each version of Chrome/Pepper.
137
138    On Mac/Linux::
139
140      $ cd nacl_sdk
141      $ ./naclsdk list
142
143    On Windows::
144
145      > cd nacl_sdk
146      > naclsdk list
147
148    You should see output similar to this::
149
150     Bundles:
151      I: installed
152      *: update available
153
154       I  sdk_tools (stable)
155          vs_addin (dev)
156          pepper_31 (post_stable)
157          pepper_32 (post_stable)
158          pepper_33 (post_stable)
159          pepper_34 (post_stable)
160          pepper_35 (stable)
161          pepper_36 (beta)
162          pepper_37 (dev)
163          pepper_canary (canary)
164          bionic_canary (canary)
165
166
167    The sample output above shows that several bundles are available for
168    download, and that you have already installed the latest revision of the
169    ``sdk_tools`` bundle, which was included in the zip file. You never need to
170    update the ``sdk_tools`` bundle. It is updated automatically (if necessary)
171    whenever you run ``naclsdk``.
172    
173    Bundles are labeled post-stable, stable, beta, dev, or canary. These labels
174    usually correspond to the current versions of Chrome. We recommend that you
175    develop against a "stable" bundle, because such bundles can be used by all
176    current Chrome users. Native Client is designed to be backward-compatible.For
177    example, applications developed with the ``pepper_37`` bundle can run in
178    Chrome 37, Chrome 38, etc..
179
180 #. Run ``naclsdk`` with the ``update`` command to download recommended bundles,
181    including the current "stable" bundle.
182
183    On Mac/Linux::
184
185      $ ./naclsdk update
186
187    On Windows::
188
189      > naclsdk update
190
191    By default, ``naclsdk`` only downloads bundles that are recommended, 
192    generally those that are "stable." For example, if the current "stable"
193    bundle is ``pepper_35``, then the ``update`` downloads that bundle. To
194    download the ``pepper_36`` bundle you must ask for it explicitly::
195
196      $ ./naclsdk update pepper_36
197   
198    
199
200 .. _updating-bundles:
201
202 Updating bundles
203 ----------------
204
205 #. Run ``naclsdk`` with the ``list`` command. This shows you the list of available
206    bundles and verifies which bundles you have installed.
207
208    On Mac/Linux::
209
210      $ ./naclsdk list
211
212    On Windows::
213
214      > naclsdk list
215      
216    An asterisk (*) next to a bundle indicates that there is an update available
217    it. For example::
218
219     Bundles:
220      I: installed
221      *: update available
222
223       I  sdk_tools (stable)
224          vs_addin (dev)
225          pepper_31 (post_stable)
226          pepper_32 (post_stable)
227          pepper_33 (post_stable)
228          pepper_34 (post_stable)
229       I* pepper_35 (stable)
230          pepper_36 (beta)
231          pepper_37 (dev)
232          pepper_canary (canary)
233          bionic_canary (canary)
234
235    
236    If you run ``naclsdk update`` now, it warns you with a message similar to
237    this::
238
239      WARNING: pepper_35 already exists, but has an update available. Run update
240      with the --force option to overwrite the existing directory. Warning: This
241      will overwrite any modifications you have made within this directory.
242
243 #. To download and install the new bundle, run:
244
245    On Mac/Linux::
246
247      $ ./naclsdk update --force
248
249    On Windows::
250
251      > naclsdk update --force
252
253 .. _help-with-the-naclsdk-utility:
254      
255 Help with the ``naclsdk`` utility
256 ---------------------------------
257
258 #. For more information about the ``naclsdk`` utility, run:
259
260    On Mac/Linux::
261
262      $ ./naclsdk help
263
264    On Windows::
265
266      > naclsdk help
267
268 .. _next-steps:
269
270 Next steps
271 ----------
272
273 * Browse the `Release Notes <release-notes>`_ for important
274   information about the SDK and new bundles.
275 * If you're just starting with Native Client, we recommend reading the 
276   `Technical Overview <../overview>`_ and walking through the
277   `Getting Started Tutorial <devguide/tutorial/tutorial-part1>`_.
278 * If you'd rather dive in, see
279   `Building Native Client Modules <devguide/devcycle/building>`_.