OLD | NEW |
1 **Quick links:** [browse source and recent revisions] | |
2 (https://chromium.googlesource.com/native_client/src/native_client/) | |
3 | |
4 ## Browsing the source code | 1 ## Browsing the source code |
5 | 2 |
6 If you just want to look at the source code, you can either [browse] | 3 If you just want to look at the source code, you can either |
7 (https://chromium.googlesource.com/native_client/src/native_client/) it online | 4 [browse](https://chromium.googlesource.com/native_client/src/native_client/) it |
8 or download it with git. Here's how to download the latest version of the source | 5 online or download it with git. Here's how to download the latest version of the |
9 code: | 6 source code: |
10 | 7 |
11 > `git clone https://chromium.googlesource.com/native_client/src/native_client` | 8 git clone https://chromium.googlesource.com/native_client/src/native_client |
12 | 9 |
13 If you use `git clone`, the source code appears under a directory named | 10 If you use `git clone`, the source code appears under a directory named |
14 `native_client` in the current directory. You can update it using `git pull`. | 11 `native_client` in the current directory. You can update it using `git pull`. |
15 | 12 |
16 ## Getting buildable source code | 13 ## Getting buildable source code |
17 | 14 |
18 If you want to build the latest version of Native Client, follow these steps: | 15 If you want to build the latest version of Native Client, follow these steps: |
19 | 16 |
20 1. If you don't already have `gclient`, get it by downloading the Chromium | 17 1. If you don't already have `gclient`, get it by downloading the Chromium |
21 [depot tools] | 18 [depot tools](http://dev.chromium.org/developers/how-tos/install-depot-tools)
. |
22 (http://dev.chromium.org/developers/how-tos/install-depot-tools).<br><br> | 19 2. If you don't already have [git](http://git-scm.com/downloads), download it. |
23 <ol><li>If you don't already have <a | 20 3. Create a directory to hold the Native Client source code. We'll |
24 href='http://git-scm.com/downloads'>git</a>, download it.<br><br> | 21 call it `$NACL_ROOT`. |
25 </li><li>Create a directory to hold the Native Client source code. We'll | 22 4. **Important:** Make sure the path to the directory has no spaces. Examples of |
26 call it <code>$NACL_ROOT</code>.<br><br><b>Important:</b> Make sure the path | 23 good `$NACL_ROOT` values: |
27 to the directory has no spaces. Examples of good <code>$NACL_ROOT</code> | 24 - `/home/me/nativeclient` *(Linux)* |
28 values:<br><br><code>/home/me/nativeclient</code> | 25 - `/Users/me/nativeclient` *(Mac)* |
29 <em>(Linux)</em><br><code>/Users/me/nativeclient</code> | 26 - `C:\nativeclient` *(Windows)* |
30 <em>(Mac)</em><br><code>C:\nativeclient</code> <em>(Windows)</em><br><br> | 27 5. In a shell window, execute the following commands: |
31 </li><li>In a shell window, execute the following commands:<br> | |
32 <pre><code>cd $NACL_ROOT<br> | |
33 gclient config https://chromium.googlesource.com/native_client/src/native_cl
ient<br> | |
34 </code></pre> | |
35 </li><li>Download the code (this might take a few minutes):<br> | |
36 <pre><code>cd $NACL_ROOT<br> | |
37 gclient sync<br> | |
38 </code></pre> | |
39 </li></ol> | |
40 | 28 |
41 Here's what the <code>gclient</code> steps do:<br> <ul><li><code>gclient | 29 cd $NACL_ROOT |
42 config</code> sets up your working directory, creating a <code>.gclient</code> | 30 gclient config https://chromium.googlesource.com/native_client/src/nativ
e_client |
43 file that identifies the structure to pull from the repository.<br> | 31 cd $NACL_ROOT |
44 </li><li><code>gclient sync</code> creates several subdirectories and downloads | 32 gclient sync |
45 the latest Native Client files.</li></ul> | |
46 | 33 |
47 To update the Native Client source code, run <code>gclient sync</code> from | 34 Here's what the `gclient` steps do: |
48 <code>$NACL_ROOT</code> or any of its subdirectories.<br> <br> Once you've | 35 |
49 downloaded the source code, you can build Native Client. To do so, you need | 36 1. `gclient config` sets up your working directory, creating a `.gclient` file |
50 Python and a platform-specific development environment. Details on prerequisites | 37 that identifies the structure to pull from the repository. |
51 and how to build are in <a | 38 2. `gclient sync` creates several subdirectories and downloads the latest Native |
52 href='http://www.chromium.org/nativeclient/how-tos/build-tcb'>Building Native | 39 Client files. |
53 Client</a>. | 40 |
| 41 To update the Native Client source code, run `gclient sync` from `$NACL_ROOT` or |
| 42 any of its subdirectories. Once you've downloaded the source code, you can |
| 43 build Native Client. To do so, you need Python and a platform-specific |
| 44 development environment. Details on prerequisites and how to build are in |
| 45 [Building Native |
| 46 Client](href='http://www.chromium.org/nativeclient/how-tos/build-tcb). |
OLD | NEW |