Remove NOTIFICATION_FAVICON_UPDATED
[chromium-blink-merge.git] / remoting / app_remoting_webapp_build.gypi
blobaae7f99d3e08b69154d4babe8f9130c5a5339849
1 # Copyright 2014 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   'includes': [
7     'remoting_version.gypi',
8     'remoting_locales.gypi',
9     'remoting_options.gypi',
10     'remoting_webapp_files.gypi',
11     'app_remoting_webapp_files.gypi',
12   ],
14   'target_defaults': {
15     'type': 'none',
17     'dependencies': [
18       # TODO(wez): Create proper resources for shared-stub and app-specific
19       # stubs.
20       '<(DEPTH)/remoting/remoting.gyp:remoting_resources',
21     ],
23     'locale_files': [
24       '<@(remoting_webapp_locale_files)',
25     ],
27     'includes': [
28       '../chrome/js_unittest_vars.gypi',
29     ],
31     'variables': {
32       'ar_app_manifest_app':
33         '>(ar_app_path)/manifest.json.jinja2',
34       'ar_app_manifest_common':
35         'webapp/app_remoting/manifest_common.json.jinja2',
36       'ar_app_specific_files': [
37         '>(ar_app_path)/icon16.png',
38         '>(ar_app_path)/icon48.png',
39         '>(ar_app_path)/icon128.png',
40       ],
41       'ar_generated_html_files': [
42         '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
43         '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
44         '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
45         '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
46       ],
47       'ar_webapp_files': [
48         '<@(ar_app_specific_files)',
49         '<@(ar_shared_resource_files)',
50         '<@(ar_all_js_files)',
51         '<@(ar_generated_html_files)',
52       ],
53       'output_dir': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name)',
54       'zip_path': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name).zip',
55       'remoting_app_id': [],
56       'remoting_app_name': '>(_app_name)',
57       'remoting_app_description': '>(_app_description)',
59       'ar_webapp_locales_listfile': '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)_locales.txt',
61       'conditions': [
62         ['ar_internal != 1', {
63           'ar_app_name': 'sample_app',
64           'ar_app_path': 'webapp/app_remoting/apps/>(ar_app_name)',
65         }, {
66           # This takes target names of the form 'ar_vvv_xxx_xxx' and extracts
67           # the vendor ('vvv') and the app name ('xxx_xxx').
68           'ar_app_vendor': '>!(python -c "import sys; print sys.argv[1].split(\'_\')[1]" >(_target_name))',
69           'ar_app_name': '>!(python -c "import sys; print \'_\'.join(sys.argv[1].split(\'_\')[2:])" >(_target_name))',
70           'ar_app_path': 'webapp/app_remoting/internal/apps/>(ar_app_vendor)/>(ar_app_name)',
71         }],
72       ],  # conditions
74     },  # variables
76     'actions': [
77       {
78         'action_name': 'Build ">(ar_app_name)" locales listfile',
79         'inputs': [
80           '<(remoting_localize_path)',
81         ],
82         'outputs': [
83           '<(ar_webapp_locales_listfile)',
84         ],
85         'action': [
86           'python', '<(remoting_localize_path)',
87           '--locale_output',
88           '"<(webapp_locale_dir)/@{json_suffix}/messages.json"',
89           '--locales_listfile',
90           '<(ar_webapp_locales_listfile)',
91           '<@(remoting_locales)',
92         ],
93       },
94       {
95         'action_name': 'Build ">(ar_app_name)" application stub',
96         'inputs': [
97           '<(DEPTH)/remoting/webapp/build-webapp.py',
98           '<(chrome_version_path)',
99           '<(remoting_version_path)',
100           '<@(ar_webapp_files)',
101           '<@(remoting_webapp_locale_files)',
102           '<@(ar_generated_html_files)',
103           '<(ar_app_manifest_app)',
104           '<(DEPTH)/remoting/<(ar_app_manifest_common)',
105           '<(ar_webapp_locales_listfile)',
106         ],
107         'outputs': [
108           '<(output_dir)',
109           '<(zip_path)',
110         ],
111         'action': [
112           'python', '<(DEPTH)/remoting/webapp/build-webapp.py',
113           '<(buildtype)',
114           '<(version_full)',
115           '<(output_dir)',
116           '<(zip_path)',
117           '<(ar_app_manifest_app)', # Manifest template
118           'app_remoting',  # Web app type
119           '<@(ar_webapp_files)',
120           '<@(ar_generated_html_files)',
121           '--locales_listfile',
122           '<(ar_webapp_locales_listfile)',
123           '--jinja_paths',
124           '<(DEPTH)/remoting/webapp/app_remoting',
125           '<@(remoting_app_id)',
126           '--app_name',
127           '<(remoting_app_name)',
128           '--app_description',
129           '<(remoting_app_description)',
130           '--app_capabilities',
131           '>@(_app_capabilities)',
132           '--service_environment',
133           '<@(ar_service_environment)',
134           '--manifest_key',
135           '>@(_manifest_key)',
136           '--app_client_id',
137           '>@(_app_client_id)',
138         ],
139       },
140       {
141         'action_name': 'Build ">(ar_app_name)" main.html',
142         'inputs': [
143           '<(DEPTH)/remoting/webapp/build-html.py',
144           '<(ar_main_template)',
145           '<@(ar_main_template_files)',
146         ],
147         'outputs': [
148           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
149         ],
150         'action': [
151           'python', '<(DEPTH)/remoting/webapp/build-html.py',
152           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
153           '<(ar_main_template)',
154           '--template-dir',
155           '<(DEPTH)/remoting',
156           '--templates',
157           '<@(ar_main_template_files)',
158           '--js',
159           '<@(ar_main_js_files)',
160         ],
161       },
162       {
163         'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
164         'inputs': [
165           '<(DEPTH)/remoting/webapp/build-html.py',
166           '<(remoting_webapp_template_wcs_sandbox)',
167         ],
168         'outputs': [
169           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
170         ],
171         'action': [
172           'python', '<(DEPTH)/remoting/webapp/build-html.py',
173           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
174           '<(remoting_webapp_template_wcs_sandbox)',
175           '--js',
176           '<@(remoting_webapp_wcs_sandbox_html_all_js_files)',
177         ],
178       },
179       {
180         'action_name': 'Build ">(ar_app_name)" message_window.html',
181         'inputs': [
182           '<(DEPTH)/remoting/webapp/build-html.py',
183           '<(remoting_webapp_template_message_window)',
184         ],
185         'outputs': [
186           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
187         ],
188         'action': [
189           'python', '<(DEPTH)/remoting/webapp/build-html.py',
190           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
191           '<(remoting_webapp_template_message_window)',
192           '--js', '<@(remoting_webapp_message_window_html_all_js_files)',
193         ],
194       },
195       {
196         'action_name': 'Build ">(ar_app_name)" feedback_consent.html',
197         'inputs': [
198           '<(DEPTH)/remoting/webapp/build-html.py',
199           '<(ar_feedback_consent_template)',
200         ],
201         'outputs': [
202           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
203         ],
204         'action': [
205           'python', '<(DEPTH)/remoting/webapp/build-html.py',
206           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
207           '<(ar_feedback_consent_template)',
208           '--template-dir',
209           '<(DEPTH)/remoting',
210           '--js',
211           '<@(ar_feedback_consent_html_all_js_files)',
212         ],
213       },
214     ],  # actions
215     'conditions': [
216       ['buildtype == "Dev"', {
217         # Normally, the app-id for the orchestrator is automatically extracted
218         # from the webapp's extension id, but that approach doesn't work for
219         # dev webapp builds (since they all share the same dev extension id).
220         # The --appid arg will create a webapp that registers the given app-id
221         # rather than using the extension id.
222         # This is only done for Dev apps because the app-id for Release apps
223         # *must* match the extension id.
224         'variables': {
225           'remoting_app_id': ['--appid', '>(_app_id)'],
226         },
227       }],
228     ],  # conditions
229   },  # target_defaults