Fix WeakPtrFactory members in Android media classes
[chromium-blink-merge.git] / remoting / app_remoting_webapp_build.gypi
blob3ea39a9650342de2ec9a74d78112d6ad008dbc60
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_webapp_files.gypi',
9   ],
11   'variables': {
12     'chromium_code': 1,
14     'run_jscompile%': 0,
16     # This variable is used to define the target environment for the app
17     # being built.  The allowed values are dev, test, staging, and prod.
18     'ar_service_environment%': 'dev',
20     # Identify internal vs. public build targets.
21     'ar_internal%': 0,
23     'remoting_localize_path': 'tools/build/remoting_localize.py',
25     # TODO(wez): Split into shared-stub and app-specific resources.
26     'webapp_locale_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/webapp/_locales',
27     'remoting_locales': [
28       'en',
29     ],
30     'remoting_webapp_locale_files': [
31       # Build the list of .json files generated from remoting_strings.grd.
32       '<!@pymod_do_main(remoting_localize --locale_output '
33           '"<(webapp_locale_dir)/@{json_suffix}/messages.json" '
34           '--print_only <(remoting_locales))',
35     ],
37     'ar_shared_resource_files': [
38       'webapp/app_remoting/html/ar_dialog.css',
39       'webapp/app_remoting/html/feedback_consent.css',
40       'webapp/app_remoting/html/feedback_consent.html',
41       'webapp/app_remoting/html/context_menu.css',
42       'resources/drag.webp',
43       '<@(remoting_webapp_resource_files)',
44     ],
46     # Variables for main.html.
47     # These template files are used to construct the webapp html files.
48     'ar_main_template':
49       'webapp/app_remoting/html/template_lg.html',
50     'ar_main_template_files': [
51       'webapp/base/html/client_plugin.html',
52       'webapp/base/html/dialog_auth.html',
53       'webapp/app_remoting/html/context_menu.html',
54       'webapp/app_remoting/html/idle_dialog.html',
55     ],
56     'ar_main_js_files': [
57       'webapp/app_remoting/js/application_context_menu.js',
58       'webapp/app_remoting/js/app_remoting.js',
59       'webapp/app_remoting/js/ar_main.js',
60       'webapp/app_remoting/js/context_menu_adapter.js',
61       'webapp/app_remoting/js/context_menu_chrome.js',
62       'webapp/app_remoting/js/context_menu_dom.js',
63       'webapp/app_remoting/js/drag_and_drop.js',
64       'webapp/app_remoting/js/idle_detector.js',
65       'webapp/app_remoting/js/keyboard_layouts_menu.js',
66       'webapp/app_remoting/js/loading_window.js',
67       'webapp/app_remoting/js/submenu_manager.js',
68       'webapp/app_remoting/js/window_activation_menu.js',
69       'webapp/base/js/application.js',
70       'webapp/base/js/auth_dialog.js',
71       'webapp/base/js/base.js',
72       'webapp/base/js/message_window_helper.js',
73       'webapp/base/js/message_window_manager.js',
74       '<@(remoting_webapp_js_auth_client2host_files)',
75       '<@(remoting_webapp_js_auth_google_files)',
76       '<@(remoting_webapp_js_cast_extension_files)',
77       '<@(remoting_webapp_js_client_files)',
78       '<@(remoting_webapp_js_core_files)',
79       '<@(remoting_webapp_js_gnubby_auth_files)',
80       '<@(remoting_webapp_js_host_files)',
81       '<@(remoting_webapp_js_logging_files)',
82       '<@(remoting_webapp_js_signaling_files)',
83       '<@(remoting_webapp_js_ui_files)',
84     ],
86     'ar_background_js_files': [
87       'webapp/app_remoting/js/ar_background.js',
88       'webapp/base/js/platform.js',
89     ],
91     'ar_all_js_files': [
92       '<@(ar_main_js_files)',
93       # Referenced from wcs_sandbox.html.
94       '<@(remoting_webapp_js_wcs_sandbox_files)',
95       # Referenced from the manifest.
96       '<@(ar_background_js_files)',
97       # Referenced from feedback_consent.html.
98       'webapp/app_remoting/js/feedback_consent.js',
99       # Referenced from message_window.html.
100       'webapp/base/js/message_window.js',
101     ],
102   },  # end of variables
104   'target_defaults': {
105     'type': 'none',
107     'dependencies': [
108       # TODO(wez): Create proper resources for shared-stub and app-specific
109       # stubs.
110       '../remoting/remoting.gyp:remoting_resources',
111     ],
113     'locale_files': [
114       '<@(remoting_webapp_locale_files)',
115     ],
117     'includes': [
118       '../chrome/js_unittest_vars.gypi',
119     ],
121     'variables': {
122       'ar_app_manifest_app':
123         '>(ar_app_path)/manifest.json.jinja2',
124       'ar_app_manifest_common':
125         'webapp/app_remoting/manifest_common.json.jinja2',
126       'ar_app_specific_files': [
127         '>(ar_app_path)/icon16.png',
128         '>(ar_app_path)/icon48.png',
129         '>(ar_app_path)/icon128.png',
130       ],
131       'ar_generated_html_files': [
132         '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
133         '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
134       ],
135       'ar_webapp_files': [
136         '<@(ar_app_specific_files)',
137         '<@(ar_shared_resource_files)',
138         '<@(ar_all_js_files)',
139         '<@(ar_generated_html_files)',
140       ],
141       'output_dir': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name)',
142       'zip_path': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name).zip',
143       'remoting_app_id': [],
144       'remoting_app_name': '>(_app_name)',
145       'remoting_app_description': '>(_app_description)',
147       'conditions': [
148         ['ar_internal != 1', {
149           'ar_app_name': 'sample_app',
150           'ar_app_path': 'webapp/app_remoting/apps/>(ar_app_name)',
151         }, {
152           # This takes target names of the form 'ar_vvv_xxx_xxx' and extracts
153           # the vendor ('vvv') and the app name ('xxx_xxx').
154           'ar_app_vendor': '>!(python -c "import sys; print sys.argv[1].split(\'_\')[1]" >(_target_name))',
155           'ar_app_name': '>!(python -c "import sys; print \'_\'.join(sys.argv[1].split(\'_\')[2:])" >(_target_name))',
156           'ar_app_path': 'webapp/app_remoting/apps/internal/>(ar_app_vendor)/>(ar_app_name)',
157         }],
158       ],  # conditions
160     },  # variables
162     'actions': [
163       {
164         'action_name': 'Build ">(ar_app_name)" application stub',
165         'inputs': [
166           'webapp/build-webapp.py',
167           '<(chrome_version_path)',
168           '<(remoting_version_path)',
169           '<@(ar_webapp_files)',
170           '<@(remoting_webapp_locale_files)',
171           '<@(ar_generated_html_files)',
172           '<(ar_app_manifest_app)',
173           '<(ar_app_manifest_common)',
174        ],
175         'outputs': [
176           '<(output_dir)',
177           '<(zip_path)',
178         ],
179         'action': [
180           'python', 'webapp/build-webapp.py',
181           '<(buildtype)',
182           '<(version_full)',
183           '<(output_dir)',
184           '<(zip_path)',
185           '<(ar_app_manifest_app)', # Manifest template
186           'app_remoting',  # Web app type
187           '<@(ar_webapp_files)',
188           '<@(ar_generated_html_files)',
189           '--locales',
190           '<@(remoting_webapp_locale_files)',
191           '--jinja_paths',
192           'webapp/app_remoting',
193           '<@(remoting_app_id)',
194           '--app_name',
195           '<(remoting_app_name)',
196           '--app_description',
197           '<(remoting_app_description)',
198           '--service_environment',
199           '<@(ar_service_environment)',
200         ],
201       },
202       {
203         'action_name': 'Build ">(ar_app_name)" main.html',
204         'inputs': [
205           'webapp/build-html.py',
206           '<(ar_main_template)',
207           '<@(ar_main_template_files)',
208         ],
209         'outputs': [
210           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
211         ],
212         'action': [
213           'python', 'webapp/build-html.py',
214           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
215           '<(ar_main_template)',
216           '--template',
217           '<@(ar_main_template_files)',
218           '--js',
219           '<@(ar_main_js_files)',
220         ],
221       },
222       {
223         'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
224         'inputs': [
225           'webapp/build-html.py',
226           '<(remoting_webapp_template_wcs_sandbox)',
227         ],
228         'outputs': [
229           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
230         ],
231         'action': [
232           'python', 'webapp/build-html.py',
233           '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
234           '<(remoting_webapp_template_wcs_sandbox)',
235           '--js',
236           '<@(remoting_webapp_wcs_sandbox_html_js_files)',
237         ],
238       },
239     ],  # actions
240     'conditions': [
241       ['buildtype == "Dev"', {
242         # Normally, the app-id for the orchestrator is automatically extracted
243         # from the webapp's extension id, but that approach doesn't work for
244         # dev webapp builds (since they all share the same dev extension id).
245         # The --appid arg will create a webapp that registers the given app-id
246         # rather than using the extension id.
247         # This is only done for Dev apps because the app-id for Release apps
248         # *must* match the extension id.
249         'variables': {
250           'remoting_app_id': ['--appid', '>(_app_id)'],
251         },
252       }],
253       ['run_jscompile != 0', {
254         'actions': [
255           {
256             'action_name': 'Verify >(ar_app_name) main.html',
257             'variables': {
258               'success_stamp': '<(PRODUCT_DIR)/>(_target_name)_main_jscompile.stamp',
259             },
260             'inputs': [
261               'tools/jscompile.py',
262               '<@(ar_main_js_files)',
263               '<@(remoting_webapp_js_proto_files)',
264               # Include zip as input so that this action is run after the build.
265               '<(zip_path)',
266             ],
267             'outputs': [
268               '<(success_stamp)',
269             ],
270             'action': [
271               'python', 'tools/jscompile.py',
272               '<@(ar_main_js_files)',
273               '<@(remoting_webapp_js_proto_files)',
274               '--success-stamp',
275               '<(success_stamp)'
276             ],
277           },
278           {
279             'action_name': 'Verify >(ar_app_name) background.js',
280             'variables': {
281               'success_stamp': '<(PRODUCT_DIR)/>(_target_name)_background_jscompile.stamp',
282             },
283             'inputs': [
284               'tools/jscompile.py',
285               '<@(ar_background_js_files)',
286               '<@(remoting_webapp_js_proto_files)',
287               # Include zip as input so that this action is run after the build.
288               '<(zip_path)',
289             ],
290             'outputs': [
291               '<(success_stamp)',
292             ],
293             'action': [
294               'python', 'tools/jscompile.py',
295               '<@(ar_background_js_files)',
296               '<@(remoting_webapp_js_proto_files)',
297               '--success-stamp',
298               '<(success_stamp)'
299             ],
300           },
301         ],  # actions
302       }],
303     ],  # conditions
304   },  # target_defaults