This patch utilizes the new <webview> zoom mode API to isolate the zoom of the popup...
[chromium-blink-merge.git] / remoting / app_remoting_webapp_build.gypi
blob9a59c908d69436ce9c5f47d714d34c7f1844d1e0
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         ],
135       },
136       {
137         'action_name': 'Build ">(ar_app_name)" main.html',
138         'inputs': [
139           '<(DEPTH)/remoting/webapp/build-html.py',
140           '<(ar_main_template)',
141           '<@(ar_main_template_files)',
142         ],
143         'outputs': [
144           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
145         ],
146         'action': [
147           'python', '<(DEPTH)/remoting/webapp/build-html.py',
148           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
149           '<(ar_main_template)',
150           '--template-dir',
151           '<(DEPTH)/remoting',
152           '--templates',
153           '<@(ar_main_template_files)',
154           '--js',
155           '<@(ar_main_js_files)',
156         ],
157       },
158       {
159         'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
160         'inputs': [
161           '<(DEPTH)/remoting/webapp/build-html.py',
162           '<(remoting_webapp_template_wcs_sandbox)',
163         ],
164         'outputs': [
165           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
166         ],
167         'action': [
168           'python', '<(DEPTH)/remoting/webapp/build-html.py',
169           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
170           '<(remoting_webapp_template_wcs_sandbox)',
171           '--js',
172           '<@(remoting_webapp_wcs_sandbox_html_all_js_files)',
173         ],
174       },
175       {
176         'action_name': 'Build ">(ar_app_name)" message_window.html',
177         'inputs': [
178           '<(DEPTH)/remoting/webapp/build-html.py',
179           '<(remoting_webapp_template_message_window)',
180         ],
181         'outputs': [
182           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
183         ],
184         'action': [
185           'python', '<(DEPTH)/remoting/webapp/build-html.py',
186           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
187           '<(remoting_webapp_template_message_window)',
188           '--js', '<@(remoting_webapp_message_window_html_all_js_files)',
189         ],
190       },
191       {
192         'action_name': 'Build ">(ar_app_name)" feedback_consent.html',
193         'inputs': [
194           '<(DEPTH)/remoting/webapp/build-html.py',
195           '<(ar_feedback_consent_template)',
196         ],
197         'outputs': [
198           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
199         ],
200         'action': [
201           'python', '<(DEPTH)/remoting/webapp/build-html.py',
202           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
203           '<(ar_feedback_consent_template)',
204           '--template-dir',
205           '<(DEPTH)/remoting',
206           '--js',
207           '<@(ar_feedback_consent_html_all_js_files)',
208         ],
209       },
210     ],  # actions
211     'conditions': [
212       ['buildtype == "Dev"', {
213         # Normally, the app-id for the orchestrator is automatically extracted
214         # from the webapp's extension id, but that approach doesn't work for
215         # dev webapp builds (since they all share the same dev extension id).
216         # The --appid arg will create a webapp that registers the given app-id
217         # rather than using the extension id.
218         # This is only done for Dev apps because the app-id for Release apps
219         # *must* match the extension id.
220         'variables': {
221           'remoting_app_id': ['--appid', '>(_app_id)'],
222         },
223       }],
224     ],  # conditions
225   },  # target_defaults