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

Side by Side Diff: site/user/quick/linux.md

Issue 1439493003: Documentation: clean up (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-11-13 (Friday) 07:21:08 EST Created 5 years, 1 month 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 | « site/user/quick/ios.md ('k') | site/user/quick/macos.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Linux 1 Linux
2 ===== 2 =====
3 3
4 Quickstart 4 Quickstart
5 ---------- 5 ----------
6 6
7 1. Install depot tools. 7 <!--?prettify lang=sh?-->
8 8
9 <!--?prettify lang=sh?-->
10 9
11 git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools. git' 10 # Install depot_tools (this provides ninja and git-cl).
12 export PATH="${PWD}/depot_tools:${PATH}" 11 git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
12 export PATH="${PWD}/depot_tools:${PATH}"
13 13
14 2. Get Skia. 14 # Get Skia.
15 git clone 'https://skia.googlesource.com/skia'
16 cd skia
15 17
16 <!--?prettify lang=sh?--> 18 # Install Dependencies (may require sudo).
19 tools/install_dependencies.sh
17 20
18 git clone 'https://skia.googlesource.com/skia' 21 # Sync, Config, and Build.
19 cd skia 22 bin/sync-and-gyp
23 ninja -C out/Debug dm SampleApp
20 24
21 3. Install Dependencies (may require sudo). 25 # Run DM, the Skia test app.
26 out/Debug/dm
22 27
23 <!--?prettify lang=sh?--> 28 # Run SampleApp.
29 out/Debug/SampleApp
24 30
25 tools/install_dependencies.sh 31 # Run nanobench, the Skia benchmarking tool.
32 ninja -C out/Release nanobench
33 out/Release/nanobench
26 34
27 4. Build.
28
29 <!--?prettify lang=sh?-->
30
31 bin/sync-and-gyp && ninja -C out/Debug
32
33 5. Run DM (the Skia test app) and SampleApp.
34
35 <!--?prettify lang=sh?-->
36
37 out/Debug/dm
38 out/Debug/SampleApp
39 35
40 <a name="prerequisites"></a>Prerequisites 36 <a name="prerequisites"></a>Prerequisites
41 ------------- 37 -----------------------------------------
42 38
43 On a Ubuntu 12.04 (Precise) or Ubuntu 14.04 (Trusty) system, you can run 39 On a Ubuntu 12.04 (Precise) or Ubuntu 14.04 (Trusty) system, you can run
44 `tools/install_dependencies.sh`, which will install the needed packages. On 40 `tools/install_dependencies.sh`, which will install the needed packages. On
45 Ubuntu 12.04, you will need to install the`ninja` build tool separately, which 41 Ubuntu 12.04, you will need to install the`ninja` build tool separately, which
46 comes with Chromium's `depot_tools`. 42 comes with Chromium's `depot_tools`.
47 43
48 To contribute changes back to Skia, you will need `git-cl`, which comes with Chr omium's `depot_tools`. 44 To contribute changes back to Skia, you will need `git-cl`, which
45 comes with Chromium's `depot_tools`.
49 46
50 (If you use another Linux distribution, please consider contributing back 47 (If you use another Linux distribution, please consider contributing back
51 instructions for installing the required packages — we can then incorporate 48 instructions for installing the required packages — we can then incorporate
52 that knowledge into the `tools/install_dependencies.sh` tool.) 49 that knowledge into the `tools/install_dependencies.sh` tool.)
53 50
54 Make sure the following have been installed: 51 Make sure the following have been installed:
55 52
56 * Chromium depot_tools: http://www.chromium.org/developers/how-tos/depottools 53 * [Chromium depot_tools](http://www.chromium.org/developers/how-tos/depottools )
57 * A C++ compiler (typically gcc) 54
58 * python 2.7.x 55 * A C++ compiler (typically GCC or Clang) **build-essential** or **clang-3.6**
59 * suggested Ubuntu packages: python2.7, python2.7-dev 56
60 * The FreeType and Fontconfig font engines 57 * Python 2.7.x: **python2.7-dev**
61 * suggested Ubuntu packages: libfreetype6, libfreetype6-dev , libfontconfig , libfontconfig-dev e.g., `sudo apt-get install libfreetype6 libfreetype6-dev li bfontconfig libfontconfig-dev` 58
62 * libpng 59 * The FreeType and Fontconfig font engines: **libfreetype6-dev** and
63 * suggested Ubuntu packages: libpng12-0, libpng12-dev e.g., `sudo apt-get in stall libpng12-0 libpng12-dev` 60 **libfontconfig1-dev**
64 * libgif 61
65 * suggested Ubuntu package: libgif-dev e.g., `sudo apt-get install libgif-de v` 62 * Mesa OpenGL utility library headers: **libglu1-mesa-dev**
66 * `$ sudo apt-get install libgif4:i386` 63
67 * `$ sudo ln -s /usr/lib/i386-linux-gnu/libgif.so.4 /usr/lib/i386-linux-gnu/ libgif.so` 64 * Mesa headers: **mesa-common-dev**
68 * libglu1-mesa-dev 65
69 * mesa-common-dev 66 * GL, such as **freeglut3-dev**
70 * GL 67
71 * such as freeglut3-dev 68 * QT4, used by the [Skia Debugger](/dev/tools/debugger): **libqt4-dev**
72 69
73 Check out the source code 70 Check out the source code
74 ------------------------- 71 -------------------------
75 72
76 Follow the instructions [here](../download) for downloading the Skia source. 73 Follow the instructions [here](../download) for downloading the Skia source.
77 74
75 Notes
76 -----
77
78 1. On 32-bit Linux (when `uname -m` is *not* `x86_64`), you will have to
79 explicitly specify the architecture:
80
81 <!--?prettify lang=sh?-->
82
83 GYP_DEFINES='skia_arch_type=x86' python bin/sync-and-gyp
78 84
79 Generate build files 85 Generate build files
80 -------------------- 86 --------------------
81 87
82 We use the open-source gyp tool to generate ninja files (and analogous build 88 See [this page for generating build files and run tests](desktop).
83 scripts on other platforms) from our multiplatform "gyp" files.
84
85 Generate the build files by running the following in your Skia home directory:
86
87 ./gyp_skia
88
89 Or, you can just rely on it being run automatically by using `make` instead of
90 `ninja` in examples shown below.
91
92 If you want to use Eclipse, see Creating an Eclipse Project after you have gener ated the makefiles.
93
94 On 32-bit Linux (when `uname -m` is *not* `x86_64`), you will have to
95 explicitly specify the architecture:
96
97 GYP_DEFINES='skia_arch_type=x86' ./gyp_skia
98
99 Build and run tests from the command line
100 -----------------------------------------
101
102 ninja -C out/Debug dm
103 out/Debug/dm
104
105 The usual mode you want for testing is Debug mode (`SK_DEBUG` is defined, and
106 debug symbols are included in the binary). If you would like to build the
107
108 Release version instead
109 -----------------------
110
111 ninja -C out/Release dm
112 out/Release/dm
113
114 Build and run nanobench (performance tests)
115 -------------------------------------------
116
117 In this case, we will build with the "Release" configuration, since we are
118 running performance tests.
119
120 ninja -C out/Release nanobench
121 out/Release/nanobench [ --skps path/to/*.skp ]
122
123 Build and run SampleApp
124 -----------------------
125
126 This time we will add the `-j` flag to fire up multiple threads during the
127 build. (This can be used with the other targets too.)
128
129 make -j SampleApp
130 out/Debug/SampleApp
131
132 When this launches, you should see a window with various graphical examples.
133 To move through the sample app, use the following keypresses:
134
135 * right-arrow key: cycle through different test pages
136 * left-arrow key: cycle through rendering methods for each test page
137 * other keys are defined in SampleApp.cpp’s SampleWindow::onHandleKey() and Sa mpleWindow::onHandleChar() methods
138
139 Build and run DM ("diamond master") tests
140 ----------------------------------------
141
142 [DM is Skia's unit/correctness test harness](../../dev/testing/testing).
143
144 make -j dm
145 out/Debug/dm
146
147 The `GYP_DEFINES` environment variable can be used to change Skia's
148 compile-time settings. For example, to disable the Skia GPU backend,
149 run it as follows:
150
151 GYP_DEFINES='skia_gpu=0' make -j dm
152 out/Debug/dm
153
154 Build and run bench (performance testbench)
155 -------------------------------------------
156
157 Since bench tests performance, it usually makes more sense to run it in
158 Release mode...
159
160 make -j bench BUILDTYPE=Release
161 out/Release/bench
162
163 Build tools
164 -----------
165
166 make -j tools
167 out/Debug/skdiff
168
169 Clean up all generated files
170 ----------------------------
171
172 make clean
OLDNEW
« no previous file with comments | « site/user/quick/ios.md ('k') | site/user/quick/macos.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698