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 'variables': { | 6 'conditions': [ |
7 'chromevox_dest_dir': '<(PRODUCT_DIR)/resources/chromeos/chromevox', | 7 ['chromeos==1', { |
8 }, | 8 'variables': { |
9 'targets': [ | 9 # Whether to compress the 4 main ChromeVox scripts. Applicable if |
10 { | 10 # use_migrated_chromevox is true. |
11 'target_name': 'chromevox_resources', | 11 'chromevox_compress_js%': '1', |
12 'type': 'none', | 12 'chromevox_third_party_dir': '<(DEPTH)/chrome/third_party/chromevox', |
13 'dependencies': [ | 13 'closure_goog_dir': '<(chromevox_third_party_dir)/third_party/closure-li
brary/closure/goog', |
14 'chromevox_assets', | 14 'chromevox_dest_dir': '<(PRODUCT_DIR)/resources/chromeos/chromevox', |
15 'chromevox_static_files', | 15 'js_root_flags': [ |
16 'chromevox_strings', | 16 '-r', '.', |
17 'chromevox_uncompiled_js_files', | 17 '-r', '<(closure_goog_dir)', |
18 '<(DEPTH)/chrome/third_party/chromevox/chromevox.gyp:chromevox_third_par
ty_resources', | 18 ], |
19 ], | 19 'path_rewrite_flags': [ |
20 'conditions': [ | 20 '-w', '<(closure_goog_dir):closure', |
21 ['disable_nacl==0 and disable_nacl_untrusted==0', { | 21 ], |
| 22 'background_script_loader_file': 'chromevox/background/loader.js', |
| 23 'content_script_loader_file': 'chromevox/injected/loader.js', |
| 24 'options_script_loader_file': 'chromevox/background/options_loader.js', |
| 25 'kbexplorer_loader_file': 'chromevox/background/kbexplorer_loader.js', |
| 26 }, |
| 27 'targets': [ |
| 28 { |
| 29 'target_name': 'chromevox_resources', |
| 30 'type': 'none', |
22 'dependencies': [ | 31 'dependencies': [ |
23 '<(DEPTH)/third_party/liblouis/liblouis_nacl.gyp:liblouis_nacl_wrapp
er_nacl', | 32 'chromevox_assets', |
| 33 'chromevox_static_files', |
| 34 'chromevox_strings', |
| 35 'chromevox_uncompiled_js_files', |
| 36 '<(chromevox_third_party_dir)/chromevox.gyp:chromevox_third_party_re
sources', |
24 ], | 37 ], |
25 }], | 38 'conditions': [ |
26 ], | 39 ['disable_nacl==0 and disable_nacl_untrusted==0', { |
27 }, | 40 'dependencies': [ |
28 { | 41 '<(DEPTH)/third_party/liblouis/liblouis_nacl.gyp:liblouis_nacl_w
rapper_nacl', |
29 'target_name': 'chromevox_assets', | 42 ], |
30 'type': 'none', | 43 }], |
31 'copies': [ | 44 ['use_migrated_chromevox==1 and chromevox_compress_js==1', { |
32 { | 45 'dependencies': [ |
33 'destination': '<(chromevox_dest_dir)/chromevox', | 46 'chromevox_content_script', |
34 'files': [ | 47 'chromevox_background_script', |
35 'chromevox/chromevox-128.png', | 48 'chromevox_options_script', |
36 'chromevox/chromevox-16.png', | 49 'chromevox_kbexplorer_script', |
37 'chromevox/chromevox-19.png', | 50 ], |
38 'chromevox/chromevox-48.png', | 51 }], |
| 52 ['use_migrated_chromevox==1 and chromevox_compress_js==0', { |
| 53 'dependencies': [ |
| 54 'chromevox_copied_scripts', |
| 55 ], |
| 56 }], |
39 ], | 57 ], |
40 }, | 58 }, |
41 { | 59 { |
42 'destination': '<(chromevox_dest_dir)/chromevox/background/earcons', | 60 'target_name': 'chromevox_assets', |
43 'files': [ | 61 'type': 'none', |
44 'chromevox/background/earcons/alert_modal.ogg', | 62 'includes': [ |
45 'chromevox/background/earcons/alert_nonmodal.ogg', | 63 'chromevox_assets.gypi', |
46 'chromevox/background/earcons/bullet.ogg', | |
47 'chromevox/background/earcons/busy_progress_loop.ogg', | |
48 'chromevox/background/earcons/busy_working_loop.ogg', | |
49 'chromevox/background/earcons/button.ogg', | |
50 'chromevox/background/earcons/check_off.ogg', | |
51 'chromevox/background/earcons/check_on.ogg', | |
52 'chromevox/background/earcons/collapsed.ogg', | |
53 'chromevox/background/earcons/editable_text.ogg', | |
54 'chromevox/background/earcons/ellipsis.ogg', | |
55 'chromevox/background/earcons/expanded.ogg', | |
56 'chromevox/background/earcons/font_change.ogg', | |
57 'chromevox/background/earcons/invalid_keypress.ogg', | |
58 'chromevox/background/earcons/link.ogg', | |
59 'chromevox/background/earcons/listbox.ogg', | |
60 'chromevox/background/earcons/long_desc.ogg', | |
61 'chromevox/background/earcons/new_mail.ogg', | |
62 'chromevox/background/earcons/object_close.ogg', | |
63 'chromevox/background/earcons/object_delete.ogg', | |
64 'chromevox/background/earcons/object_deselect.ogg', | |
65 'chromevox/background/earcons/object_enter.ogg', | |
66 'chromevox/background/earcons/object_exit.ogg', | |
67 'chromevox/background/earcons/object_open.ogg', | |
68 'chromevox/background/earcons/object_select.ogg', | |
69 'chromevox/background/earcons/paragraph_break.ogg', | |
70 'chromevox/background/earcons/search_hit.ogg', | |
71 'chromevox/background/earcons/search_miss.ogg', | |
72 'chromevox/background/earcons/section.ogg', | |
73 'chromevox/background/earcons/selection.ogg', | |
74 'chromevox/background/earcons/selection_reverse.ogg', | |
75 'chromevox/background/earcons/special_content.ogg', | |
76 'chromevox/background/earcons/task_success.ogg', | |
77 'chromevox/background/earcons/wrap_edge.ogg', | |
78 'chromevox/background/earcons/wrap.ogg', | |
79 ], | 64 ], |
80 }, | 65 }, |
81 { | 66 { |
82 'destination': '<(chromevox_dest_dir)/chromevox/background/keymaps', | 67 'target_name': 'chromevox_static_files', |
83 'files': [ | 68 'type': 'none', |
84 'chromevox/background/keymaps/classic_keymap.json', | 69 'copies': [ |
85 'chromevox/background/keymaps/experimental.json', | 70 { |
86 'chromevox/background/keymaps/flat_keymap.json', | 71 'destination': '<(chromevox_dest_dir)/chromevox/background', |
| 72 'files': [ |
| 73 'chromevox/background/background.html', |
| 74 'chromevox/background/kbexplorer.html', |
| 75 'chromevox/background/options.html', |
| 76 ], |
| 77 }, |
87 ], | 78 ], |
88 }, | 79 }, |
89 { | 80 { |
90 'destination': '<(chromevox_dest_dir)/chromevox/background/mathmaps/fu
nctions', | 81 # JavaScript files that are always directly included into the |
91 'files': [ | 82 # destination directory. |
92 'chromevox/background/mathmaps/functions/algebra.json', | 83 'target_name': 'chromevox_uncompiled_js_files', |
93 'chromevox/background/mathmaps/functions/elementary.json', | 84 'type': 'none', |
94 'chromevox/background/mathmaps/functions/hyperbolic.json', | 85 'copies': [ |
95 'chromevox/background/mathmaps/functions/trigonometry.json', | 86 { |
| 87 'destination': '<(chromevox_dest_dir)/closure', |
| 88 'files': [ |
| 89 'closure/closure_preinit.js', |
| 90 ], |
| 91 'conditions': [ |
| 92 ['use_migrated_chromevox==0 or chromevox_compress_js==1', { |
| 93 'files': [ '<(closure_goog_dir)/base.js' ], |
| 94 }], |
| 95 ] |
| 96 }, |
| 97 { |
| 98 'destination': '<(chromevox_dest_dir)/chromevox/injected', |
| 99 'files': [ |
| 100 'chromevox/injected/api.js', |
| 101 'chromevox/injected/api_util.js', |
| 102 ], |
| 103 }, |
96 ], | 104 ], |
97 }, | 105 }, |
98 { | 106 { |
99 'destination': '<(chromevox_dest_dir)/chromevox/background/mathmaps/sy
mbols', | 107 'target_name': 'chromevox_strings', |
100 'files': [ | 108 'type': 'none', |
101 'chromevox/background/mathmaps/symbols/greek-capital.json', | 109 'actions': [ |
102 'chromevox/background/mathmaps/symbols/greek-mathfonts.json', | 110 { |
103 'chromevox/background/mathmaps/symbols/greek-scripts.json', | 111 'action_name': 'chromevox_strings', |
104 'chromevox/background/mathmaps/symbols/greek-small.json', | 112 'variables': { |
105 'chromevox/background/mathmaps/symbols/greek-symbols.json', | 113 'grit_grd_file': 'strings/chromevox_strings.grd', |
106 'chromevox/background/mathmaps/symbols/hebrew_letters.json', | 114 # TODO(plundblad): Change to use PRODUCT_DIR when we have |
107 'chromevox/background/mathmaps/symbols/latin-lower-double-accent.jso
n', | 115 # translations. |
108 'chromevox/background/mathmaps/symbols/latin-lower-normal.json', | 116 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/resources/chromeos/c
hromevox', |
109 'chromevox/background/mathmaps/symbols/latin-lower-phonetic.json', | 117 # We don't generate any RC files, so no resource_ds file is need
ed. |
110 'chromevox/background/mathmaps/symbols/latin-lower-single-accent.jso
n', | 118 'grit_resource_ids': '', |
111 'chromevox/background/mathmaps/symbols/latin-mathfonts.json', | 119 }, |
112 'chromevox/background/mathmaps/symbols/latin-rest.json', | 120 'includes': [ '../../../../../build/grit_action.gypi' ], |
113 'chromevox/background/mathmaps/symbols/latin-upper-double-accent.jso
n', | 121 }, |
114 'chromevox/background/mathmaps/symbols/latin-upper-normal.json', | |
115 'chromevox/background/mathmaps/symbols/latin-upper-single-accent.jso
n', | |
116 'chromevox/background/mathmaps/symbols/math_angles.json', | |
117 'chromevox/background/mathmaps/symbols/math_arrows.json', | |
118 'chromevox/background/mathmaps/symbols/math_characters.json', | |
119 'chromevox/background/mathmaps/symbols/math_delimiters.json', | |
120 'chromevox/background/mathmaps/symbols/math_digits.json', | |
121 'chromevox/background/mathmaps/symbols/math_geometry.json', | |
122 'chromevox/background/mathmaps/symbols/math_harpoons.json', | |
123 'chromevox/background/mathmaps/symbols/math_non_characters.json', | |
124 'chromevox/background/mathmaps/symbols/math_symbols.json', | |
125 'chromevox/background/mathmaps/symbols/math_whitespace.json', | |
126 'chromevox/background/mathmaps/symbols/other_stars.json', | |
127 ], | 122 ], |
128 }, | 123 }, |
129 ], | 124 ], |
130 }, | 125 'conditions': [ |
131 { | 126 ['use_migrated_chromevox==1 and chromevox_compress_js==1', { |
132 'target_name': 'chromevox_static_files', | 127 'targets': [ |
133 'type': 'none', | 128 { |
134 'copies': [ | 129 'target_name': 'chromevox_content_script', |
135 { | 130 'type': 'none', |
136 'destination': '<(chromevox_dest_dir)/chromevox/background', | 131 'variables': { |
137 'files': [ | 132 'output_file': '<(chromevox_dest_dir)/chromeVoxChromePageScript.
js', |
138 'chromevox/background/background.html', | 133 }, |
139 'chromevox/background/kbexplorer.html', | 134 'sources': [ '<(content_script_loader_file)' ], |
140 'chromevox/background/options.html', | 135 'includes': [ 'compress_js.gypi', ], |
| 136 }, |
| 137 { |
| 138 'target_name': 'chromevox_background_script', |
| 139 'type': 'none', |
| 140 'variables': { |
| 141 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeBackgroundS
cript.js', |
| 142 }, |
| 143 'sources': [ '<(background_script_loader_file)' ], |
| 144 'includes': [ 'compress_js.gypi', ], |
| 145 }, |
| 146 { |
| 147 'target_name': 'chromevox_options_script', |
| 148 'type': 'none', |
| 149 'variables': { |
| 150 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeOptionsScri
pt.js', |
| 151 }, |
| 152 'sources': [ '<(options_script_loader_file)' ], |
| 153 'includes': [ 'compress_js.gypi', ], |
| 154 }, |
| 155 { |
| 156 'target_name': 'chromevox_kbexplorer_script', |
| 157 'type': 'none', |
| 158 'variables': { |
| 159 'output_file': '<(chromevox_dest_dir)/chromeVoxKbExplorerScript.
js', |
| 160 }, |
| 161 'sources': [ '<(kbexplorer_loader_file)' ], |
| 162 'includes': [ 'compress_js.gypi', ], |
| 163 }, |
141 ], | 164 ], |
142 }, | 165 }, |
| 166 ], |
| 167 ['use_migrated_chromevox==1 and chromevox_compress_js==0', { |
| 168 'targets': [ |
| 169 { |
| 170 'target_name': 'chromevox_copied_scripts', |
| 171 'type': 'none', |
| 172 'variables': { |
| 173 'dest_dir': '<(chromevox_dest_dir)', |
| 174 }, |
| 175 'sources': [ |
| 176 '<(background_script_loader_file)', |
| 177 '<(content_script_loader_file)', |
| 178 '<(kbexplorer_loader_file)', |
| 179 '<(options_script_loader_file)', |
| 180 ], |
| 181 'includes': [ 'copy_js.gypi', ], |
| 182 }, |
| 183 ], |
| 184 }], |
143 ], | 185 ], |
144 }, | 186 }], |
145 { | |
146 # JavaScript that are always directly included into the destination | |
147 # driectory. | |
148 'target_name': 'chromevox_uncompiled_js_files', | |
149 'type': 'none', | |
150 'copies': [ | |
151 { | |
152 'destination': '<(chromevox_dest_dir)/closure', | |
153 'files': [ | |
154 'closure/closure_preinit.js', | |
155 ], | |
156 }, | |
157 { | |
158 'destination': '<(chromevox_dest_dir)/chromevox/injected', | |
159 'files': [ | |
160 'chromevox/injected/api.js', | |
161 'chromevox/injected/api_util.js', | |
162 ], | |
163 }, | |
164 ], | |
165 }, | |
166 { | |
167 'target_name': 'chromevox_strings', | |
168 'type': 'none', | |
169 'actions': [ | |
170 { | |
171 'action_name': 'chromevox_strings', | |
172 'variables': { | |
173 'grit_grd_file': 'strings/chromevox_strings.grd', | |
174 # TODO(plundblad): Change to use PRODUCT_DIR when we have | |
175 # translations. | |
176 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/resources/chromeos/chrom
evox', | |
177 # We don't generate any RC files, so no resource_ds file is needed. | |
178 'grit_resource_ids': '', | |
179 }, | |
180 'includes': [ '../../../../../build/grit_action.gypi' ], | |
181 }, | |
182 ], | |
183 }, | |
184 ], | 187 ], |
185 } | 188 } |
OLD | NEW |