summaryrefslogtreecommitdiffstats
path: root/chromecast/chromecast_locales.gyp
blob: 13b29a2eba1a5950b40b39777f490498da0dfefc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'variables': {
    'chromecast_branding%': 'public',
    'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast_strings',
  },
  'targets': [
    {
      'target_name': 'chromecast_settings',
      'type': 'none',
      'actions': [
        {
          'action_name': 'chromecast_settings',
          'variables': {
            'grit_grd_file': 'app/resources/chromecast_settings.grd',
            'grit_resource_ids': 'app/resources/resource_ids',
          },
          'includes': [ '../build/grit_action.gypi' ],
        },
      ],
      'includes': [ '../build/grit_target.gypi' ],
    },
    {
      'target_name': 'chromecast_locales_pak',
      'type': 'none',
      'dependencies': [
        'chromecast_settings',
      ],
      'conditions': [
        ['chromecast_branding!="public"', {
          'dependencies': [
            'internal/chromecast_locales.gyp:chromecast_app_strings',
          ],
        }],
      ],
      'actions': [
        {
          'action_name': 'repack_locales',
          'message': 'Packing locale-specific resources',
          'variables': {
            'repack_python_cmd': '<(DEPTH)/chromecast/tools/build/chromecast_repack_locales.py',
            'repack_output_dir': '<(PRODUCT_DIR)/chromecast_locales',
            'repack_locales_cmd': [
              'python',
              '<(repack_python_cmd)'
            ],
          },
          'inputs': [
            '<(repack_python_cmd)',
            '<!@pymod_do_main(chromecast_repack_locales -i -b <(chromecast_branding) -g <(grit_out_dir) -x <(repack_output_dir) <(locales))'
          ],
          'outputs': [
            '<!@pymod_do_main(chromecast_repack_locales -o -b <(chromecast_branding) -g <(grit_out_dir) -x <(repack_output_dir) <(locales))'
          ],
          'action': [
            '<@(repack_locales_cmd)',
            '-b', '<(chromecast_branding)',
            '-g', '<(grit_out_dir)',
            '-x', '<(repack_output_dir)/.',
            '<@(locales)',
          ],
        },
      ],
    },
  ],
}