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)',
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)" application stub',
93 '<(DEPTH)/remoting/webapp/build-webapp.py',
94 '<(chrome_version_path)',
95 '<(remoting_version_path)',
96 '<@(ar_webapp_files)',
97 '<@(remoting_webapp_locale_files)',
98 '<@(ar_generated_html_files)',
99 '<(ar_app_manifest_app)',
100 '<(DEPTH)/remoting/<(ar_app_manifest_common)',
107 'python', '<(DEPTH)/remoting/webapp/build-webapp.py',
112 '<(ar_app_manifest_app)', # Manifest template
113 'app_remoting', # Web app type
114 '<@(ar_webapp_files)',
115 '<@(ar_generated_html_files)',
117 '<@(remoting_webapp_locale_files)',
119 '<(DEPTH)/remoting/webapp/app_remoting',
120 '<@(remoting_app_id)',
122 '<(remoting_app_name)',
124 '<(remoting_app_description)',
125 '--app_capabilities',
126 '>@(_app_capabilities)',
127 '--service_environment',
128 '<@(ar_service_environment)',
132 'action_name': 'Build ">(ar_app_name)" main.html',
134 '<(DEPTH)/remoting/webapp/build-html.py',
135 '<(ar_main_template)',
136 '<@(ar_main_template_files)',
139 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
142 'python', '<(DEPTH)/remoting/webapp/build-html.py',
143 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
144 '<(ar_main_template)',
148 '<@(ar_main_template_files)',
150 '<@(ar_main_js_files)',
154 'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
156 '<(DEPTH)/remoting/webapp/build-html.py',
157 '<(remoting_webapp_template_wcs_sandbox)',
160 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
163 'python', '<(DEPTH)/remoting/webapp/build-html.py',
164 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
165 '<(remoting_webapp_template_wcs_sandbox)',
169 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
174 ['buildtype == "Dev"', {
175 # Normally, the app-id for the orchestrator is automatically extracted
176 # from the webapp's extension id, but that approach doesn't work for
177 # dev webapp builds (since they all share the same dev extension id).
178 # The --appid arg will create a webapp that registers the given app-id
179 # rather than using the extension id.
180 # This is only done for Dev apps because the app-id for Release apps
181 # *must* match the extension id.
183 'remoting_app_id': ['--appid', '>(_app_id)'],