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

Unified Diff: chrome/BUILD.gn

Issue 2647393004: Add Widevine signature files into Mac build (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/BUILD.gn
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index d6e93d34e896c90421074a595c7488e3c7b4859a..3e154b6eadbbdbcc33d54552e777f7339dcba2e0 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -648,6 +648,10 @@ if (is_win) {
# verify_chrome_framework_order depends on :chrome_framework and, for
# non-component builds, will ensure the export symbol table is correct.
":verify_chrome_framework_order",
+
+ # framework_signed_for_widevine depends on :chrome_framework as the
+ # framework needs to be linked before signing can occur.
+ ":framework_signed_for_widevine",
]
}
@@ -887,6 +891,111 @@ if (is_win) {
"//third_party/widevine/cdm:widevine_cdm_manifest",
]
}
+
+ # Bundle the signature files for Widevine and the CdmAdapter.
xhwang 2017/01/26 01:22:56 nit: s/Widevine and the CdmAdapter/Widevine CDM an
jrummell 2017/01/27 23:13:41 Removed.
+ bundle_data("widevine_cdm_library_signatures") {
+ sources = [
+ "$root_out_dir/signatures/libwidevinecdm.dylib.sig",
+ "$root_out_dir/signatures/widevinecdmadapter.plugin.sig",
+ ]
+
+ # Signature files must end up in the same directory as the
+ # file they are created for.
+ outputs = [
+ "{{bundle_root_dir}}/Libraries/$widevine_cdm_path/{{source_file_part}}",
+ ]
+ public_deps = [
+ ":widevine_copy_cdm_library_signature",
+ ":widevine_generate_cdm_adapter_signature",
+ ]
+ }
+
+ copy("widevine_copy_cdm_library_signature") {
+ sources = [
+ "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib.sig",
+ ]
+ outputs = [
+ "$root_out_dir/signatures/{{source_file_part}}",
+ ]
+ deps = [
+ "//third_party/widevine/cdm:widevinecdm",
+ ]
+ }
+
+ action("widevine_generate_cdm_adapter_signature") {
+ script = "//third_party/widevine/scripts/signature_generator.py"
+ plugin = "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin"
+ signature_file = "$root_out_dir/signatures/widevinecdmadapter.plugin.sig"
xhwang 2017/01/26 01:22:56 Is it possible that we generate the sig file direc
jrummell 2017/01/27 23:13:41 Done.
+ sources = [
+ "$plugin",
+ ]
+ outputs = [
+ "$signature_file",
+ ]
+ args = [
+ "--input_file",
+ rebase_path("$plugin", root_build_dir),
+ "--output_file",
+ rebase_path("$signature_file", root_build_dir),
+ ]
+ deps = [
+ "//third_party/widevine/cdm:widevinecdmadapter",
+ ]
+ }
+
+ # Bundle the framework signature. As the framework can only be signed once
+ # the framework has been linked, bundle it into the app as well as copy
+ # it next to the framework.
+ bundle_data("widevine_framework_signature") {
+ sources = [
+ "$root_out_dir/signatures/$chrome_framework_name.sig",
+ ]
+
+ # Signature files must end up in the same directory as the
+ # file they are created for.
+ outputs = [
+ "{{bundle_root_dir}}/Versions/$chrome_version_full/$chrome_framework_name.framework/{{source_file_part}}",
+ ]
+ public_deps = [
+ ":widevine_copy_framework_signature",
+ ":widevine_generate_framework_signature",
+ ]
+ }
+
+ # As the framework is signed after the local bundle is created, copy the
+ # signature into the local bundle.
+ copy("widevine_copy_framework_signature") {
+ sources = [
+ "$root_out_dir/signatures/$chrome_framework_name.sig",
+ ]
+ outputs = [
+ "$root_out_dir/$chrome_framework_name.framework/$chrome_framework_name.sig",
+ ]
+ public_deps = [
+ ":widevine_generate_framework_signature",
+ ]
+ }
+
+ action("widevine_generate_framework_signature") {
+ script = "//third_party/widevine/scripts/signature_generator.py"
+ framework = "$root_out_dir/$chrome_framework_name.framework/$chrome_framework_name"
+ signature_file = "$root_out_dir/signatures/$chrome_framework_name.sig"
xhwang 2017/01/26 01:22:56 Is it possible to generate the framework sig file
jrummell 2017/01/27 23:13:41 Done.
+ sources = [
+ "$framework",
+ ]
+ outputs = [
+ "$signature_file",
+ ]
+ args = [
+ "--input_file",
+ rebase_path("$framework", root_out_dir),
+ "--output_file",
+ rebase_path("$signature_file", root_out_dir),
+ ]
+ public_deps = [
+ ":chrome_framework",
+ ]
+ }
}
group("widevine_cdm_library") {
@@ -895,6 +1004,20 @@ if (is_win) {
":widevine_cdm_library_binaries",
":widevine_cdm_library_manifest",
]
+
+ # Signatures are only generated for official chrome.
+ if (is_chrome_branded) {
+ deps += [ ":widevine_cdm_library_signatures" ]
+ }
+ }
+ }
+
+ group("framework_signed_for_widevine") {
+ # Only do this for official Chrome.
+ if (is_chrome_branded && _should_bundle_widevine) {
+ deps = [
+ ":widevine_framework_signature",
+ ]
}
}
« no previous file with comments | « no previous file | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698