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)/wcs_sandbox.html',
58 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/feedback_consent.html',
61 '<@(ar_app_specific_files)',
62 '<@(ar_shared_resource_files)',
63 '<@(ar_all_js_files)',
64 '<@(ar_generated_html_files)',
66 'output_dir': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name)',
67 'zip_path': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name).zip',
68 'remoting_app_id': [],
69 'remoting_app_name': '>(_app_name)',
70 'remoting_app_description': '>(_app_description)',
72 'ar_webapp_locales_listfile': '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)_locales.txt',
75 ['ar_internal != 1', {
76 'ar_app_name': 'sample_app',
77 'ar_app_path': 'webapp/app_remoting/apps/>(ar_app_name)',
79 # This takes target names of the form 'ar_vvv_xxx_xxx' and extracts
80 # the vendor ('vvv') and the app name ('xxx_xxx').
81 'ar_app_vendor': '>!(python -c "import sys; print sys.argv[1].split(\'_\')[1]" >(_target_name))',
82 'ar_app_name': '>!(python -c "import sys; print \'_\'.join(sys.argv[1].split(\'_\')[2:])" >(_target_name))',
83 'ar_app_path': 'webapp/app_remoting/internal/apps/>(ar_app_vendor)/>(ar_app_name)',
91 'action_name': 'Build ">(ar_app_name)" locales listfile',
93 '<(remoting_localize_path)',
96 '<(ar_webapp_locales_listfile)',
99 'python', '<(remoting_localize_path)',
101 '"<(webapp_locale_dir)/@{json_suffix}/messages.json"',
102 '--locales_listfile',
103 '<(ar_webapp_locales_listfile)',
104 '<@(remoting_locales)',
108 'action_name': 'Build ">(ar_app_name)" application stub',
110 '<(DEPTH)/remoting/webapp/build-webapp.py',
111 '<(chrome_version_path)',
112 '<(remoting_version_path)',
113 '<@(ar_webapp_files)',
114 '<@(remoting_webapp_locale_files)',
115 '<@(ar_generated_html_files)',
116 '<(ar_app_manifest_app)',
117 '<(DEPTH)/remoting/<(ar_app_manifest_common)',
118 '<(ar_webapp_locales_listfile)',
125 'python', '<(DEPTH)/remoting/webapp/build-webapp.py',
130 '<(ar_app_manifest_app)', # Manifest template
131 'app_remoting', # Web app type
132 '<@(ar_webapp_files)',
133 '<@(ar_generated_html_files)',
134 '--locales_listfile',
135 '<(ar_webapp_locales_listfile)',
137 '<(DEPTH)/remoting/webapp/app_remoting',
138 '<@(remoting_app_id)',
140 '<(remoting_app_name)',
142 '<(remoting_app_description)',
143 '--app_capabilities',
144 '>@(_app_capabilities)',
145 '--service_environment',
146 '<@(ar_service_environment)',
150 'action_name': 'Build ">(ar_app_name)" main.html',
152 '<(DEPTH)/remoting/webapp/build-html.py',
153 '<(ar_main_template)',
154 '<@(ar_main_template_files)',
157 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
160 'python', '<(DEPTH)/remoting/webapp/build-html.py',
161 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
162 '<(ar_main_template)',
166 '<@(ar_main_template_files)',
168 '<@(ar_main_js_files)',
172 'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
174 '<(DEPTH)/remoting/webapp/build-html.py',
175 '<(remoting_webapp_template_wcs_sandbox)',
178 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
181 'python', '<(DEPTH)/remoting/webapp/build-html.py',
182 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
183 '<(remoting_webapp_template_wcs_sandbox)',
187 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
191 'action_name': 'Build ">(ar_app_name)" feedback_consent.html',
193 '<(DEPTH)/remoting/webapp/build-html.py',
194 '<(ar_feedback_consent_template)',
195 '<@(ar_feedback_consent_template_files)',
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_template_files)',
209 '<@(ar_feedback_consent_js_files)',
214 ['buildtype == "Dev"', {
215 # Normally, the app-id for the orchestrator is automatically extracted
216 # from the webapp's extension id, but that approach doesn't work for
217 # dev webapp builds (since they all share the same dev extension id).
218 # The --appid arg will create a webapp that registers the given app-id
219 # rather than using the extension id.
220 # This is only done for Dev apps because the app-id for Release apps
221 # *must* match the extension id.
223 'remoting_app_id': ['--appid', '>(_app_id)'],