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_webapp_files.gypi',
10 'app_remoting_webapp_files.gypi',
18 # The ar_service_environment variable is used to define the target
19 # environment for the app being built.
20 # The allowed values are dev, test, staging, and prod.
22 ['buildtype == "Dev"', {
23 'ar_service_environment%': 'dev',
24 }, { # buildtype != 'Dev'
25 # Non-dev build must have this set to 'prod'.
26 'ar_service_environment': 'prod',
35 # TODO(wez): Create proper resources for shared-stub and app-specific
37 '<(DEPTH)/remoting/remoting.gyp:remoting_resources',
41 '<@(remoting_webapp_locale_files)',
45 '../chrome/js_unittest_vars.gypi',
49 'ar_app_manifest_app':
50 '>(ar_app_path)/manifest.json.jinja2',
51 'ar_app_manifest_common':
52 'webapp/app_remoting/manifest_common.json.jinja2',
53 'ar_app_specific_files': [
54 '>(ar_app_path)/icon16.png',
55 '>(ar_app_path)/icon48.png',
56 '>(ar_app_path)/icon128.png',
58 'ar_generated_html_files': [
59 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
60 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
63 '<@(ar_app_specific_files)',
64 '<@(ar_shared_resource_files)',
65 '<@(ar_all_js_files)',
66 '<@(ar_generated_html_files)',
68 'output_dir': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name)',
69 'zip_path': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name).zip',
70 'remoting_app_id': [],
71 'remoting_app_name': '>(_app_name)',
72 'remoting_app_description': '>(_app_description)',
74 'ar_webapp_locales_listfile': '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)_locales.txt',
77 ['ar_internal != 1', {
78 'ar_app_name': 'sample_app',
79 'ar_app_path': 'webapp/app_remoting/apps/>(ar_app_name)',
81 # This takes target names of the form 'ar_vvv_xxx_xxx' and extracts
82 # the vendor ('vvv') and the app name ('xxx_xxx').
83 'ar_app_vendor': '>!(python -c "import sys; print sys.argv[1].split(\'_\')[1]" >(_target_name))',
84 'ar_app_name': '>!(python -c "import sys; print \'_\'.join(sys.argv[1].split(\'_\')[2:])" >(_target_name))',
85 'ar_app_path': 'webapp/app_remoting/internal/apps/>(ar_app_vendor)/>(ar_app_name)',
93 'action_name': 'Build ">(ar_app_name)" locales listfile',
95 '<(remoting_localize_path)',
98 '<(ar_webapp_locales_listfile)',
101 'python', '<(remoting_localize_path)',
103 '"<(webapp_locale_dir)/@{json_suffix}/messages.json"',
104 '--locales_listfile',
105 '<(ar_webapp_locales_listfile)',
106 '<@(remoting_locales)',
110 'action_name': 'Build ">(ar_app_name)" application stub',
112 '<(DEPTH)/remoting/webapp/build-webapp.py',
113 '<(chrome_version_path)',
114 '<(remoting_version_path)',
115 '<@(ar_webapp_files)',
116 '<@(remoting_webapp_locale_files)',
117 '<@(ar_generated_html_files)',
118 '<(ar_app_manifest_app)',
119 '<(DEPTH)/remoting/<(ar_app_manifest_common)',
120 '<(ar_webapp_locales_listfile)',
127 'python', '<(DEPTH)/remoting/webapp/build-webapp.py',
132 '<(ar_app_manifest_app)', # Manifest template
133 'app_remoting', # Web app type
134 '<@(ar_webapp_files)',
135 '<@(ar_generated_html_files)',
136 '--locales_listfile',
137 '<(ar_webapp_locales_listfile)',
139 '<(DEPTH)/remoting/webapp/app_remoting',
140 '<@(remoting_app_id)',
142 '<(remoting_app_name)',
144 '<(remoting_app_description)',
145 '--app_capabilities',
146 '>@(_app_capabilities)',
147 '--service_environment',
148 '<@(ar_service_environment)',
152 'action_name': 'Build ">(ar_app_name)" main.html',
154 '<(DEPTH)/remoting/webapp/build-html.py',
155 '<(ar_main_template)',
156 '<@(ar_main_template_files)',
159 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
162 'python', '<(DEPTH)/remoting/webapp/build-html.py',
163 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
164 '<(ar_main_template)',
168 '<@(ar_main_template_files)',
170 '<@(ar_main_js_files)',
174 'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
176 '<(DEPTH)/remoting/webapp/build-html.py',
177 '<(remoting_webapp_template_wcs_sandbox)',
180 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
183 'python', '<(DEPTH)/remoting/webapp/build-html.py',
184 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
185 '<(remoting_webapp_template_wcs_sandbox)',
189 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
194 ['buildtype == "Dev"', {
195 # Normally, the app-id for the orchestrator is automatically extracted
196 # from the webapp's extension id, but that approach doesn't work for
197 # dev webapp builds (since they all share the same dev extension id).
198 # The --appid arg will create a webapp that registers the given app-id
199 # rather than using the extension id.
200 # This is only done for Dev apps because the app-id for Release apps
201 # *must* match the extension id.
203 'remoting_app_id': ['--appid', '>(_app_id)'],