| OLD | NEW |
| 1 Desktop | 1 Desktop |
| 2 ======= | 2 ======= |
| 3 | 3 |
| 4 Instructions to get started with Skia on desktop systems (Linux, Mac OS X, or Wi
ndows). | 4 Instructions to get started with Skia on desktop systems (Linux, Mac OS X, or Wi
ndows). |
| 5 | 5 |
| 6 1. [Download Skia](/user/download) | 6 1. [Download Skia](/user/download) |
| 7 | 7 |
| 8 <!--?prettify lang=sh?--> | 8 <!--?prettify lang=sh?--> |
| 9 | 9 |
| 10 git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.
git' | 10 git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.
git' |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 <!--?prettify lang=sh?--> | 24 <!--?prettify lang=sh?--> |
| 25 | 25 |
| 26 python bin/sync-and-gyp | 26 python bin/sync-and-gyp |
| 27 ninja -C out/Debug | 27 ninja -C out/Debug |
| 28 out/Debug/dm | 28 out/Debug/dm |
| 29 | 29 |
| 30 Gyp Options | 30 Gyp Options |
| 31 ----------- | 31 ----------- |
| 32 | 32 |
| 33 When running `sync-and-gyp`, the `GYP_DEFINES` environment variable can | 33 Skia relies on Gyp to generate build files. Read about |
| 34 be used to change Skia’s compile-time settings, using a | 34 [specifying options for Gyp](/user/tips#gypdefines) to set the |
| 35 space-separated list of key=value pairs. For example, to disable both | 35 compile-time settings, compiler, build systems, and build directory. |
| 36 the Skia GPU backend and PDF backends, run it as follows: | |
| 37 | |
| 38 <!--?prettify lang=sh?--> | |
| 39 | |
| 40 GYP_DEFINES='skia_gpu=0 skia_pdf=0' python bin/sync-and-gyp | |
| 41 ninja -C out/Debug | |
| 42 | |
| 43 Note: Setting enviroment variables in the Windows CMD.EXE shell [uses a | |
| 44 different syntax](./windows#env). | |
| 45 | |
| 46 You can also set environment variables such as `CC`, `CXX`, | |
| 47 `CFLAGS`, or `CPPFLAGS` to control how Skia is compiled. For | |
| 48 example: | |
| 49 | |
| 50 <!--?prettify lang=sh?--> | |
| 51 | |
| 52 CC='clang' CXX='clang++' python bin/sync-and-gyp | |
| 53 ninja -C out/Debug | |
| 54 | |
| 55 The `GYP_GENERATORS` environment variable can be used to set the | |
| 56 build systems that you want to use (as a comma-separated list). | |
| 57 The default is `'ninja,msvs-ninja'` on Windows, `'ninja,xcode'` on | |
| 58 Mac OS X, and just `'ninja'` on Linux. For example, to generate | |
| 59 only Ninja files on Mac: | |
| 60 | |
| 61 <!--?prettify lang=sh?--> | |
| 62 | |
| 63 GYP_GENERATORS='ninja' python bin/sync-and-gyp | |
| 64 ninja -C out/Debug | |
| 65 | |
| 66 Finally, the `SKIA_OUT` environment variable can be used to set | |
| 67 the path for the build directory. The default is `out` inside the | |
| 68 top-level Skia source directory. For example to test Skia with | |
| 69 two different compilers: | |
| 70 | |
| 71 <!--?prettify lang=sh?--> | |
| 72 | |
| 73 CC='clang' CXX='clang++' SKIA_OUT=~/build/skia_clang python bin/sync-and-gyp | |
| 74 CC='gcc' CXX='g++' SKIA_OUT=~/build/skia_gcc python bin/sync-and-gyp | |
| 75 ninja -C ~/build/skia_clang/Debug | |
| 76 ninja -C ~/build/skia_gcc/Debug | |
| 77 | 36 |
| 78 Run unit and correctness tests | 37 Run unit and correctness tests |
| 79 ------------------------------ | 38 ------------------------------ |
| 80 | 39 |
| 81 [DM](../../dev/testing/testing) ("diamond master") is the Skia test app. | 40 [DM](../../dev/testing/testing) ("diamond master") is the Skia test app. |
| 82 | 41 |
| 83 <!--?prettify lang=sh?--> | 42 <!--?prettify lang=sh?--> |
| 84 | 43 |
| 85 ninja -C out/Debug dm | 44 ninja -C out/Debug dm |
| 86 out/Debug/dm | 45 out/Debug/dm |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 85 |
| 127 <!--?prettify lang=sh?--> | 86 <!--?prettify lang=sh?--> |
| 128 | 87 |
| 129 git fetch origin | 88 git fetch origin |
| 130 git checkout origin/master | 89 git checkout origin/master |
| 131 | 90 |
| 132 Contribute to Skia | 91 Contribute to Skia |
| 133 ------------------ | 92 ------------------ |
| 134 | 93 |
| 135 [How to use Git and Git-cl to contribute to Skia](/dev/contrib/submit). | 94 [How to use Git and Git-cl to contribute to Skia](/dev/contrib/submit). |
| OLD | NEW |