google的Native Client SDK,好东西啊,自己保存一下----chrome for future
https://developers.google.com/native-client/sdk/download?hl=zh-CN
Download the Native Client SDK
Follow the steps below to download and install the SDK:
- Prerequisites:
- Make sure you have Python 2.6 or 2.7 installed, and that the Python executable is in your path.
- On Mac/Linux, Python is probably preinstalled. Run the command "
python ‑V
" in a terminal window, and make sure that the version of Python you have is 2.6.x or 2.7.x (if it's not, upgrade to one of those versions). - On Windows, you may need to install Python. Go to http://www.python.org/download/ and select the latest 2.x version. In addition, be sure to add the Python directory (for example,
C:\python27
) to the PATH environment variable. After you've installed Python, run the command "python ‑V
" in a Command Prompt window and verify that the version of Python you have is 2.6.x or 2.7.x. - Note that Python 3.x is not yet supported.
- On Mac/Linux, Python is probably preinstalled. Run the command "
- On the Mac, you need to install the
make
command on your system before you can build and run the examples. One easy way to getmake
, along with several other useful tools, is to install Xcode Developer Tools. After installing Xcode, go to the Preferences menu, select Downloads and Components, and verify that Command Line Tools are installed. If you'd rather not install Xcode, you can download and build an open source version ofmake
. In order to build the command you may also need to download and install a copy of gcc.
- Make sure you have Python 2.6 or 2.7 installed, and that the Python executable is in your path.
- Download the SDK update utility: nacl_sdk.zip.
- Unzip the SDK update utility:
- On Mac/Linux, run the command "
unzip nacl_sdk.zip
" in a Terminal window. - On Windows, right-click on the .zip file and select "Extract All…". A dialog box will open; enter a location and click "Extract".
Unzipping the SDK update utility creates a directory callednacl_sdk
with the following files and directories:naclsdk
(andnaclsdk.bat
for Windows) – the front end of the update utility, i.e., the command you run to download the latest bundlessdk_cache
– a directory with a manifest file that lists the bundles you have already downloadedsdk_tools
– the back end of the update utility, also known as the "sdk_tools" bundle
- On Mac/Linux, run the command "
- Go to the
nacl_sdk
directory and runnaclsdk
with the "list" command to see a list of available bundles. The SDK includes a separate bundle for each version of Chrome/Pepper (see versioning information).On Mac/Linux:
$ cd nacl_sdk $ ./naclsdk list
On Windows:
> cd nacl_sdk > naclsdk list
You should see output similar to this:
Available bundles: sdk_tools description: Native Client SDK Tools, revision 1.5 stability: stable recommended: yes version: 1 revision: 5 pepper_14 description: Chrome 14 bundle, revision 1052 stability: stable recommended: yes version: 14 revision: 1052 pepper_15 description: Chrome 15 bundle, revision 1208 stability: beta recommended: no version: 15 revision: 1208 Currently installed bundles: sdk_tools description: Native Client SDK Tools, revision 1.5 stability: stable recommended: yes version: 1 revision: 5
This sample output shows that there are three bundles available for download, and that you have already installed the latest revision of the
sdk_tools
bundle (it was included in the zip file you downloaded). In this example note that thepepper_15
bundle has the "recommended" attribute set to "no", meaning that the bundle is still experimental and not yet recommended for general use. - Run
naclsdk
with the "update" command to download particular bundles that are available.On Mac/Linux:
$ ./naclsdk update
On Windows:
> naclsdk update
By default,
naclsdk
only downloads bundles that are recommended. Continuing with the earlier example, the "update" command would only download thesdk_tools
and thepepper_14
bundles, since thepepper_15
bundle is not yet recommended. If you want thepepper_15
bundle, you must either ask for it explicitly, or ask to get all of the available bundles. Use one of the commands below:$ ./naclsdk update pepper_15 # explicitly list the bundle you want to get, or $ ./naclsdk update all # get all available bundles, including experimental bundles
Continuing with the earlier example, if you run
naclsdk
with the "update all" command, you should see output similar to this:sdk_tools is already up-to-date. Updating bundle pepper_14 to version 14, revision 1052 Updating bundle pepper_15 to version 15, revision 1208
Note that the toolchains for Mac and Linux are around 150 MB, so the downloads can take a while, even on a fast Internet connection.
- Run
naclsdk
with the "list" command again; this will show you the list of available bundles and verify which bundles are installed.On Mac/Linux:
$ ./naclsdk list
On Windows:
> naclsdk list
Continuing with the earlier example, if you previously downloaded all of the available bundles, you should see output similar to this:
Available bundles: sdk_tools description: Native Client SDK Tools, revision 1.5 stability: stable recommended: yes version: 1 revision: 5 pepper_14 description: Chrome 14 bundle, revision 1052 stability: stable recommended: yes version: 14 revision: 1052 pepper_15 description: Chrome 15 bundle, revision 1208 stability: beta recommended: no version: 15 revision: 1208 Currently installed bundles: sdk_tools description: Native Client SDK Tools, revision 1.5 stability: stable recommended: yes version: 1 revision: 5 pepper_14 description: Chrome 14 bundle, revision 1052 stability: stable recommended: yes version: 14 revision: 1052 pepper_15 description: Chrome 15 bundle, revision 1208 stability: beta recommended: no version: 15 revision: 1208
- Running
naclsdk
with the "update" command again will verify that your bundles are up-to-date, or warn if you there are new versions of previously installed bundles.On Mac/Linux:
$ ./naclsdk update
On Windows:
> naclsdk update
Continuing with the earlier example in which the
pepper_15
bundle is not yet recommended, you should see output similar to this:sdk_tools is already up-to-date. pepper_14 is already up-to-date.
If there is a new version of a previously installed bundle, the update utility will warn you with a message similar to this:
WARNING: pepper_14 already exists, but has an update available. Run update with the --force option to overwrite the existing directory. Warning: This will overwrite any modifications you have made within this directory.
To dowload the new version of a bundle and overwrite the existing directory for that bundle, run
naclsdk
with the--force
option.On Mac/Linux:
$ ./naclsdk update --force
On Windows:
> naclsdk update --force
Next steps:
- Browse through the Release Notes for important information about the SDK and new bundles.
- If you're just getting started with Native Client, we recommend reading the Technical Overview and walking through the Getting Started Tutorial.
- If you'd rather dive into information about the toolchains, see Building Native Client Modules.