| 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 ## Engine inside a Docker container |
| 43 | 33 |
| 44 Create another out-directory and set the GN args. Note, when building to run | 34 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 set the target_os to "c
hromeos": | 35 inside a [Docker container](container.md) you'll need to set the target_os to "c
hromeos": |
| 46 | 36 |
| 47 ```bash | 37 ```bash |
| 48 mkdir -p out-chromeos/Debug | 38 mkdir -p out-docker/Debug |
| 49 gn args out-chromeos/Debug | 39 echo "import(\"//build/args/blimp_engine_containerized.gn\")" > out-docker/Debug
/args.gn |
| 50 ``` | 40 gn gen out-docker/Debug |
| 51 | |
| 52 This will bring an editor, where you can type in the following: | |
| 53 | |
| 54 ```bash | |
| 55 target_os = "chromeos" | |
| 56 is_debug = true | |
| 57 is_clang = true | |
| 58 symbol_level = 1 # Use -g1 instead of -g2 | |
| 59 use_goma = true | |
| 60 use_aura = true | |
| 61 use_ozone = true | |
| 62 use_alsa = false | |
| 63 use_pulseaudio = false | |
| 64 ``` | 41 ``` |
| 65 | 42 |
| 66 To build: | 43 To build: |
| 67 | 44 |
| 68 ```bash | 45 ```bash |
| 69 ninja -C out-chromeos/Debug blimp | 46 ninja -C out-docker/Debug blimp |
| 70 ``` | 47 ``` |
| 71 | 48 |
| 72 ## "Bare" engine, no Docker container | 49 ## "Bare" engine, no Docker container |
| 73 | 50 |
| 74 Create another out-directory and set the GN args: | 51 Create another out-directory and set the GN args: |
| 75 | 52 |
| 76 ```bash | 53 ```bash |
| 77 mkdir -p out-linux/Debug | 54 mkdir -p out-linux/Debug |
| 78 gn args out-linux/Debug | 55 echo "import(\"//build/args/blimp_engine.gn\")" > out-linux/Debug/args.gn |
| 79 ``` | 56 gn gen out-linux/Debug |
| 80 | |
| 81 This will bring an editor, where you can type in the following: | |
| 82 | |
| 83 ```bash | |
| 84 is_debug = true | |
| 85 is_clang = true | |
| 86 is_component_build = true | |
| 87 symbol_level = 1 # Use -g1 instead of -g2 | |
| 88 use_goma = true | |
| 89 use_aura = true | |
| 90 use_ozone = true | |
| 91 ``` | 57 ``` |
| 92 | 58 |
| 93 To build: | 59 To build: |
| 94 | 60 |
| 95 ```bash | 61 ```bash |
| 96 ninja -C out-linux/Debug blimp | 62 ninja -C out-linux/Debug blimp |
| 97 ``` | 63 ``` |
| OLD | NEW |