Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: remoting/webapp/build_template.gni

Issue 1191883002: Revert of [AppRemoting] Break out AppRemoting shared module (re-land). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/build-webapp.py ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/build_template.gni
diff --git a/remoting/webapp/build_template.gni b/remoting/webapp/build_template.gni
index ebbd44ca9e71f5988699e2eb9687016a16079bd3..0eff3e642ea2e072ff85ccda82ac9db527e80757 100644
--- a/remoting/webapp/build_template.gni
+++ b/remoting/webapp/build_template.gni
@@ -79,7 +79,7 @@
js_files = invoker.js_files
html_output = invoker.html_output
- script = rebase_path("//remoting/webapp/build-html.py", root_build_dir)
+ script = "build-html.py"
inputs = [ html_template_file ] + html_template_include_files + js_files
@@ -156,7 +156,7 @@
}
action(target_name) {
- script = "//remoting/webapp/build-webapp.py"
+ script = "build-webapp.py"
webapp_type = invoker.webapp_type
output_dir = invoker.output_dir
@@ -226,20 +226,72 @@
locales_listfile_output = "$target_gen_dir/${target_name}_locales.txt"
build_locales_listfile(locales_listfile) {
- # TODO(garykac) Replace resources with empty stub rather than duplicating
- # all the resources needed by the shared module.
# Template uses locales_listfile_output from outer scope.
}
+ feedback_consent_html = target_name + "_feedback_consent_html"
+ feedback_consent_html_output =
+ "$target_gen_dir/html/$target_name/feedback_consent.html"
+
+ build_webapp_html(feedback_consent_html) {
+ html_template_file = ar_feedback_consent_template
+ html_template_include_files = []
+ js_files = ar_feedback_consent_html_all_js_files
+ html_output = feedback_consent_html_output
+ }
+
+ loading_window_html = target_name + "_loading_window_html"
+ loading_window_html_output =
+ "$target_gen_dir/html/$target_name/loading_window.html"
+
+ build_webapp_html(loading_window_html) {
+ html_template_file = ar_loading_window_template
+ html_template_include_files = []
+
+ # The loading window is just a reskin of the message window -- all JS code
+ # is shared.
+ js_files = remoting_webapp_message_window_html_all_js_files
+ html_output = loading_window_html_output
+ }
+
+ message_window_html = target_name + "_message_window_html"
+ message_window_html_output =
+ "$target_gen_dir/html/$target_name/message_window.html"
+
+ build_webapp_html(message_window_html) {
+ html_template_file = remoting_webapp_template_message_window
+ html_template_include_files = []
+ js_files = remoting_webapp_message_window_html_all_js_files
+ html_output = message_window_html_output
+ }
+
+ wcs_sandbox_html = target_name + "_wcs_sandbox_html"
+ wcs_sandbox_html_output = "$target_gen_dir/html/$target_name/wcs_sandbox.html"
+
+ build_webapp_html(wcs_sandbox_html) {
+ html_template_file = remoting_webapp_template_wcs_sandbox
+ html_template_include_files = []
+ js_files = remoting_webapp_wcs_sandbox_html_all_js_files
+ html_output = wcs_sandbox_html_output
+ }
+
+ main_html = target_name + "_main_html"
+ main_html_output = "$target_gen_dir/html/$target_name/main.html"
+
+ build_webapp_html(main_html) {
+ html_template_file = ar_main_template
+ html_template_include_files = ar_main_template_files
+ js_files = ar_main_js_files
+ html_output = main_html_output
+ }
+
action(target_name) {
- script = "//remoting/webapp/build-webapp.py"
+ script = "build-webapp.py"
app_key = invoker.app_key
app_id = invoker.app_id
app_client_id = invoker.app_client_id
- app_vendor = invoker.app_vendor
app_name = invoker.app_name
- app_fullname = invoker.app_fullname
app_description = invoker.app_description
app_capabilities = invoker.app_capabilities
manifest_key = invoker.manifest_key
@@ -249,19 +301,16 @@
assert(app_key != "" || app_key == "")
assert(app_id != "" || app_id == "")
- ar_base_path = "//remoting/webapp/app_remoting"
- if (app_vendor != "") {
- ar_app_path = "$ar_base_path/internal/apps/$app_vendor/$app_name"
- } else {
- ar_app_path = "$ar_base_path/apps/$app_name"
- }
+ # TODO(garykac) For internal targets, we need to extract the vendor and app
+ # name from the target.
+ ar_app_name = "sample_app" #target_name
+ ar_app_path = "app_remoting/apps/$ar_app_name"
ar_app_manifest = "$ar_app_path/manifest.json.jinja2"
- ar_app_manifest_common = "$ar_base_path/manifest_common.json.jinja2"
+ ar_app_manifest_common = "app_remoting/manifest_common.json.jinja2"
output_dir = "remoting/app_remoting/$ar_service_environment/$target_name"
zip_path = "remoting/app_remoting/$ar_service_environment/$target_name.zip"
- # TODO(garykac) Move this list of files into files.gni.
ar_app_specific_files = [
"$ar_app_path/icon16.png",
"$ar_app_path/icon48.png",
@@ -269,8 +318,16 @@
"$ar_app_path/loading_splash.png",
]
+ ar_generated_html_files = [
+ feedback_consent_html_output,
+ loading_window_html_output,
+ message_window_html_output,
+ wcs_sandbox_html_output,
+ main_html_output,
+ ]
+
ar_webapp_files =
- ar_app_specific_files + ar_vendor_js_files + ar_vendor_html_files
+ ar_app_specific_files + ar_shared_resource_files + ar_all_js_files
inputs = [
rebase_path(ar_app_manifest, root_build_dir),
@@ -283,6 +340,11 @@
deps = [
":$locales_listfile",
+ ":$feedback_consent_html",
+ ":$loading_window_html",
+ ":$message_window_html",
+ ":$wcs_sandbox_html",
+ ":$main_html",
"//remoting/resources",
]
@@ -291,6 +353,7 @@
# limit the size of a command line.
file_list = "$target_gen_dir/${target_name}_files.txt"
files = []
+ files += rebase_path(ar_generated_html_files, root_build_dir)
files += rebase_path(ar_webapp_files, root_build_dir)
write_file(file_list, files)
@@ -312,7 +375,7 @@
]
args += [
"--jinja_paths",
- rebase_path("//remoting/webapp/app_remoting", root_build_dir),
+ rebase_path("app_remoting", root_build_dir),
]
if (is_debug) {
@@ -331,7 +394,7 @@
args += [
"--app_name",
- app_fullname,
+ app_name,
]
args += [
"--app_description",
@@ -352,166 +415,3 @@
]
}
}
-
-template("app_remoting_shared_module") {
- locales_listfile = target_name + "_locales"
- locales_listfile_output = "$target_gen_dir/${target_name}_locales.txt"
-
- build_locales_listfile(locales_listfile) {
- # Template uses locales_listfile_output from outer scope.
- }
-
- feedback_consent_html = target_name + "_feedback_consent_html"
- feedback_consent_html_output =
- "$target_gen_dir/html/$target_name/feedback_consent.html"
-
- build_webapp_html(feedback_consent_html) {
- html_template_file = ar_feedback_consent_template
- html_template_include_files = []
- js_files = ar_feedback_consent_html_all_js_files
- html_output = feedback_consent_html_output
- }
-
- loading_window_html = target_name + "_loading_window_html"
- loading_window_html_output =
- "$target_gen_dir/html/$target_name/loading_window.html"
-
- build_webapp_html(loading_window_html) {
- html_template_file = ar_loading_window_template
- html_template_include_files = []
-
- # The loading window is just a reskin of the message window -- all JS code
- # is shared.
- js_files = remoting_webapp_message_window_html_all_js_files
- html_output = loading_window_html_output
- }
-
- message_window_html = target_name + "_message_window_html"
- message_window_html_output =
- "$target_gen_dir/html/$target_name/message_window.html"
-
- build_webapp_html(message_window_html) {
- html_template_file = remoting_webapp_template_message_window
- html_template_include_files = []
- js_files = remoting_webapp_message_window_html_all_js_files
- html_output = message_window_html_output
- }
-
- wcs_sandbox_html = target_name + "_wcs_sandbox_html"
- wcs_sandbox_html_output = "$target_gen_dir/html/$target_name/wcs_sandbox.html"
-
- build_webapp_html(wcs_sandbox_html) {
- html_template_file = remoting_webapp_template_wcs_sandbox
- html_template_include_files = []
- js_files = remoting_webapp_wcs_sandbox_html_all_js_files
- html_output = wcs_sandbox_html_output
- }
-
- background_html = target_name + "_background_html"
- background_html_output =
- "$target_gen_dir/html/$target_name/ar_background.html"
-
- build_webapp_html(background_html) {
- html_template_file = ar_background_template
- html_template_include_files = []
- js_files = ar_background_html_js_files
- html_output = background_html_output
- }
-
- main_html = target_name + "_main_html"
- main_html_output = "$target_gen_dir/html/$target_name/main.html"
-
- build_webapp_html(main_html) {
- html_template_file = ar_main_template
- html_template_include_files = ar_main_template_files
- js_files = ar_main_js_files
- html_output = main_html_output
- }
-
- action(target_name) {
- script = "build-webapp.py"
-
- app_client_id = invoker.app_client_id
- app_name = invoker.app_name
- app_fullname = invoker.app_fullname
- app_description = invoker.app_description
- manifest_key = invoker.manifest_key
-
- ar_path = "app_remoting/$app_name"
- ar_manifest = "$ar_path/manifest.json"
-
- output_dir = "remoting/app_remoting/$target_name"
- zip_path = "remoting/app_remoting/$target_name.zip"
-
- ar_generated_html_files = [
- background_html_output,
- feedback_consent_html_output,
- loading_window_html_output,
- message_window_html_output,
- wcs_sandbox_html_output,
- main_html_output,
- ]
-
- ar_webapp_files =
- ar_shared_resource_files + ar_all_js_files + ar_generated_html_files
-
- inputs = [ rebase_path(ar_manifest, root_build_dir) ] +
- remoting_version_files + ar_webapp_files
-
- outputs = [
- "$target_gen_dir/$zip_path",
- ]
-
- deps = [
- ":$locales_listfile",
- ":$feedback_consent_html",
- ":$loading_window_html",
- ":$message_window_html",
- ":$wcs_sandbox_html",
- ":$main_html",
- "//remoting/resources",
- ]
-
- # Create a file that contains a list of all the resource files needed
- # to build the webapp. This is needed to avoid problems on platforms that
- # limit the size of a command line.
- file_list = "$target_gen_dir/${target_name}_files.txt"
- files = []
- files += rebase_path(ar_webapp_files, root_build_dir)
- write_file(file_list, files)
-
- args = [
- buildtype,
- version_full,
- output_dir,
- zip_path,
- rebase_path(ar_manifest, root_build_dir),
- "shared_module", # Web app type
- ]
- args += [
- "--files_listfile",
- rebase_path(file_list, root_build_dir),
- ]
- args += [
- "--locales_listfile",
- rebase_path(locales_listfile_output, root_build_dir),
- ]
-
- args += [
- "--app_name",
- app_fullname,
- ]
- args += [
- "--app_description",
- app_description,
- ]
- args += [
- "--manifest_key",
- manifest_key,
- ]
- args += [
- "--app_client_id",
- app_client_id,
- ]
- }
-}
« no previous file with comments | « remoting/webapp/build-webapp.py ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698