OLD | NEW |
| (Empty) |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 { | |
6 'targets': [ | |
7 { | |
8 # GN version: //ui/resources | |
9 'target_name': 'ui_resources', | |
10 'type': 'none', | |
11 'variables': { | |
12 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/resources', | |
13 }, | |
14 'actions': [ | |
15 { | |
16 'action_name': 'ui_resources', | |
17 'variables': { | |
18 'grit_grd_file': 'ui_resources.grd', | |
19 }, | |
20 'includes': [ '../../build/grit_action.gypi' ], | |
21 }, | |
22 { | |
23 'action_name': 'webui_resources', | |
24 'variables': { | |
25 'grit_grd_file': '../webui/resources/webui_resources.grd', | |
26 }, | |
27 'includes': [ '../../build/grit_action.gypi' ], | |
28 }, | |
29 { | |
30 'action_name': 'ui_unscaled_resources', | |
31 'variables': { | |
32 'grit_grd_file': 'ui_unscaled_resources.grd', | |
33 }, | |
34 'includes': [ '../../build/grit_action.gypi' ], | |
35 }, | |
36 ], | |
37 'includes': [ '../../build/grit_target.gypi' ], | |
38 }, | |
39 { | |
40 # This creates a pak file that contains the resources in src/ui. | |
41 # This pak file can be used by tests. | |
42 # | |
43 # GN version: //ui/resources:ui_test_pak | |
44 'target_name': 'ui_test_pak', | |
45 'type': 'none', | |
46 'dependencies': [ | |
47 '../strings/ui_strings.gyp:ui_strings', | |
48 'ui_resources', | |
49 ], | |
50 'actions': [ | |
51 { | |
52 'action_name': 'repack_ui_test_pack', | |
53 'variables': { | |
54 'pak_inputs': [ | |
55 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.
pak', | |
56 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak', | |
57 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.p
ak', | |
58 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak', | |
59 ], | |
60 'pak_output': '<(PRODUCT_DIR)/ui_test.pak', | |
61 'conditions': [ | |
62 ['chromeos==1', { | |
63 'pak_inputs': [ | |
64 '<(SHARED_INTERMEDIATE_DIR)/ui/chromeos/resources/ui_chromeos_
resources_100_percent.pak', | |
65 '<(SHARED_INTERMEDIATE_DIR)/ui/chromeos/strings/ui_chromeos_st
rings_en-US.pak', | |
66 ], | |
67 }], | |
68 ['toolkit_views==1', { | |
69 'pak_inputs': [ | |
70 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resou
rces.pak', | |
71 '<(SHARED_INTERMEDIATE_DIR)/ui/views/resources/views_resources
_100_percent.pak', | |
72 ], | |
73 }], | |
74 ['use_aura==1 and toolkit_views==1', { | |
75 'pak_inputs': [ | |
76 '<(SHARED_INTERMEDIATE_DIR)/ui/app_list/resources/app_list_res
ources_100_percent.pak', | |
77 ], | |
78 }], | |
79 ], | |
80 }, | |
81 'includes': [ '../../build/repack_action.gypi' ], | |
82 }, | |
83 ], | |
84 'conditions': [ | |
85 ['chromeos==1', { | |
86 'dependencies': [ | |
87 '../chromeos/ui_chromeos.gyp:ui_chromeos_strings', | |
88 '../chromeos/ui_chromeos.gyp:ui_chromeos_resources', | |
89 ], | |
90 }], | |
91 ['toolkit_views==1', { | |
92 'dependencies': [ | |
93 '../views/resources/views_resources.gyp:views_resources', | |
94 ], | |
95 }], | |
96 ['OS != "mac"', { | |
97 'copies': [ | |
98 { | |
99 # GN version //ui/resources:copy_ui_resources_100_percent | |
100 'destination': '<(PRODUCT_DIR)/ui', | |
101 'files': [ | |
102 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percen
t.pak', | |
103 ], | |
104 }, | |
105 ], | |
106 }], | |
107 ['OS == "ios" or OS == "mac"', { | |
108 'actions': [ | |
109 { | |
110 # GN version: //ui/resources:repack_ui_test_mac_locale_pack | |
111 # Repack just the strings for the framework locales on Mac and | |
112 # iOS. This emulates repack_locales.py, but just for en-US. Note | |
113 # ui_test.pak is not simply copied, because it causes leaks from | |
114 # allocations within system libraries when trying to load non- | |
115 # string resources. http://crbug.com/413034. | |
116 'action_name': 'repack_ui_test_mac_locale_pack', | |
117 'variables': { | |
118 'pak_inputs': [ | |
119 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-
US.pak', | |
120 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak', | |
121 ], | |
122 'pak_output': '<(PRODUCT_DIR)/ui/en.lproj/locale.pak', | |
123 }, | |
124 'includes': [ '../../build/repack_action.gypi' ], | |
125 }, | |
126 ], | |
127 }], | |
128 ['OS != "mac" and OS !="ios"', { | |
129 'actions': [ | |
130 { | |
131 'action_name': 'copy_ui_test_pak', | |
132 'message': 'Copying ui_test.pak into en-US.pak', | |
133 'inputs': [ | |
134 '<(PRODUCT_DIR)/ui_test.pak', | |
135 ], | |
136 'outputs': [ | |
137 '<(PRODUCT_DIR)/ui/en-US.pak', | |
138 ], | |
139 'action': [ | |
140 'python', | |
141 '../../build/cp.py', | |
142 '<@(_inputs)', | |
143 '<@(_outputs)' | |
144 ], | |
145 }, | |
146 ], | |
147 }], | |
148 ], | |
149 }, | |
150 ], | |
151 } | |
OLD | NEW |