| OLD | NEW |
| 1 Mojo | 1 Mojo |
| 2 ==== | 2 ==== |
| 3 | 3 |
| 4 Mojo is an effort to extract a common platform out of Chrome's renderer and | 4 Mojo is an effort to extract a common platform out of Chrome's renderer and |
| 5 plugin processes that can support multiple types of sandboxed content, such as | 5 plugin processes that can support multiple types of sandboxed content, such as |
| 6 HTML, Pepper, or NaCl. | 6 HTML, Pepper, or NaCl. |
| 7 | 7 |
| 8 ## Set-up and code check-out | 8 ## Set-up and code check-out |
| 9 | 9 |
| 10 The instructions below only need to be done once. Note that a simple "git clone" | 10 The instructions below only need to be done once. Note that a simple "git clone" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 Because the dart analyzer is a bit slow, we don't run it unless the user | 205 Because the dart analyzer is a bit slow, we don't run it unless the user |
| 206 specifically asks for it. To run the dart analyzer against the list of dart | 206 specifically asks for it. To run the dart analyzer against the list of dart |
| 207 targets in the toplevel BUILD.gn file, run: | 207 targets in the toplevel BUILD.gn file, run: |
| 208 | 208 |
| 209 ``` | 209 ``` |
| 210 $ mojo/tools/mojob.py dartcheck | 210 $ mojo/tools/mojob.py dartcheck |
| 211 ``` | 211 ``` |
| 212 | 212 |
| 213 ## Run Mojo Shell | 213 ## Run Mojo Shell |
| 214 | 214 |
| 215 Devtools script `mojo_shell` is a universal shell runner abstracting away the | 215 Devtools script `mojo_run` is a universal shell runner abstracting away the |
| 216 differences between running on Linux and Android. Having built Mojo as | 216 differences between running on Linux and Android. Having built Mojo as |
| 217 described above, a demo app can be run as follows: | 217 described above, a demo app can be run as follows: |
| 218 | 218 |
| 219 ``` | 219 ``` |
| 220 mojo/devtools/common/mojo_shell mojo:spinning_cube # Linux. | 220 mojo/devtools/common/mojo_run mojo:spinning_cube # Linux. |
| 221 mojo/devtools/common/mojo_shell mojo:spinning_cube --android # Android. | 221 mojo/devtools/common/mojo_run mojo:spinning_cube --android # Android. |
| 222 ``` | 222 ``` |
| 223 | 223 |
| 224 Pass `--sky path_to_sky_file` to run a | 224 Pass `--sky path_to_sky_file` to run a |
| 225 [Sky](https://github.com/domokit/mojo/tree/master/sky) app on either platform: | 225 [Sky](https://github.com/domokit/mojo/tree/master/sky) app on either platform: |
| 226 ``` | 226 ``` |
| 227 mojo/devtools/common/mojo_shell --sky sky/examples/raw/hello_world.dart | 227 mojo/devtools/common/mojo_run --sky sky/examples/raw/hello_world.dart |
| 228 mojo/devtools/common/mojo_shell --sky sky/examples/raw/hello_world.dart --androi
d | 228 mojo/devtools/common/mojo_run --sky sky/examples/raw/hello_world.dart --android |
| 229 ``` | 229 ``` |
| 230 | 230 |
| 231 Passing the `-v` flag will increase the output verbosity. In particular, it will | 231 Passing the `-v` flag will increase the output verbosity. In particular, it will |
| 232 also print all arguments passed by `mojo_shell` to the shell binary. | 232 also print all arguments passed by `mojo_run` to the shell binary. |
| 233 | 233 |
| 234 ### Chromoting | 234 ### Chromoting |
| 235 | 235 |
| 236 Some Mojo apps (Sky apps in particular) will need the --use-osmesa flag to run | 236 Some Mojo apps (Sky apps in particular) will need the --use-osmesa flag to run |
| 237 over [chromoting](https://support.google.com/chrome/answer/1649523?hl=en): | 237 over [chromoting](https://support.google.com/chrome/answer/1649523?hl=en): |
| 238 | 238 |
| 239 ``` | 239 ``` |
| 240 mojo/devtools/common/mojo_shell --sky sky/examples/raw/hello_world.dart --use-os
mesa | 240 mojo/devtools/common/mojo_run --sky sky/examples/raw/hello_world.dart --use-osme
sa |
| 241 ``` | 241 ``` |
| 242 | 242 |
| 243 ### <a name="debugging"></a>Debugging, tracing, profiling | 243 ### <a name="debugging"></a>Debugging, tracing, profiling |
| 244 | 244 |
| 245 Devtools `debugger` script allows you to interactively inspect a running shell, | 245 Devtools `mojo_debug` script allows you to interactively inspect a running |
| 246 collect performance traces and attach a gdb debugger. Refer to the | 246 shell, collect performance traces and attach a gdb debugger. Refer to the |
| 247 [documentation](https://github.com/domokit/devtools/blob/master/README.md#debugg
er) | 247 [documentation](https://github.com/domokit/devtools/blob/master/README.md#debugg
er) |
| 248 for details. | 248 for details. |
| 249 | 249 |
| 250 ### Android set-up | 250 ### Android set-up |
| 251 | 251 |
| 252 #### Adb | 252 #### Adb |
| 253 | 253 |
| 254 For the Android tooling to work, you will need to have `adb` in your PATH. For | 254 For the Android tooling to work, you will need to have `adb` in your PATH. For |
| 255 that, you can either run: | 255 that, you can either run: |
| 256 ``` | 256 ``` |
| (...skipping 15 matching lines...) Expand all Loading... |
| 272 running shell on the device) will not work unless the device is rooted and | 272 running shell on the device) will not work unless the device is rooted and |
| 273 running a userdebug build. For Googlers, [follow the instructions at this | 273 running a userdebug build. For Googlers, [follow the instructions at this |
| 274 link](http://go/mojo-internal-build-instructions). | 274 link](http://go/mojo-internal-build-instructions). |
| 275 | 275 |
| 276 ### Running manually on Linux | 276 ### Running manually on Linux |
| 277 | 277 |
| 278 If you wish to, you can also run the Linux Mojo shell directly with no wrappers: | 278 If you wish to, you can also run the Linux Mojo shell directly with no wrappers: |
| 279 ``` | 279 ``` |
| 280 ./out/Debug/mojo_shell mojo:spinning_cube | 280 ./out/Debug/mojo_shell mojo:spinning_cube |
| 281 ``` | 281 ``` |
| OLD | NEW |