OLD | NEW |
1 { | 1 { |
2 'variables': { | 2 'variables': { |
3 # TODO: remove this helper when we have loops in GYP | |
4 'apply_locales_cmd': ['python', '<(DEPTH)/build/apply_locales.py',], | |
5 'chromium_code': 1, | 3 'chromium_code': 1, |
6 'grit_cmd': ['python', '../../../tools/grit/grit.py'], | 4 'grit_base_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app', |
7 'grit_info_cmd': ['python', '../../../tools/grit/grit_info.py', | |
8 '<@(grit_defines)'], | |
9 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app', | |
10 'localizable_resources': [ | |
11 'app_locale_settings.grd', | |
12 'app_strings.grd', | |
13 ], | |
14 }, | 5 }, |
15 'targets': [ | 6 'targets': [ |
16 { | 7 { |
17 'target_name': 'ui_strings', | 8 'target_name': 'ui_strings', |
18 'type': 'none', | 9 'type': 'none', |
19 'msvs_guid': 'BC3C49A3-D061-4E78-84EE-742DA064DC46', | 10 'msvs_guid': 'BC3C49A3-D061-4E78-84EE-742DA064DC46', |
20 'rules': [ | 11 'actions': [ |
21 { | 12 { |
22 'rule_name': 'grit', | 13 'action_name': 'app_strings', |
23 'extension': 'grd', | 14 'variables': { |
24 'inputs': [ | 15 'grit_grd_file': 'app_strings.grd', |
25 '<!@(<(grit_info_cmd) --inputs <(localizable_resources))', | 16 'grit_out_dir': '<(grit_base_out_dir)/app_strings', |
26 ], | 17 }, |
27 'outputs': [ | 18 'includes': [ '../../../build/grit_action.gypi' ], |
28 '<(grit_out_dir)/<(RULE_INPUT_ROOT)/grit/<(RULE_INPUT_ROOT).h', | |
29 # TODO: remove this helper when we have loops in GYP | |
30 '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(RULE_INPUT_ROOT)/<(RUL
E_INPUT_ROOT)_ZZLOCALE.pak\' <(locales))', | |
31 ], | |
32 'action': [ | |
33 '<@(grit_cmd)', | |
34 '-i', '<(RULE_INPUT_PATH)', 'build', | |
35 '-o', '<(grit_out_dir)/<(RULE_INPUT_ROOT)', | |
36 '<@(grit_defines)'], | |
37 'message': 'Generating resources from <(RULE_INPUT_PATH)', | |
38 }, | 19 }, |
39 ], | 20 { |
40 'sources': [ | 21 'action_name': 'app_locale_settings', |
41 '<@(localizable_resources)', | 22 'variables': { |
| 23 'grit_grd_file': 'app_locale_settings.grd', |
| 24 'grit_out_dir': '<(grit_base_out_dir)/app_locale_settings', |
| 25 }, |
| 26 'includes': [ '../../../build/grit_action.gypi' ], |
| 27 }, |
42 ], | 28 ], |
43 'direct_dependent_settings': { | 29 'direct_dependent_settings': { |
44 'include_dirs': [ | 30 'include_dirs': [ |
45 '<(grit_out_dir)/app_locale_settings', | 31 '<(grit_base_out_dir)/app_locale_settings', |
46 '<(grit_out_dir)/app_strings', | 32 '<(grit_base_out_dir)/app_strings', |
47 ], | 33 ], |
48 }, | 34 }, |
49 'conditions': [ | 35 'conditions': [ |
50 ['OS=="win"', { | 36 ['OS=="win"', { |
51 'dependencies': ['../../../build/win/system.gyp:cygwin'], | 37 'dependencies': ['../../../build/win/system.gyp:cygwin'], |
52 }], | 38 }], |
53 ], | 39 ], |
54 }, | 40 }, |
55 ], | 41 ], |
56 'conditions': [ | 42 'conditions': [ |
57 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { | 43 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { |
58 'targets': [{ | 44 'targets': [{ |
59 'target_name': 'ui_unittest_strings', | 45 'target_name': 'ui_unittest_strings', |
60 'type': 'none', | 46 'type': 'none', |
61 'variables': { | 47 'variables': { |
62 'repack_path': '<(DEPTH)/tools/data_pack/repack.py', | 48 'repack_path': '<(DEPTH)/tools/data_pack/repack.py', |
63 }, | 49 }, |
64 'actions': [ | 50 'actions': [ |
65 { | 51 { |
66 'action_name': 'repack_ui_unittest_strings', | 52 'action_name': 'repack_ui_unittest_strings', |
67 'variables': { | 53 'variables': { |
68 'pak_inputs': [ | 54 'pak_inputs': [ |
69 '<(grit_out_dir)/app_strings/app_strings_en-US.pak', | 55 '<(grit_base_out_dir)/app_strings/app_strings_en-US.pak', |
70 '<(grit_out_dir)/app_locale_settings/app_locale_settings_en-US.p
ak', | 56 '<(grit_base_out_dir)/app_locale_settings/app_locale_settings_en
-US.pak', |
71 ], | 57 ], |
72 }, | 58 }, |
73 'inputs': [ | 59 'inputs': [ |
74 '<(repack_path)', | 60 '<(repack_path)', |
75 '<@(pak_inputs)', | 61 '<@(pak_inputs)', |
76 ], | 62 ], |
77 'outputs': [ | 63 'outputs': [ |
78 '<(PRODUCT_DIR)/app_unittests_strings/en-US.pak', | 64 '<(PRODUCT_DIR)/app_unittests_strings/en-US.pak', |
79 ], | 65 ], |
80 'action': ['python', '<(repack_path)', '<@(_outputs)', | 66 'action': ['python', '<(repack_path)', '<@(_outputs)', |
81 '<@(pak_inputs)'], | 67 '<@(pak_inputs)'], |
82 }, | 68 }, |
83 ], | 69 ], |
84 'copies': [ | 70 'copies': [ |
85 { | 71 { |
86 'destination': '<(PRODUCT_DIR)/app_unittests_strings', | 72 'destination': '<(PRODUCT_DIR)/app_unittests_strings', |
87 'files': [ | 73 'files': [ |
88 '<(grit_out_dir)/app_resources/app_resources.pak', | 74 '<(grit_base_out_dir)/app_resources/app_resources.pak', |
89 ], | 75 ], |
90 }, | 76 }, |
91 ], | 77 ], |
92 }], | 78 }], |
93 }], | 79 }], |
94 ], | 80 ], |
95 } | 81 } |
OLD | NEW |