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 # This variable is used to define the target environment for the app
19 # being built. The allowed values are dev, test, staging, and prod.
20 'ar_service_environment%': 'dev',
27 # TODO(wez): Create proper resources for shared-stub and app-specific
29 '<(DEPTH)/remoting/remoting.gyp:remoting_resources',
33 '<@(remoting_webapp_locale_files)',
37 '../chrome/js_unittest_vars.gypi',
41 'ar_app_manifest_app':
42 '>(ar_app_path)/manifest.json.jinja2',
43 'ar_app_manifest_common':
44 'webapp/app_remoting/manifest_common.json.jinja2',
45 'ar_app_specific_files': [
46 '>(ar_app_path)/icon16.png',
47 '>(ar_app_path)/icon48.png',
48 '>(ar_app_path)/icon128.png',
50 'ar_generated_html_files': [
51 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
52 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
55 '<@(ar_app_specific_files)',
56 '<@(ar_shared_resource_files)',
57 '<@(ar_all_js_files)',
58 '<@(ar_generated_html_files)',
60 'output_dir': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name)',
61 'zip_path': '<(PRODUCT_DIR)/app_streaming/<@(ar_service_environment)/>(_target_name).zip',
62 'remoting_app_id': [],
63 'remoting_app_name': '>(_app_name)',
64 'remoting_app_description': '>(_app_description)',
67 ['ar_internal != 1', {
68 'ar_app_name': 'sample_app',
69 'ar_app_path': 'webapp/app_remoting/apps/>(ar_app_name)',
71 # This takes target names of the form 'ar_vvv_xxx_xxx' and extracts
72 # the vendor ('vvv') and the app name ('xxx_xxx').
73 'ar_app_vendor': '>!(python -c "import sys; print sys.argv[1].split(\'_\')[1]" >(_target_name))',
74 'ar_app_name': '>!(python -c "import sys; print \'_\'.join(sys.argv[1].split(\'_\')[2:])" >(_target_name))',
75 'ar_app_path': 'webapp/app_remoting/internal/apps/>(ar_app_vendor)/>(ar_app_name)',
83 'action_name': 'Build ">(ar_app_name)" application stub',
85 '<(DEPTH)/remoting/webapp/build-webapp.py',
86 '<(chrome_version_path)',
87 '<(remoting_version_path)',
88 '<@(ar_webapp_files)',
89 '<@(remoting_webapp_locale_files)',
90 '<@(ar_generated_html_files)',
91 '<(ar_app_manifest_app)',
92 '<(DEPTH)/remoting/<(ar_app_manifest_common)',
99 'python', '<(DEPTH)/remoting/webapp/build-webapp.py',
104 '<(ar_app_manifest_app)', # Manifest template
105 'app_remoting', # Web app type
106 '<@(ar_webapp_files)',
107 '<@(ar_generated_html_files)',
109 '<@(remoting_webapp_locale_files)',
111 '<(DEPTH)/remoting/webapp/app_remoting',
112 '<@(remoting_app_id)',
114 '<(remoting_app_name)',
116 '<(remoting_app_description)',
117 '--service_environment',
118 '<@(ar_service_environment)',
122 'action_name': 'Build ">(ar_app_name)" main.html',
124 '<(DEPTH)/remoting/webapp/build-html.py',
125 '<(ar_main_template)',
126 '<@(ar_main_template_files)',
129 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
132 'python', '<(DEPTH)/remoting/webapp/build-html.py',
133 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/main.html',
134 '<(ar_main_template)',
138 '<@(ar_main_template_files)',
140 '<@(ar_main_js_files)',
144 'action_name': 'Build ">(ar_app_name)" wcs_sandbox.html',
146 '<(DEPTH)/remoting/webapp/build-html.py',
147 '<(remoting_webapp_template_wcs_sandbox)',
150 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
153 'python', '<(DEPTH)/remoting/webapp/build-html.py',
154 '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)/wcs_sandbox.html',
155 '<(remoting_webapp_template_wcs_sandbox)',
159 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
164 ['buildtype == "Dev"', {
165 # Normally, the app-id for the orchestrator is automatically extracted
166 # from the webapp's extension id, but that approach doesn't work for
167 # dev webapp builds (since they all share the same dev extension id).
168 # The --appid arg will create a webapp that registers the given app-id
169 # rather than using the extension id.
170 # This is only done for Dev apps because the app-id for Release apps
171 # *must* match the extension id.
173 'remoting_app_id': ['--appid', '>(_app_id)'],