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 'action_name': 'Build ">(ar_app_name)" main.html',
139 '<(DEPTH)/remoting/webapp/build-html.py',
140 '<(ar_main_template)',
141 '<@(ar_main_template_files)',
144 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
147 'python', '<(DEPTH)/remoting/webapp/build-html.py',
148 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
149 '<(ar_main_template)',
153 '<@(ar_main_template_files)',
155 '<@(ar_main_js_files)',
159 'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
161 '<(DEPTH)/remoting/webapp/build-html.py',
162 '<(remoting_webapp_template_wcs_sandbox)',
165 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
168 'python', '<(DEPTH)/remoting/webapp/build-html.py',
169 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
170 '<(remoting_webapp_template_wcs_sandbox)',
172 '<@(remoting_webapp_wcs_sandbox_html_all_js_files)',
176 'action_name': 'Build ">(ar_app_name)" message_window.html',
178 '<(DEPTH)/remoting/webapp/build-html.py',
179 '<(remoting_webapp_template_message_window)',
182 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
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)',
192 'action_name': 'Build ">(ar_app_name)" feedback_consent.html',
194 '<(DEPTH)/remoting/webapp/build-html.py',
195 '<(ar_feedback_consent_template)',
198 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
201 'python', '<(DEPTH)/remoting/webapp/build-html.py',
202 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
203 '<(ar_feedback_consent_template)',
207 '<@(ar_feedback_consent_html_all_js_files)',
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.
221 'remoting_app_id': ['--appid', '>(_app_id)'],