OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'conditions': [ | 6 'conditions': [ |
7 ['chromeos==1', { | 7 ['chromeos==1', { |
8 'variables': { | 8 'variables': { |
9 # Whether to compress the 4 main ChromeVox scripts. | 9 # Whether to compress the 4 main ChromeVox scripts. |
10 'chromevox_compress_js%': '1', | 10 'chromevox_compress_js%': '1', |
11 'background_script_loader_file': 'chromevox/background/loader.js', | 11 'chromevox1_background_script_loader_file': 'chromevox/background/loader
.js', |
12 'content_script_loader_file': 'chromevox/injected/loader.js', | 12 'chromevox1_content_script_loader_file': 'chromevox/injected/loader.js', |
13 'options_script_loader_file': 'chromevox/background/options_loader.js', | 13 'chromevox1_kbexplorer_loader_file': 'chromevox/background/kbexplorer_lo
ader.js', |
14 'kbexplorer_loader_file': 'chromevox/background/kbexplorer_loader.js', | 14 'chromevox1_options_script_loader_file': 'chromevox/background/options_l
oader.js', |
| 15 'chromevox2_background_script_loader_file': 'cvox2/background/loader.js'
, |
15 }, | 16 }, |
16 'includes': [ | 17 'includes': [ |
17 'chromevox_tests.gypi', | 18 'chromevox_tests.gypi', |
18 'common.gypi', | 19 'common.gypi', |
19 ], | 20 ], |
20 'targets': [ | 21 'targets': [ |
21 { | 22 { |
22 'target_name': 'chromevox', | 23 'target_name': 'chromevox', |
23 'type': 'none', | 24 'type': 'none', |
24 'dependencies': [ | 25 'dependencies': [ |
25 'chromevox_resources', | 26 'chromevox_resources', |
26 'chromevox_manifest', | 27 'chromevox1_manifest', |
27 'chromevox_guest_manifest', | 28 'chromevox1_guest_manifest', |
28 'chromevox2', | 29 'chromevox2_manifest', |
| 30 'chromevox2_guest_manifest', |
29 ], | 31 ], |
30 }, | 32 }, |
31 { | 33 { |
32 'target_name': 'chromevox_resources', | 34 'target_name': 'chromevox_resources', |
33 'type': 'none', | 35 'type': 'none', |
34 'dependencies': [ | 36 'dependencies': [ |
35 'chromevox_assets', | 37 'chromevox_assets', |
36 'chromevox_static_files', | 38 'chromevox_static_files', |
37 'chromevox_strings', | 39 'chromevox_strings', |
38 'chromevox_uncompiled_js_files', | 40 'chromevox_uncompiled_js_files', |
39 '<(chromevox_third_party_dir)/chromevox.gyp:chromevox_third_party_re
sources', | 41 '<(chromevox_third_party_dir)/chromevox.gyp:chromevox_third_party_re
sources', |
40 '../braille_ime/braille_ime.gyp:braille_ime_manifest', | 42 '../braille_ime/braille_ime.gyp:braille_ime_manifest', |
41 ], | 43 ], |
42 'conditions': [ | 44 'conditions': [ |
43 ['disable_nacl==0 and disable_nacl_untrusted==0', { | 45 ['disable_nacl==0 and disable_nacl_untrusted==0', { |
44 'dependencies': [ | 46 'dependencies': [ |
45 '<(DEPTH)/third_party/liblouis/liblouis_nacl.gyp:liblouis_nacl_w
rapper_nacl', | 47 '<(DEPTH)/third_party/liblouis/liblouis_nacl.gyp:liblouis_nacl_w
rapper_nacl', |
46 ], | 48 ], |
47 }], | 49 }], |
48 ['chromevox_compress_js==1', { | 50 ['chromevox_compress_js==1', { |
49 'dependencies': [ | 51 'dependencies': [ |
50 'chromevox_content_script', | 52 'chromevox1_background_script', |
51 'chromevox_background_script', | 53 'chromevox1_content_script', |
52 'chromevox_options_script', | 54 'chromevox1_kbexplorer_script', |
53 'chromevox_kbexplorer_script', | 55 'chromevox1_options_script', |
| 56 'chromevox2_background_script', |
54 ], | 57 ], |
55 }], | 58 }, { # chromevox_compress_js==0 |
56 ['chromevox_compress_js==0', { | |
57 'dependencies': [ | 59 'dependencies': [ |
58 'chromevox_copied_scripts', | 60 'chromevox_copied_scripts', |
| 61 'chromevox_deps', |
59 ], | 62 ], |
60 }], | 63 }], |
61 ], | 64 ], |
62 }, | 65 }, |
63 { | 66 { |
64 'target_name': 'chromevox_assets', | 67 'target_name': 'chromevox_assets', |
65 'type': 'none', | 68 'type': 'none', |
66 'includes': [ | 69 'includes': [ |
67 'chromevox_assets.gypi', | 70 'chromevox_assets.gypi', |
68 ], | 71 ], |
69 }, | 72 }, |
70 { | 73 { |
71 'target_name': 'chromevox_manifest', | |
72 'type': 'none', | |
73 'variables': { | |
74 'output_manifest_path': '<(chromevox_dest_dir)/manifest.json', | |
75 }, | |
76 'includes': [ 'generate_manifest.gypi', ], | |
77 }, | |
78 { | |
79 'target_name': 'chromevox_guest_manifest', | |
80 'type': 'none', | |
81 'variables': { | |
82 'output_manifest_path': '<(chromevox_dest_dir)/manifest_guest.json', | |
83 'is_guest_manifest': 1, | |
84 }, | |
85 'includes': [ 'generate_manifest.gypi', ], | |
86 }, | |
87 { | |
88 'target_name': 'chromevox_static_files', | 74 'target_name': 'chromevox_static_files', |
89 'type': 'none', | 75 'type': 'none', |
90 'copies': [ | 76 'copies': [ |
91 { | 77 { |
92 'destination': '<(chromevox_dest_dir)/chromevox/background', | 78 'destination': '<(chromevox_dest_dir)/chromevox/background', |
93 'files': [ | 79 'files': [ |
94 'chromevox/background/background.html', | 80 'chromevox/background/background.html', |
95 'chromevox/background/kbexplorer.html', | 81 'chromevox/background/kbexplorer.html', |
96 'chromevox/background/options.html', | 82 'chromevox/background/options.html', |
97 ], | 83 ], |
98 }, | 84 }, |
| 85 { |
| 86 'destination': '<(PRODUCT_DIR)/resources/chromeos/chromevox/cvox2/
background', |
| 87 'files': [ |
| 88 'cvox2/background/background.html', |
| 89 ], |
| 90 }, |
99 ], | 91 ], |
100 }, | 92 }, |
101 { | 93 { |
102 # JavaScript files that are always directly included into the | 94 # JavaScript files that are always directly included into the |
103 # destination directory. | 95 # destination directory. |
104 'target_name': 'chromevox_uncompiled_js_files', | 96 'target_name': 'chromevox_uncompiled_js_files', |
105 'type': 'none', | 97 'type': 'none', |
106 'copies': [ | 98 'copies': [ |
107 { | 99 { |
108 'destination': '<(chromevox_dest_dir)/closure', | |
109 'files': [ | |
110 'closure/closure_preinit.js', | |
111 ], | |
112 }, | |
113 { | |
114 'destination': '<(chromevox_dest_dir)/chromevox/injected', | 100 'destination': '<(chromevox_dest_dir)/chromevox/injected', |
115 'files': [ | 101 'files': [ |
116 'chromevox/injected/api.js', | 102 'chromevox/injected/api.js', |
117 'chromevox/injected/api_util.js', | 103 ], |
| 104 'conditions': [ |
| 105 [ 'chromevox_compress_js==1', { |
| 106 'files': [ |
| 107 # api_util.js is copied by the chromevox_copied_scripts |
| 108 # target in the non-compressed case. |
| 109 'chromevox/injected/api_util.js', |
| 110 ], |
| 111 }], |
118 ], | 112 ], |
119 }, | 113 }, |
120 ], | 114 ], |
| 115 'conditions': [ |
| 116 [ 'chromevox_compress_js==0', { |
| 117 'copies': [ |
| 118 { |
| 119 'destination': '<(chromevox_dest_dir)/closure', |
| 120 'files': [ |
| 121 'closure/closure_preinit.js', |
| 122 ], |
| 123 }, |
| 124 ], |
| 125 }], |
| 126 ], |
121 }, | 127 }, |
122 { | 128 { |
123 'target_name': 'chromevox_strings', | 129 'target_name': 'chromevox_strings', |
124 'type': 'none', | 130 'type': 'none', |
125 'actions': [ | 131 'actions': [ |
126 { | 132 { |
127 'action_name': 'chromevox_strings', | 133 'action_name': 'chromevox_strings', |
128 'variables': { | 134 'variables': { |
129 'grit_grd_file': 'strings/chromevox_strings.grd', | 135 'grit_grd_file': 'strings/chromevox_strings.grd', |
130 'grit_out_dir': '<(chromevox_dest_dir)', | 136 'grit_out_dir': '<(chromevox_dest_dir)', |
131 # We don't generate any RC files, so no resource_ds file is need
ed. | 137 # We don't generate any RC files, so no resource_ds file is need
ed. |
132 'grit_resource_ids': '', | 138 'grit_resource_ids': '', |
133 }, | 139 }, |
134 'includes': [ '../../../../../build/grit_action.gypi' ], | 140 'includes': [ '../../../../../build/grit_action.gypi' ], |
135 }, | 141 }, |
136 ], | 142 ], |
137 }, | 143 }, |
138 { | 144 { |
139 'target_name': 'chromevox2', | 145 'target_name': 'chromevox_deps', |
140 'type': 'none', | |
141 'dependencies': [ | |
142 'chromevox2_copied_scripts', | |
143 'chromevox2_deps', | |
144 'chromevox2_manifest', | |
145 'chromevox2_guest_manifest', | |
146 'chromevox2_resources', | |
147 ], | |
148 }, | |
149 { | |
150 'target_name': 'chromevox2_copied_scripts', | |
151 'type': 'none', | |
152 'variables': { | |
153 'dest_dir': '<(chromevox_dest_dir)', | |
154 }, | |
155 'sources': [ | |
156 'cvox2/background/loader.js', | |
157 ], | |
158 'includes': [ 'copy_js.gypi', ], | |
159 }, | |
160 { | |
161 'target_name': 'chromevox2_deps', | |
162 'type': 'none', | 146 'type': 'none', |
163 'variables': { | 147 'variables': { |
164 'deps_js_output_file': '<(chromevox_dest_dir)/deps.js', | 148 'deps_js_output_file': '<(chromevox_dest_dir)/deps.js', |
165 }, | 149 }, |
166 'sources': [ | 150 'sources': [ |
167 'cvox2/background/loader.js', | 151 '<(chromevox1_background_script_loader_file)', |
| 152 '<(chromevox1_content_script_loader_file)', |
| 153 '<(chromevox1_kbexplorer_loader_file)', |
| 154 '<(chromevox1_options_script_loader_file)', |
| 155 '<(chromevox2_background_script_loader_file)', |
168 ], | 156 ], |
169 'includes': ['generate_deps.gypi'], | 157 'includes': ['generate_deps.gypi'], |
170 }, | 158 }, |
171 { | 159 { |
172 'target_name': 'chromevox2_resources', | 160 'target_name': 'chromevox1_manifest', |
173 'type': 'none', | 161 'type': 'none', |
174 'copies': [ | 162 'variables': { |
175 { | 163 'output_manifest_path': '<(chromevox_dest_dir)/manifest.json', |
176 'destination': '<(PRODUCT_DIR)/resources/chromeos/chromevox/cvox2/
background', | 164 }, |
177 'files': [ | 165 'includes': [ 'generate_manifest.gypi', ], |
178 'cvox2/background/background.html', | 166 }, |
179 ], | 167 { |
180 }, | 168 'target_name': 'chromevox1_guest_manifest', |
181 ], | 169 'type': 'none', |
| 170 'variables': { |
| 171 'output_manifest_path': '<(chromevox_dest_dir)/manifest_guest.json', |
| 172 'is_guest_manifest': 1, |
| 173 }, |
| 174 'includes': [ 'generate_manifest.gypi', ], |
182 }, | 175 }, |
183 { | 176 { |
184 'target_name': 'chromevox2_manifest', | 177 'target_name': 'chromevox2_manifest', |
185 'type': 'none', | 178 'type': 'none', |
186 'variables': { | 179 'variables': { |
187 'output_manifest_path': '<(chromevox_dest_dir)/manifest_next.json', | 180 'output_manifest_path': '<(chromevox_dest_dir)/manifest_next.json', |
188 'use_chromevox_next': 1, | 181 'is_chromevox_next': 1, |
189 }, | 182 }, |
190 'includes': [ 'generate_manifest.gypi', ], | 183 'includes': [ 'generate_manifest.gypi', ], |
191 }, | 184 }, |
192 { | 185 { |
193 'target_name': 'chromevox2_guest_manifest', | 186 'target_name': 'chromevox2_guest_manifest', |
194 'type': 'none', | 187 'type': 'none', |
195 'variables': { | 188 'variables': { |
196 'output_manifest_path': '<(chromevox_dest_dir)/manifest_next_guest.j
son', | 189 'output_manifest_path': '<(chromevox_dest_dir)/manifest_next_guest.j
son', |
197 'is_guest_manifest': 1, | 190 'is_guest_manifest': 1, |
198 'use_chromevox_next': 1, | 191 'is_chromevox_next': 1, |
199 }, | 192 }, |
200 'includes': [ 'generate_manifest.gypi', ], | 193 'includes': [ 'generate_manifest.gypi', ], |
201 }, | 194 }, |
202 ], | 195 ], |
203 'conditions': [ | 196 'conditions': [ |
204 ['chromevox_compress_js==1', { | 197 ['chromevox_compress_js==1', { |
205 'targets': [ | 198 'targets': [ |
206 { | 199 { |
207 'target_name': 'chromevox_content_script', | 200 'target_name': 'chromevox1_content_script', |
208 'type': 'none', | 201 'type': 'none', |
209 'variables': { | 202 'variables': { |
210 'output_file': '<(chromevox_dest_dir)/chromeVoxChromePageScript.
js', | 203 'output_file': '<(chromevox_dest_dir)/chromeVoxChromePageScript.
js', |
211 }, | 204 }, |
212 'sources': [ '<(content_script_loader_file)' ], | 205 'sources': [ '<(chromevox1_content_script_loader_file)' ], |
213 'includes': [ 'compress_js.gypi', ], | 206 'includes': [ 'compress_js.gypi', ], |
214 }, | 207 }, |
215 { | 208 { |
216 'target_name': 'chromevox_background_script', | 209 'target_name': 'chromevox1_background_script', |
217 'type': 'none', | 210 'type': 'none', |
218 'variables': { | 211 'variables': { |
219 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeBackgroundS
cript.js', | 212 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeBackgroundS
cript.js', |
220 }, | 213 }, |
221 'sources': [ '<(background_script_loader_file)' ], | 214 'sources': [ '<(chromevox1_background_script_loader_file)' ], |
222 'includes': [ 'compress_js.gypi', ], | 215 'includes': [ 'compress_js.gypi', ], |
223 }, | 216 }, |
224 { | 217 { |
225 'target_name': 'chromevox_options_script', | 218 'target_name': 'chromevox1_options_script', |
226 'type': 'none', | 219 'type': 'none', |
227 'variables': { | 220 'variables': { |
228 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeOptionsScri
pt.js', | 221 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeOptionsScri
pt.js', |
229 }, | 222 }, |
230 'sources': [ '<(options_script_loader_file)' ], | 223 'sources': [ '<(chromevox1_options_script_loader_file)' ], |
231 'includes': [ 'compress_js.gypi', ], | 224 'includes': [ 'compress_js.gypi', ], |
232 }, | 225 }, |
233 { | 226 { |
234 'target_name': 'chromevox_kbexplorer_script', | 227 'target_name': 'chromevox1_kbexplorer_script', |
235 'type': 'none', | 228 'type': 'none', |
236 'variables': { | 229 'variables': { |
237 'output_file': '<(chromevox_dest_dir)/chromeVoxKbExplorerScript.
js', | 230 'output_file': '<(chromevox_dest_dir)/chromeVoxKbExplorerScript.
js', |
238 }, | 231 }, |
239 'sources': [ '<(kbexplorer_loader_file)' ], | 232 'sources': [ '<(chromevox1_kbexplorer_loader_file)' ], |
| 233 'includes': [ 'compress_js.gypi', ], |
| 234 }, |
| 235 { |
| 236 'target_name': 'chromevox2_background_script', |
| 237 'type': 'none', |
| 238 'variables': { |
| 239 'output_file': '<(chromevox_dest_dir)/chromeVox2ChromeBackground
Script.js', |
| 240 }, |
| 241 'sources': [ |
| 242 '<(chromevox1_background_script_loader_file)', |
| 243 '<(chromevox2_background_script_loader_file)', |
| 244 ], |
240 'includes': [ 'compress_js.gypi', ], | 245 'includes': [ 'compress_js.gypi', ], |
241 }, | 246 }, |
242 ], | 247 ], |
243 }, | 248 }, { # chromevox_compress_js==0 |
244 ], | |
245 ['chromevox_compress_js==0', { | |
246 'targets': [ | 249 'targets': [ |
247 { | 250 { |
248 'target_name': 'chromevox_copied_scripts', | 251 'target_name': 'chromevox_copied_scripts', |
249 'type': 'none', | 252 'type': 'none', |
250 'variables': { | 253 'variables': { |
251 'dest_dir': '<(chromevox_dest_dir)', | 254 'dest_dir': '<(chromevox_dest_dir)', |
252 }, | 255 }, |
253 'sources': [ | 256 'sources': [ |
254 '<(background_script_loader_file)', | 257 '<(chromevox1_background_script_loader_file)', |
255 '<(content_script_loader_file)', | 258 '<(chromevox1_content_script_loader_file)', |
256 '<(kbexplorer_loader_file)', | 259 '<(chromevox1_kbexplorer_loader_file)', |
257 '<(options_script_loader_file)', | 260 '<(chromevox1_options_script_loader_file)', |
| 261 '<(chromevox2_background_script_loader_file)', |
258 ], | 262 ], |
259 'includes': [ 'copy_js.gypi', ], | 263 'includes': [ 'copy_js.gypi', ], |
260 }, | 264 }, |
261 ], | 265 ], |
262 }], | 266 }], |
263 ], | 267 ], |
264 }], | 268 }], |
265 ], | 269 ], |
266 } | 270 } |
OLD | NEW |