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