Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: blimp/docs/running.md

Issue 1718103003: Update blimp documentation and add examples (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « blimp/docs/build.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Running Blimp 1 # Running Blimp
2 2
3 See [build](build.md) for instructions on how to build Blimp. 3 See [build](build.md) for instructions on how to build Blimp.
4 4
5 ## Running the client 5 ## Running the client
6 6
7 There are both Android and Linux clients. The Android client is the shipping 7 There are both Android and Linux clients. The Android client is the shipping
8 client while the Linux client is used for development purposes. 8 client while the Linux client is used for development purposes.
9 9
10 ### Android Client 10 ### Android Client
11 11
12 Install the Blimp APK with the following: 12 Install the Blimp APK with the following:
13 13
14 ```bash 14 ```bash
15 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/Blimp.apk 15 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/Blimp.apk
16 ``` 16 ```
17 17
18 Set up any command line flags with: 18 Set up any command line flags with:
19 19
20 ```bash 20 ```bash
21 ./build/android/adb_blimp_command_line --enable-webgl 21 ./build/android/adb_blimp_command_line --your-flag-here
22 ``` 22 ```
23 23
24 To have the client connect to a custom engine use the `--blimplet-endpoint` 24 To have the client connect to a custom engine use the `--blimplet-endpoint`
25 flag. This takes values in the form of scheme:ip:port. The possible valid 25 flag. This takes values in the form of scheme:ip:port. The possible valid
26 schemes are 'tcp', 'quic', and 'ssl'. An example valid endpoint would be 26 schemes are 'tcp', 'quic', and 'ssl'. An example valid endpoint would be
27 `--blimplet-endpoint=tcp:127.0.0.1:500`. 27 `--blimplet-endpoint=tcp:127.0.0.1:25467`.
28
29 To see your current command line, run `adb_blimp_command_line` without any
30 arguments.
28 31
29 Run the Blimp APK with: 32 Run the Blimp APK with:
30 33
31 ```bash 34 ```bash
32 adb_run_blimp_client 35 ./build/android/adb_run_blimp_client
33 ``` 36 ```
34 37
35 ### Linux Client 38 ### Linux Client
36 39
37 TBD 40 The blimp client is built as part of the `blimp` target. To run it with local
41 logging enabled, execute:
42
43 ```bash
44 ./out-linux/Debug/blimp_shell \
45 --user-data-dir=/tmp/blimpclient \
46 --enable-logging=stderr \
47 --vmodule="*=1"
48 ```
49
50 ### Instructing client to connect to specific host
51 If you run the engine on your local host and you want the client to connect to
52 it instead of using the assigner, you need to instruct the client to use the
53 correct host and port to connect to by giving it the correct command line flag.
54
55 Typically this flag would be:
56
57 ```bash
58 --blimplet-endpoint=tcp:127.0.0.1:25467
59 ```
38 60
39 ## Running the engine 61 ## Running the engine
40 62
41 ### In a container 63 ### In a container
42 For running the engine in a container, see [container](container.md). 64 For running the engine in a container, see [container](container.md).
43 65
44 ### On a workstation 66 ### On a workstation
67 To run the engine on a workstation and make your Android client connect to it,
68 you need to forward a port from the Android device to the host, and also
69 instruct the client to connect using that port on its localhost address.
70
71 #### Port forwarding
45 If you are running the engine on your workstation and are connected to the 72 If you are running the engine on your workstation and are connected to the
46 client device via USB, you'll need remote port forwarding to allow the Blimp 73 client device via USB, you'll need remote port forwarding to allow the Blimp
47 client to talk to your computer. Follow the instructions 74 client to talk to your computer.
48 [here](https://developer.chrome.com/devtools/docs/remote-debugging) to get
49 started. You'll probably want to remap 25467 to "localhost:25467".
50 75
51 ### Required flags 76 ##### Option A
52 * `--blimp-client-token-path=$PATH`: Path to a file containing a nonempty 77 Follow the
53 token string. If this is not present, the engine will fail to boot. 78 [remote debugging instructions](https://developer.chrome.com/devtools/docs/remot e-debugging)
79 to get started. You'll probably want to remap 25467 to "localhost:25467".
80 *Note* This requires the separate `Chrome` application to be running on the
81 device. Otherwise you will not see the green light for the port forwarding.
54 82
83 ##### Option B
84 If you are having issues with using the built-in Chrome port forwarding, you can
85 also start a new shell and keep the following command running:
86
87 ```bash
88 ./build/android/adb_reverse_forwarder.py --debug -v 25467 25467
89 ```
90
91 ### Required engine binary flags
92 * `--blimp-client-token-path=$PATH`: Path to a file containing a nonempty
93 token string. If this is not present, the engine will fail to boot.
94 * `--use-remote-compositing`: Ensures that the renderer uses the remote
95 compositor.
96 * `--disable-cached-picture-raster`: Ensures that rasterized content is not
97 destroyed before serialization.
98
99 #### Typical invocation
100 When the client connects to a manually specified engine instead of using the
101 assigner, it will use a dummy token. The engine needs to know what this token
102 is, so it must be provided using the `--blimp-client-token-path` flag. The token
103 is available in the constant `kDummyClientToken` in
104 `blimp/client/session/assignment_source.h`. You can easily store that to a file
105 by running the following command once:
106
107 ```bash
108 awk '{if ( match($0, /^\s*const char kDummyClientToken.*/) ) { print substr($5, 2, length($5)-3);} }' \
109 ./blimp/client/session/assignment_source.h > /tmp/blimpengine-token
110 ```
111
112 Then start the engine using these flags:
113
114 ```bash
115 out-linux/Debug/blimp_engine_app \
116 --use-remote-compositing \
117 --disable-cached-picture-raster \
118 --blimp-client-token-path=/tmp/blimpengine-token \
119 --user-data-dir=/tmp/blimpengine \
120 --enable-logging=stderr \
121 --vmodule="blimp*=1"
122 ```
OLDNEW
« no previous file with comments | « blimp/docs/build.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698