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.
7 'remoting_version.gypi',
8 'remoting_locales.gypi',
9 'remoting_options.gypi',
10 'remoting_webapp_files.gypi',
11 'app_remoting_webapp_files.gypi',
18 # TODO(wez): Create proper resources for shared-stub and app-specific
20 '<(DEPTH)/remoting/remoting.gyp:remoting_resources',
24 '<@(remoting_webapp_locale_files)',
28 '../chrome/js_unittest_vars.gypi',
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',
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',
48 '<@(ar_app_specific_files)',
49 '<@(ar_shared_resource_files)',
50 '<@(ar_all_js_files)',
51 '<@(ar_generated_html_files)',
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',
62 ['ar_internal != 1', {
63 'ar_app_name': 'sample_app',
64 'ar_app_path': 'webapp/app_remoting/apps/>(ar_app_name)',
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)',
78 'action_name': 'Build ">(ar_app_name)" locales listfile',
80 '<(remoting_localize_path)',
83 '<(ar_webapp_locales_listfile)',
86 'python', '<(remoting_localize_path)',
88 '"<(webapp_locale_dir)/@{json_suffix}/messages.json"',
90 '<(ar_webapp_locales_listfile)',
91 '<@(remoting_locales)',
95 'action_name': 'Build ">(ar_app_name)" application stub',
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)',
112 'python', '<(DEPTH)/remoting/webapp/build-webapp.py',
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)',
124 '<(DEPTH)/remoting/webapp/app_remoting',
125 '<@(remoting_app_id)',
127 '<(remoting_app_name)',
129 '<(remoting_app_description)',
130 '--app_capabilities',
131 '>@(_app_capabilities)',
132 '--service_environment',
133 '<@(ar_service_environment)',
137 '>@(_app_client_id)',
141 'action_name': 'Build ">(ar_app_name)" main.html',
143 '<(DEPTH)/remoting/webapp/build-html.py',
144 '<(ar_main_template)',
145 '<@(ar_main_template_files)',
148 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
151 'python', '<(DEPTH)/remoting/webapp/build-html.py',
152 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
153 '<(ar_main_template)',
157 '<@(ar_main_template_files)',
159 '<@(ar_main_js_files)',
163 'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
165 '<(DEPTH)/remoting/webapp/build-html.py',
166 '<(remoting_webapp_template_wcs_sandbox)',
169 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
172 'python', '<(DEPTH)/remoting/webapp/build-html.py',
173 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
174 '<(remoting_webapp_template_wcs_sandbox)',
176 '<@(remoting_webapp_wcs_sandbox_html_all_js_files)',
180 'action_name': 'Build ">(ar_app_name)" message_window.html',
182 '<(DEPTH)/remoting/webapp/build-html.py',
183 '<(remoting_webapp_template_message_window)',
186 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
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)',
196 'action_name': 'Build ">(ar_app_name)" feedback_consent.html',
198 '<(DEPTH)/remoting/webapp/build-html.py',
199 '<(ar_feedback_consent_template)',
202 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
205 'python', '<(DEPTH)/remoting/webapp/build-html.py',
206 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
207 '<(ar_feedback_consent_template)',
211 '<@(ar_feedback_consent_html_all_js_files)',
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.
225 'remoting_app_id': ['--appid', '>(_app_id)'],