Home | History | Annotate | Download | only in sdk
      1 .. _download:
      2 
      3 Download the Native Client SDK
      4 ==============================
      5 
      6 Follow the steps below to download and install the SDK:
      7 
      8 Prerequisites
      9 -------------
     10 
     11 * Python: Make sure you have Python 2.6 or 2.7 installed, and that the Python
     12   executable is in your path.
     13 
     14   * On Mac/Linux, Python is probably preinstalled. Run the command ``"python
     15     -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).
     17   * On Windows, you may need to install Python. Go to
     18     `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
     20     directory (for example, ``C:\python27``) to the PATH `environment
     21     variable <http://en.wikipedia.org/wiki/Environment_variable>`_. After
     22     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
     24     2.7.x.
     25   * Note that Python 3.x is not yet supported.
     26 
     27 * Make: On the Mac, you need to install the ``make`` command on your system before
     28   you can build and run the examples. One easy way to get ``make``, along
     29   with several other useful tools, is to install `Xcode Developer Tools
     30   <https://developer.apple.com/technologies/tools/>`_. After installing
     31   Xcode, go to the Preferences menu, select Downloads and Components, and
     32   verify that Command Line Tools are installed. If you'd rather not install
     33   Xcode, you can download and build an `open source version
     34   <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
     36   install a copy of `gcc
     37   <https://github.com/kennethreitz/osx-gcc-installer>`_.
     38 
     39 Download Steps
     40 --------------
     41 
     42 #. Download the SDK update utility: `nacl_sdk.zip
     43    <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip>`_.
     44 
     45 #. Unzip the SDK update utility:
     46 
     47    * On Mac/Linux, run the command "``unzip nacl_sdk.zip``" in a Terminal window.
     48    * On Windows, right-click on the .zip file and select "Extract All...". A
     49      dialog box will open; enter a location and click "Extract".
     50 
     51    Unzipping the SDK update utility creates a directory called ``nacl_sdk`` with
     52    the following files and directories:
     53 
     54    * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the front end of the update
     55      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 you
     57      have already downloaded
     58    * ``sdk_tools`` --- the back end of the update utility, also known as the
     59      "sdk_tools" bundle
     60 
     61 #. See which SDK versions are available: Go to the ``nacl_sdk`` directory and
     62    run ``naclsdk`` with the ``"list"`` command to see a list of available bundles.
     63    The SDK includes a separate bundle for each version of Chrome/Pepper
     64    (see versioning information).
     65 
     66    On Mac/Linux::
     67 
     68      $ cd nacl_sdk
     69      $ ./naclsdk list
     70 
     71    On Windows::
     72 
     73      > cd nacl_sdk
     74      > naclsdk list
     75 
     76    You should see output similar to this::
     77 
     78     Bundles:
     79      I: installed
     80      *: update available
     81 
     82       I  sdk_tools (stable)
     83          vs_addin (dev)
     84          pepper_26 (post_stable)
     85          pepper_27 (post_stable)
     86          pepper_28 (post_stable)
     87          pepper_29 (post_stable)
     88          pepper_30 (stable)
     89          pepper_31 (beta)
     90          pepper_canary (canary)
     91 
     92    This sample output shows many bundles available for download, and that you
     93    have already installed the latest revision of the sdk_tools bundle (it was
     94    included in the zip file you downloaded). Note that the bundles are labelled
     95    "post-stable", "stable", "beta", "dev" and "canary". These labels correspond
     96    to the current versions of Chrome. In this example, Chrome 30 is stable,
     97    Chrome 31 is beta, etc. Therefore ``pepper_30`` is the recommended bundle to
     98    download, because if you released an application that used it today, it
     99    could be used by all current Chrome users. Note that Native Client is
    100    designed to be backward compatible---users of Chrome 31 can use the features
    101    of ``pepper_30`` and earlier.
    102 
    103 #. Run ``naclsdk`` with the "update" command to download particular bundles that
    104    are available.
    105 
    106    On Mac/Linux::
    107 
    108      $ ./naclsdk update
    109 
    110    On Windows::
    111 
    112      > naclsdk update
    113 
    114    By default, ``naclsdk`` only downloads bundles that are recommended.  In
    115    general, only the "stable" bundles are recommended. Continuing with the
    116    earlier example, the "update" command would only download the ``pepper_30``
    117    bundles, since the bundles ``pepper_31`` and greater are not yet recommended.
    118    If you want the ``pepper_31`` bundle, you must ask for it explicitly::
    119 
    120      $ ./naclsdk update pepper_31
    121 
    122    Note that you never need update the ``sdk_tools`` bundle, it is
    123    updated automatically as necessary whenever ``naclsdk`` is run.
    124 
    125 .. Note::
    126   :class: note
    127 
    128   The minimum SDK version that supports PNaCl is ``pepper_31``.
    129 
    130 Staying up-to-date and getting new versions
    131 -------------------------------------------
    132 
    133 #. Run ``naclsdk`` with the "list" command again; this will show you the list of
    134    available bundles and verify which bundles are installed.
    135 
    136    On Mac/Linux::
    137 
    138      $ ./naclsdk list
    139 
    140    On Windows::
    141 
    142      > naclsdk list
    143 
    144    Continuing with the earlier example, if you previously downloaded the
    145    ``pepper_30`` bundle, you should see output similar to this::
    146 
    147     Bundles:
    148      I: installed
    149      *: update available
    150 
    151       I  sdk_tools (stable)
    152          vs_addin (dev)
    153          pepper_26 (post_stable)
    154          pepper_27 (post_stable)
    155          pepper_28 (post_stable)
    156          pepper_29 (post_stable)
    157       I  pepper_30 (stable)
    158          pepper_31 (beta)
    159          pepper_canary (canary)
    160 
    161 #. 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
    163    installed bundles.
    164 
    165    On Mac/Linux::
    166 
    167      $ ./naclsdk update
    168 
    169    On Windows::
    170 
    171      > naclsdk update
    172 
    173    Continuing with the earlier example, you should see output similar to this::
    174 
    175      pepper_30 is already up-to-date.
    176 
    177 #. To check if there is a new version of a previously installed bundle, you can
    178    run the "list" command again::
    179 
    180     Bundles:
    181      I: installed
    182      *: update available
    183 
    184       I  sdk_tools (stable)
    185          vs_addin (dev)
    186          pepper_26 (post_stable)
    187          pepper_27 (post_stable)
    188          pepper_28 (post_stable)
    189          pepper_29 (post_stable)
    190       I* pepper_30 (stable)
    191          pepper_31 (beta)
    192          pepper_canary (canary)
    193 
    194    The asterisk next to the bundle name indicates that there is an update
    195    available. If you run  the "update" command now, ``naclsdk`` will warn you
    196    with a message similar to this::
    197 
    198      WARNING: pepper_30 already exists, but has an update available.
    199      Run update with the --force option to overwrite the existing directory.
    200      Warning: This will overwrite any modifications you have made within this directory.
    201 
    202    To dowload the new version of a bundle and overwrite the existing directory
    203    for that bundle, run ``naclsdk`` with the ``--force`` option.
    204 
    205    On Mac/Linux::
    206 
    207      $ ./naclsdk update --force
    208 
    209    On Windows::
    210 
    211      > naclsdk update --force
    212 
    213 #. For more information about the ``naclsdk`` utility, run:
    214 
    215    On Mac/Linux::
    216 
    217      $ ./naclsdk help
    218 
    219    On Windows::
    220 
    221      > naclsdk help
    222 
    223 Next steps:
    224 
    225 * Browse through the :doc:`Release Notes <release-notes>` for important
    226   information about the SDK and new bundles.
    227 * If you're just getting started with Native Client, we recommend reading
    228   the :doc:`Technical Overview <../overview>` and walking through the
    229   :doc:`Getting Started Tutorial </devguide/tutorial/index>`.
    230 * If you'd rather dive into information about the toolchains, see
    231   :doc:`Building Native Client Modules </devguide/devcycle/building>`.
    232