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',
15 # The ar_service_environment variable is used to define the target
16 # environment for the app being built.
17 # The allowed values are dev, test, staging, and prod.
19 ['buildtype == "Dev"', {
20 'ar_service_environment%': 'dev',
21 }, { # buildtype != 'Dev'
22 # Non-dev build must have this set to 'prod'.
23 'ar_service_environment': 'prod',
32 # TODO(wez): Create proper resources for shared-stub and app-specific
34 '<(DEPTH)/remoting/remoting.gyp:remoting_resources',
38 '<@(remoting_webapp_locale_files)',
42 '../chrome/js_unittest_vars.gypi',
46 'ar_app_manifest_app':
47 '>(ar_app_path)/manifest.json.jinja2',
48 'ar_app_manifest_common':
49 'webapp/app_remoting/manifest_common.json.jinja2',
50 'ar_app_specific_files': [
51 '>(ar_app_path)/icon16.png',
52 '>(ar_app_path)/icon48.png',
53 '>(ar_app_path)/icon128.png',
55 'ar_generated_html_files': [
56 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
57 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
58 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
59 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
62 '<@(ar_app_specific_files)',
63 '<@(ar_shared_resource_files)',
64 '<@(ar_all_js_files)',
65 '<@(ar_generated_html_files)',
67 'output_dir': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name)',
68 'zip_path': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name).zip',
69 'remoting_app_id': [],
70 'remoting_app_name': '>(_app_name)',
71 'remoting_app_description': '>(_app_description)',
73 'ar_webapp_locales_listfile': '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)_locales.txt',
76 ['ar_internal != 1', {
77 'ar_app_name': 'sample_app',
78 'ar_app_path': 'webapp/app_remoting/apps/>(ar_app_name)',
80 # This takes target names of the form 'ar_vvv_xxx_xxx' and extracts
81 # the vendor ('vvv') and the app name ('xxx_xxx').
82 'ar_app_vendor': '>!(python -c "import sys; print sys.argv[1].split(\'_\')[1]" >(_target_name))',
83 'ar_app_name': '>!(python -c "import sys; print \'_\'.join(sys.argv[1].split(\'_\')[2:])" >(_target_name))',
84 'ar_app_path': 'webapp/app_remoting/internal/apps/>(ar_app_vendor)/>(ar_app_name)',
92 'action_name': 'Build ">(ar_app_name)" locales listfile',
94 '<(remoting_localize_path)',
97 '<(ar_webapp_locales_listfile)',
100 'python', '<(remoting_localize_path)',
102 '"<(webapp_locale_dir)/@{json_suffix}/messages.json"',
103 '--locales_listfile',
104 '<(ar_webapp_locales_listfile)',
105 '<@(remoting_locales)',
109 'action_name': 'Build ">(ar_app_name)" application stub',
111 '<(DEPTH)/remoting/webapp/build-webapp.py',
112 '<(chrome_version_path)',
113 '<(remoting_version_path)',
114 '<@(ar_webapp_files)',
115 '<@(remoting_webapp_locale_files)',
116 '<@(ar_generated_html_files)',
117 '<(ar_app_manifest_app)',
118 '<(DEPTH)/remoting/<(ar_app_manifest_common)',
119 '<(ar_webapp_locales_listfile)',
126 'python', '<(DEPTH)/remoting/webapp/build-webapp.py',
131 '<(ar_app_manifest_app)', # Manifest template
132 'app_remoting', # Web app type
133 '<@(ar_webapp_files)',
134 '<@(ar_generated_html_files)',
135 '--locales_listfile',
136 '<(ar_webapp_locales_listfile)',
138 '<(DEPTH)/remoting/webapp/app_remoting',
139 '<@(remoting_app_id)',
141 '<(remoting_app_name)',
143 '<(remoting_app_description)',
144 '--app_capabilities',
145 '>@(_app_capabilities)',
146 '--service_environment',
147 '<@(ar_service_environment)',
151 'action_name': 'Build ">(ar_app_name)" main.html',
153 '<(DEPTH)/remoting/webapp/build-html.py',
154 '<(ar_main_template)',
155 '<@(ar_main_template_files)',
158 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
161 'python', '<(DEPTH)/remoting/webapp/build-html.py',
162 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
163 '<(ar_main_template)',
167 '<@(ar_main_template_files)',
169 '<@(ar_main_js_files)',
173 'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
175 '<(DEPTH)/remoting/webapp/build-html.py',
176 '<(remoting_webapp_template_wcs_sandbox)',
179 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
182 'python', '<(DEPTH)/remoting/webapp/build-html.py',
183 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
184 '<(remoting_webapp_template_wcs_sandbox)',
186 '<@(remoting_webapp_wcs_sandbox_html_all_js_files)',
190 'action_name': 'Build ">(ar_app_name)" message_window.html',
192 '<(DEPTH)/remoting/webapp/build-html.py',
193 '<(remoting_webapp_template_message_window)',
196 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
199 'python', '<(DEPTH)/remoting/webapp/build-html.py',
200 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/message_window.html',
201 '<(remoting_webapp_template_message_window)',
202 '--js', '<@(remoting_webapp_message_window_html_all_js_files)',
206 'action_name': 'Build ">(ar_app_name)" feedback_consent.html',
208 '<(DEPTH)/remoting/webapp/build-html.py',
209 '<(ar_feedback_consent_template)',
212 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
215 'python', '<(DEPTH)/remoting/webapp/build-html.py',
216 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
217 '<(ar_feedback_consent_template)',
221 '<@(ar_feedback_consent_html_all_js_files)',
226 ['buildtype == "Dev"', {
227 # Normally, the app-id for the orchestrator is automatically extracted
228 # from the webapp's extension id, but that approach doesn't work for
229 # dev webapp builds (since they all share the same dev extension id).
230 # The --appid arg will create a webapp that registers the given app-id
231 # rather than using the extension id.
232 # This is only done for Dev apps because the app-id for Release apps
233 # *must* match the extension id.
235 'remoting_app_id': ['--appid', '>(_app_id)'],