Fix nullptr crash in OnEmbed
[chromium-blink-merge.git] / chrome / policy_templates.gypi
blobc577f8f72aa3420e0db7b724d5b26e95bc8ea3a8
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.
6   'targets': [
7     {
8       'target_name': 'pack_policy_templates',
9       'type': 'none',
10       'conditions': [
11         ['OS=="win" or OS=="mac" or OS=="linux"', {
12           'dependencies': [
13             '../components/components.gyp:policy_templates',
14           ],
15         }],
16         ['OS=="win"', {
17           'variables': {
18             'version_path': '<(grit_out_dir)/app/policy/VERSION',
19           },
20           'actions': [
21             {
22               'action_name': 'add_version',
23               'inputs': [
24                 'VERSION',
25               ],
26               'outputs': [
27                 '<(version_path)',
28               ],
29               'action': [
30                 'python',
31                 '../build/cp.py',
32                 '<@(_inputs)',
33                 '<@(_outputs)',
34               ],
35             },
36             {
37               # Add all the templates generated at the previous step into
38               # a zip archive.
39               'action_name': 'pack_templates',
40               'variables': {
41                 'grit_grd_file': '../components/policy/resources/policy_templates.grd',
42                 'grit_info_cmd': [
43                   'python',
44                   '<(DEPTH)/tools/grit/grit_info.py',
45                   '<@(grit_defines)',
46                 ],
47                 'template_files': [
48                   '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(grit_grd_file))',
49                 ],
50                 'zip_script': '../components/policy/tools/make_policy_zip.py',
51               },
52               'inputs': [
53                 '<(version_path)',
54                 '<@(template_files)',
55                 '<(zip_script)',
56                 '<!@pymod_do_main(grit_info <@(grit_defines) '
57                     '--inputs "<(grit_grd_file)" '
58                     '-f "<(DEPTH)/tools/gritsettings/resource_ids")',
59               ],
60               'outputs': [
61                 '<(PRODUCT_DIR)/policy_templates.zip',
62               ],
63               'action': [
64                 'python',
65                 '<(zip_script)',
66                 '--output',
67                 '<@(_outputs)',
68                 '--basedir', '<(grit_out_dir)/app/policy',
69                 # The list of files in the destination zip is derived from
70                 # the list of output nodes in the following grd file.
71                 # This whole trickery is necessary because we cannot pass
72                 # the entire list of file names as command line arguments,
73                 # because they would exceed the length limit on Windows.
74                 '--grd_input',
75                 '<(grit_grd_file)',
76                 '--grd_strip_path_prefix',
77                 'app/policy',
78                 '--extra_input',
79                 'VERSION',
80                 # Module to be used to process grd_input'.
81                 '--grit_info',
82                 '<(DEPTH)/tools/grit/grit_info.py',
83                 '<@(grit_defines)',
84               ],
85               'message': 'Packing generated templates into <(_outputs)',
86             },
87           ],
88         }],
89       ],
90     },
91   ],