1Desktop 2======= 3 4Instructions to get started with Skia on desktop systems (Linux, Mac OS X, or Windows). 5 61. [Download Skia](/user/download) 7 8 <!--?prettify lang=sh?--> 9 10 git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' 11 export PATH="${PWD}/depot_tools:${PATH}" 12 git clone 'https://skia.googlesource.com/skia.git' 13 cd skia 14 15 (On Windows without git, swap steps 1 and 2) 16 172. Install system-specific prerequisites. 18 - [Linux](/user/quick/linux) 19 - [Mac OS X](/user/quick/macos) 20 - [Windows](/user/quick/windows) 21 223. Sync dependencies and config. Build. Run tests. 23 24 <!--?prettify lang=sh?--> 25 26 python bin/sync-and-gyp 27 ninja -C out/Debug 28 out/Debug/dm 29 30Gyp Options 31----------- 32 33Skia relies on Gyp to generate build files. Read about 34[specifying options for Gyp](/user/tips#gypdefines) to set the 35compile-time settings, compiler (e.g. use clang instead of gcc), build systems, 36and build directory. 37 38Run unit and correctness tests 39------------------------------ 40 41[DM](../../dev/testing/testing) ("diamond master") is the Skia test app. 42 43<!--?prettify lang=sh?--> 44 45 ninja -C out/Debug dm 46 out/Debug/dm 47 48Run Skia samples 49---------------- 50 51[SampleApp](../sample/sampleapp) is the Skia sample program. 52 53<!--?prettify lang=sh?--> 54 55 ninja -C out/Debug SampleApp 56 out/Debug/SampleApp 57 58Build non-debug binaries 59------------------------ 60 61The usual mode you want for testing is Debug mode (`SK_DEBUG` is 62defined, and debug symbols are included in the binary). If you 63would like to build the Release mode: 64 65<!--?prettify lang=sh?--> 66 67 ninja -C out/Release 68 69Performance tests 70----------------- 71 72Build and run nanobench (performance tests). In this case, we will 73build with the "Release" configuration, since we are running 74performance tests. 75 76<!--?prettify lang=sh?--> 77 78 ninja -C out/Release nanobench 79 out/Release/nanobench 80 out/Release/nanobench --skps .../path/to/*.skp 81 82<!-- TODO(mtklein): document nanobench --> 83 84Keeping up to date 85------------------ 86 87<!--?prettify lang=sh?--> 88 89 git fetch origin 90 git checkout origin/master 91 92Contribute to Skia 93------------------ 94 95[How to use Git and Git-cl to contribute to Skia](/dev/contrib/submit). 96