• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  'variables': {
7    'chromium_code': 1,
8    'grit_base_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui',
9  },
10  'targets': [
11    {
12      'target_name': 'ui_strings',
13      'type': 'none',
14      'actions': [
15        {
16          'action_name': 'ui_strings',
17          'variables': {
18            'grit_grd_file': 'ui_strings.grd',
19            'grit_out_dir': '<(grit_base_out_dir)/ui_strings',
20          },
21          'includes': [ '../../../build/grit_action.gypi' ],
22        },
23        {
24          'action_name': 'app_locale_settings',
25          'variables': {
26            'grit_grd_file': 'app_locale_settings.grd',
27            'grit_out_dir': '<(grit_base_out_dir)/app_locale_settings',
28          },
29          'includes': [ '../../../build/grit_action.gypi' ],
30        },
31      ],
32      'direct_dependent_settings': {
33        'include_dirs': [
34          '<(grit_base_out_dir)/app_locale_settings',
35          '<(grit_base_out_dir)/ui_strings',
36        ],
37      },
38    },
39  ],
40  'conditions': [
41    ['os_posix == 1 and OS != "mac"', {
42      'targets': [{
43        'target_name': 'ui_unittest_strings',
44        'type': 'none',
45        'dependencies': [
46          'ui_strings',
47        ],
48        'variables': {
49          'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
50          'conditions': [
51            ['OS == "ios"', {
52              'pak_output': '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak',
53            }, {
54              'pak_output': '<(PRODUCT_DIR)/ui_unittests_strings/en-US.pak',
55            }],
56          ],
57        },
58        'actions': [
59          {
60            'action_name': 'repack_ui_unittest_strings',
61            'variables': {
62              'pak_inputs': [
63                '<(grit_base_out_dir)/ui_strings/ui_strings_en-US.pak',
64                '<(grit_base_out_dir)/app_locale_settings/app_locale_settings_en-US.pak',
65              ],
66            },
67            'inputs': [
68              '<(repack_path)',
69              '<@(pak_inputs)',
70            ],
71            'outputs': [
72              '<(pak_output)',
73            ],
74            'action': ['python', '<(repack_path)', '<@(_outputs)',
75                       '<@(pak_inputs)'],
76          },
77        ],
78        'copies': [
79          {
80            'destination': '<(PRODUCT_DIR)/ui_unittests_strings',
81            'files': [
82              '<(grit_base_out_dir)/ui_resources/ui_resources_100_percent.pak',
83            ],
84          },
85        ],
86      }],
87    }],
88  ],
89}
90