| OLD | NEW |
| 1 # ChromeOS Build Instructions (Chromium OS on Linux) | 1 # ChromeOS Build Instructions (Chromium OS on Linux) |
| 2 | 2 |
| 3 Chromium on Chromium OS is built on a mix of code sourced from Chromium | 3 Chromium on Chromium OS is built from a mix of code sourced from Chromium |
| 4 on Linux and Chromium on Windows. Much of the user interface code is | 4 on Linux and Chromium on Windows. Much of the user interface code is |
| 5 shared with Chromium on Windows. As such, if you make a change to | 5 shared with Chromium on Windows. |
| 6 Chromium on Windows you may find your changes affect Chromium on | 6 |
| 7 Chromium OS. Fortunately to test the effect of your changes you don't | 7 If you make changes to Chromium on Windows, they may affect Chromium |
| 8 have to build all of Chromium OS, you can just build Chromium for | 8 on Chromium OS. Fortunately to test the effects of your changes you |
| 9 don't need to build all of Chromium OS, you can just build Chromium for |
| 9 Chromium OS directly on Linux. | 10 Chromium OS directly on Linux. |
| 10 | 11 |
| 11 First, follow the [normal Linux build | 12 First, follow the [normal Linux build |
| 12 instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux
_build_instructions.md) | 13 instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux
_build_instructions.md) |
| 13 as usual to get a Chromium checkout. | 14 as usual to get a Chromium checkout. |
| 14 | 15 |
| 15 ## Building and running Chromium with Chromium OS UI on your local machine | 16 ## Building and running Chromium with Chromium OS UI on your local machine |
| 16 | 17 |
| 17 If you plan to test the Chromium build on your dev machine and not a | 18 If you plan to test the Chromium build on your dev machine and not a |
| 18 Chromium OS device, run the following in your chromium checkout: | 19 Chromium OS device, run the following in your chromium checkout: |
| 19 | 20 |
| 20 $ gn gen out/Default --args='target_os="chromeos"' | 21 $ gn gen out/Default --args='target_os="chromeos"' |
| 21 $ ninja -C out/Default | 22 $ ninja -C out/Default |
| 22 | 23 |
| 23 NOTE: You may wish to replace 'Default' with something like 'Cros' if | 24 NOTE: You may wish to replace 'Default' with something like 'Cros' if |
| 24 you switch back and forth between Linux and Chromium OS builds, or 'Debug' | 25 you switch back and forth between Linux and Chromium OS builds, or 'Debug' |
| 25 if you want to differentiate between Debug and Release builds (see below) | 26 if you want to differentiate between Debug and Release builds (see below) |
| 26 or DebugCros or whatever you like. | 27 or DebugCros or whatever you like. |
| 27 | 28 |
| 28 Now, when you build, you will build with Chromium OS features turned on. | 29 Now, when you build, you will build with Chromium OS features turned on. |
| 29 | 30 |
| 30 See [GN Build Configuration](https://www.chromium.org/developers/gn-build-config
uration) | 31 See [GN Build Configuration](https://www.chromium.org/developers/gn-build-config
uration) |
| 31 for more information about configuring your build. | 32 for more information about configuring your build. |
| 32 | 33 |
| 33 Some additional options you may wish to set: | 34 If you have not already done so, be sure to set the following to prevent |
| 34 ``` | 35 'gclient runhooks' from executing 'gyp_chromium': |
| 36 |
| 37 export GYP_CHROMIUM_NO_ACTION=1 |
| 38 |
| 39 Some additional options you may wish to set by passing in **--args** to |
| 40 **gn gen** or running **gn args out/Default**: |
| 41 |
| 35 is_component_build = true | 42 is_component_build = true |
| 36 use_goma = true | 43 use_goma = true |
| 37 is_debug = false # Release build | 44 is_debug = false # Release build |
| 38 dcheck_always_on = true # Enable DCHECK (with is_debug = false) | 45 dcheck_always_on = true # Enable DCHECK (with is_debug = false) |
| 39 is_official_build = true | 46 is_official_build = true |
| 40 is_chrome_branded = true | 47 is_chrome_branded = true |
| 41 ``` | |
| 42 | 48 |
| 43 ## Notes | 49 ## Notes |
| 44 | 50 |
| 45 When you build Chromium OS Chromium, you'll be using the TOOLKIT\_VIEWS | 51 When you build Chromium OS Chromium, you'll be using the TOOLKIT\_VIEWS |
| 46 front-end just like Windows, so the files you'll probably want are in | 52 front-end just like Windows, so the files you'll probably want are in |
| 47 src/ui/views and src/chrome/browser/ui/views. | 53 src/ui/views and src/chrome/browser/ui/views. |
| 48 | 54 |
| 49 When target_os = "chromeos", then toolkit\_views need not (and should not) | 55 When target_os = "chromeos", then toolkit\_views need not (and should not) |
| 50 be specified. | 56 be specified. |
| 51 | 57 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 69 **username@gmail.com** | 75 **username@gmail.com** |
| 70 * For subsequent runs, add the following to the command line: | 76 * For subsequent runs, add the following to the command line: |
| 71 **--user-data-dir=/tmp/chrome --login-user=username@gmail.com**. | 77 **--user-data-dir=/tmp/chrome --login-user=username@gmail.com**. |
| 72 * To run in guest mode instantly, you can run add the arguments | 78 * To run in guest mode instantly, you can run add the arguments |
| 73 **--user-data-dir=/tmp/chrome --bwsi --incognito | 79 **--user-data-dir=/tmp/chrome --bwsi --incognito |
| 74 --login-user='$guest' --login-profile=user** | 80 --login-user='$guest' --login-profile=user** |
| 75 | 81 |
| 76 Signing in as a specific user is useful for debugging features like sync | 82 Signing in as a specific user is useful for debugging features like sync |
| 77 that require a logged in user. | 83 that require a logged in user. |
| 78 | 84 |
| 79 ## Compile Testing Chromium with the Chromium OS SDK (quick version) | 85 ## Compile Chromium for a Chromium OS device using the Chromium OS SDK |
| 80 | 86 |
| 81 See [Building Chromium for a Chromium OS device](https://www.chromium.org/chromi
um-os/how-tos-and-troubleshooting/building-chromium-browser) | 87 See [Building Chromium for a Chromium OS device](https://www.chromium.org/chromi
um-os/how-tos-and-troubleshooting/building-chromium-browser) |
| 82 for information about building & testing chromium for Chromium OS. | 88 for information about building and testing chromium for Chromium OS. |
| OLD | NEW |