OLD | NEW |
1 # Using GN | 1 # Using GN |
2 Blimp only supports building using [GN](../../tools/gn/README.md). A quick | 2 Blimp only supports building using [GN](../../tools/gn/README.md). A quick |
3 overview over how to use GN can be found in the GN | 3 overview over how to use GN can be found in the GN |
4 [quick start guide](../../tools/gn/docs/quick_start.md). | 4 [quick start guide](../../tools/gn/docs/quick_start.md). |
5 | 5 |
6 There are three different build configurations depending on what you want to | 6 There are three different build configurations depending on what you want to |
7 build: | 7 build: |
8 | 8 |
9 ## Android client | 9 ## Android client |
10 | 10 |
11 Create an out-directory and set the GN args: | 11 Create an out-directory and set the GN args: |
12 | 12 |
13 ```bash | 13 ```bash |
14 mkdir -p out-android/Debug | 14 mkdir -p out-android/Debug |
15 gn args out-android/Debug | 15 echo "import(\"//build/args/blimp_client.gn\")" > out-android/Debug/args.gn |
16 ``` | 16 gn gen out-android/Debug |
17 | |
18 This will bring up an editor, where you can type in the following: | |
19 | |
20 ```bash | |
21 target_os = "android" | |
22 is_debug = true | |
23 is_clang = true | |
24 is_component_build = true | |
25 symbol_level = 1 # Use -g1 instead of -g2 | |
26 use_goma = true | |
27 ``` | 17 ``` |
28 | 18 |
29 To build: | 19 To build: |
30 | 20 |
31 ```bash | 21 ```bash |
32 ninja -C out-android/Debug blimp | 22 ninja -C out-android/Debug blimp |
33 ``` | 23 ``` |
34 | 24 |
35 You can also build and install incremental APK like this: | 25 You can also build and install incremental APK like this: |
36 | 26 |
37 ```bash | 27 ```bash |
38 ninja -C out-android/Debug blimp blimp_apk_incremental && | 28 ninja -C out-android/Debug blimp blimp_apk_incremental && |
39 out-android/Debug/bin/install_blimp_apk_incremental | 29 out-android/Debug/bin/install_blimp_apk_incremental |
40 ``` | 30 ``` |
41 | 31 |
42 ## Engine inside a Docker container | 32 To add your own build preferences |
43 | |
44 Create another out-directory and set the GN args. Note, when building to run | |
45 inside a [Docker container](container.md) you'll need to turn off several | |
46 dependencies: | |
47 | |
48 ```bash | 33 ```bash |
49 mkdir -p out-docker/Debug | 34 gn args out-android/Debug |
50 gn args out-docker/Debug | |
51 ``` | 35 ``` |
52 | 36 |
53 This will bring an editor, where you can type in the following: | 37 ## Engine |
54 | |
55 ```bash | |
56 target_os = "linux" | |
57 is_debug = true | |
58 is_clang = true | |
59 symbol_level = 1 # Use -g1 instead of -g2 | |
60 use_goma = true | |
61 use_aura = true | |
62 use_ozone = true | |
63 use_alsa = false | |
64 use_pulseaudio = false | |
65 use_cups = false | |
66 use_glib = false | |
67 ``` | |
68 | |
69 To build: | |
70 | |
71 ```bash | |
72 ninja -C out-docker/Debug blimp | |
73 ``` | |
74 | |
75 ## "Bare" engine, no Docker container | |
76 | 38 |
77 Create another out-directory and set the GN args: | 39 Create another out-directory and set the GN args: |
78 | 40 |
79 ```bash | 41 ```bash |
80 mkdir -p out-linux/Debug | 42 mkdir -p out-linux/Debug |
81 gn args out-linux/Debug | 43 echo "import(\"//build/args/blimp_engine.gn\")" > out-linux/Debug/args.gn |
82 ``` | 44 gn gen out-linux/Debug |
83 | |
84 This will bring an editor, where you can type in the following: | |
85 | |
86 ```bash | |
87 is_debug = true | |
88 is_clang = true | |
89 is_component_build = true | |
90 symbol_level = 1 # Use -g1 instead of -g2 | |
91 use_goma = true | |
92 use_aura = true | |
93 use_ozone = true | |
94 ``` | 45 ``` |
95 | 46 |
96 To build: | 47 To build: |
97 | 48 |
98 ```bash | 49 ```bash |
99 ninja -C out-linux/Debug blimp | 50 ninja -C out-linux/Debug blimp |
100 ``` | 51 ``` |
| 52 |
| 53 To add your own build preferences |
| 54 ```bash |
| 55 gn args out-android/Debug |
| 56 ``` |
OLD | NEW |