|
Quick links: browse source | recent changes OverviewHow you should get the Native Client source code depends on what you want to do with it. - To just look at the source code (and not use Native Client):
- Browse or download the source code. Instructions are in Browsing the source code, below.
- To use the latest version:
- Get the source code and build it. Getting buildable source code requires Subversion and the Chromium depot tools. Building Native Client requires Python and a platform-dependent build environment. Instructions are in Getting buildable source code, below.
- To use a pre-built version:
- Download a tarball. Currently, the tarball has the full, buildable source code for Native Client. Over time, we intend to reduce the tarball's size and scope so that it becomes an SDK containing only the files that developers need to create, debug, and test Native Client modules.
Choosing a source code branch{PENDING: This section will explain trunk vs. stable branches. It will note which one this page uses, and what you should substitute to get other versions of the source code.} Browsing the source codeIf you just want to look at the source code, you can either browse it online or download it with Subversion. Here's how to download the latest version of the source code: svn checkout http://nativeclient.googlecode.com/svn/trunk/src
If you use svn checkout, the source code appears under a directory named src in the current directory. You can update it using svn update. Getting buildable source codeIf you want to build the latest version of Native Client, follow these steps: - If you don't already have gclient, get it by downloading the Chromium depot tools.
- If you don't already have Subversion (1.6 or later), download it.
- Create a directory to hold the Native Client source code. We'll call it $NACL_ROOT.
Important: Make sure the path to the directory has no spaces. Examples of good $NACL_ROOT values:
/home/me/SVN/nativeclient (Linux) /Users/me/SVN/nativeclient (Mac) C:\SVN\nativeclient (Windows)
- In a shell window, execute the following commands:
cd $NACL_ROOT
gclient config http://nativeclient.googlecode.com/svn/trunk/src/native_client - Download the code (this might take a few minutes):
cd $NACL_ROOT
gclient update
Here's what the gclient steps do: - gclient config sets up your working directory, creating a .gclient file that identifies the structure to pull from the repository.
- gclient update creates several subdirectories and downloads the latest Native Client files.
To update the Native Client source code, run gclient update from $NACL_ROOT or any of its subdirectories. Once you've downloaded the source code, you can build Native Client. To do so, you need Python and a platform-specific development environment. Details on prerequisites and how to build are in Building Native Client.
|