OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 import("//build/config/compiler/pgo/pgo.gni") | 8 import("//build/config/compiler/pgo/pgo.gni") |
9 import("//build/config/features.gni") | 9 import("//build/config/features.gni") |
10 import("//build/config/locales.gni") | 10 import("//build/config/locales.gni") |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
641 ":clean_up_old_versions", | 641 ":clean_up_old_versions", |
642 | 642 |
643 # keystone_registration_framework copies the framework into the framework | 643 # keystone_registration_framework copies the framework into the framework |
644 # bundle via a script that performs additional actions, rather than | 644 # bundle via a script that performs additional actions, rather than |
645 # relying on a bundle_data to copy it. | 645 # relying on a bundle_data to copy it. |
646 ":keystone_registration_framework", | 646 ":keystone_registration_framework", |
647 | 647 |
648 # verify_chrome_framework_order depends on :chrome_framework and, for | 648 # verify_chrome_framework_order depends on :chrome_framework and, for |
649 # non-component builds, will ensure the export symbol table is correct. | 649 # non-component builds, will ensure the export symbol table is correct. |
650 ":verify_chrome_framework_order", | 650 ":verify_chrome_framework_order", |
651 | |
652 # framework_signed_for_widevine depends on :chrome_framework as the | |
653 # framework needs to be linked before signing can occur. | |
654 ":framework_signed_for_widevine", | |
651 ] | 655 ] |
652 } | 656 } |
653 | 657 |
654 action("clean_up_old_versions") { | 658 action("clean_up_old_versions") { |
655 script = "//chrome/tools/build/mac/clean_up_old_versions.py" | 659 script = "//chrome/tools/build/mac/clean_up_old_versions.py" |
656 outputs = [ | 660 outputs = [ |
657 "$root_gen_dir/run_$target_name.stamp", | 661 "$root_gen_dir/run_$target_name.stamp", |
658 ] | 662 ] |
659 args = [ | 663 args = [ |
660 rebase_path("$root_out_dir/$chrome_product_full_name.app", | 664 rebase_path("$root_out_dir/$chrome_product_full_name.app", |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
842 | 846 |
843 _should_bundle_widevine = | 847 _should_bundle_widevine = |
844 (is_chrome_branded || enable_widevine) && enable_pepper_cdms | 848 (is_chrome_branded || enable_widevine) && enable_pepper_cdms |
845 if (_should_bundle_widevine) { | 849 if (_should_bundle_widevine) { |
846 # The Widevine CDM and manifest are either the actual Widevine CDM and | 850 # The Widevine CDM and manifest are either the actual Widevine CDM and |
847 # manifest or stubs used for testing only. The choice is made within the | 851 # manifest or stubs used for testing only. The choice is made within the |
848 # corresponding Widevine targets based on branding. | 852 # corresponding Widevine targets based on branding. |
849 bundle_data("widevine_cdm_library_binaries") { | 853 bundle_data("widevine_cdm_library_binaries") { |
850 sources = [ | 854 sources = [ |
851 "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin", | 855 "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin", |
852 "$root_out_dir/libwidevinecdm.dylib", | 856 "$root_out_dir/libwidevinecdm.dylib", |
xhwang
2017/01/26 01:22:56
Is it possible to just bundle the cdm/adapter sig
jrummell
2017/01/27 23:13:41
Done. A little bit complicated since the .sigs are
| |
853 ] | 857 ] |
854 outputs = [ | 858 outputs = [ |
855 "{{bundle_root_dir}}/Libraries/$widevine_cdm_path/{{source_file_part}}", | 859 "{{bundle_root_dir}}/Libraries/$widevine_cdm_path/{{source_file_part}}", |
856 ] | 860 ] |
857 public_deps = [ | 861 public_deps = [ |
858 # Need this intermediate dependency because "widevinecdm" is a | 862 # Need this intermediate dependency because "widevinecdm" is a |
859 # shared_library if !is_chrome_branded, and then depending on | 863 # shared_library if !is_chrome_branded, and then depending on |
860 # "widevinecdm" directly would cause it to be linked into the Chromium | 864 # "widevinecdm" directly would cause it to be linked into the Chromium |
861 # Framework, which we don't want. | 865 # Framework, which we don't want. |
862 ":widevine_cdm_library_copy", | 866 ":widevine_cdm_library_copy", |
xhwang
2017/01/26 01:22:56
I wonder whether we could make widevinecdm always
jrummell
2017/01/27 23:13:41
A future CL. cdmadapter would need to link to the
| |
863 "//third_party/widevine/cdm:widevinecdmadapter", | 867 "//third_party/widevine/cdm:widevinecdmadapter", |
864 ] | 868 ] |
865 } | 869 } |
866 | 870 |
867 copy("widevine_cdm_library_copy") { | 871 copy("widevine_cdm_library_copy") { |
868 sources = [ | 872 sources = [ |
869 "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", | 873 "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", |
870 ] | 874 ] |
871 outputs = [ | 875 outputs = [ |
872 "$root_out_dir/{{source_file_part}}", | 876 "$root_out_dir/{{source_file_part}}", |
873 ] | 877 ] |
874 deps = [ | 878 deps = [ |
875 "//third_party/widevine/cdm:widevinecdm", | 879 "//third_party/widevine/cdm:widevinecdm", |
876 ] | 880 ] |
877 } | 881 } |
878 | 882 |
879 bundle_data("widevine_cdm_library_manifest") { | 883 bundle_data("widevine_cdm_library_manifest") { |
880 sources = [ | 884 sources = [ |
881 "$root_out_dir/WidevineCdm/manifest.json", | 885 "$root_out_dir/WidevineCdm/manifest.json", |
882 ] | 886 ] |
883 outputs = [ | 887 outputs = [ |
884 "{{bundle_root_dir}}/Libraries/WidevineCdm/{{source_file_part}}", | 888 "{{bundle_root_dir}}/Libraries/WidevineCdm/{{source_file_part}}", |
885 ] | 889 ] |
886 public_deps = [ | 890 public_deps = [ |
887 "//third_party/widevine/cdm:widevine_cdm_manifest", | 891 "//third_party/widevine/cdm:widevine_cdm_manifest", |
888 ] | 892 ] |
889 } | 893 } |
894 | |
895 # 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.
| |
896 bundle_data("widevine_cdm_library_signatures") { | |
897 sources = [ | |
898 "$root_out_dir/signatures/libwidevinecdm.dylib.sig", | |
899 "$root_out_dir/signatures/widevinecdmadapter.plugin.sig", | |
900 ] | |
901 | |
902 # Signature files must end up in the same directory as the | |
903 # file they are created for. | |
904 outputs = [ | |
905 "{{bundle_root_dir}}/Libraries/$widevine_cdm_path/{{source_file_part}}", | |
906 ] | |
907 public_deps = [ | |
908 ":widevine_copy_cdm_library_signature", | |
909 ":widevine_generate_cdm_adapter_signature", | |
910 ] | |
911 } | |
912 | |
913 copy("widevine_copy_cdm_library_signature") { | |
914 sources = [ | |
915 "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib.sig", | |
916 ] | |
917 outputs = [ | |
918 "$root_out_dir/signatures/{{source_file_part}}", | |
919 ] | |
920 deps = [ | |
921 "//third_party/widevine/cdm:widevinecdm", | |
922 ] | |
923 } | |
924 | |
925 action("widevine_generate_cdm_adapter_signature") { | |
926 script = "//third_party/widevine/scripts/signature_generator.py" | |
927 plugin = "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin" | |
928 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.
| |
929 sources = [ | |
930 "$plugin", | |
931 ] | |
932 outputs = [ | |
933 "$signature_file", | |
934 ] | |
935 args = [ | |
936 "--input_file", | |
937 rebase_path("$plugin", root_build_dir), | |
938 "--output_file", | |
939 rebase_path("$signature_file", root_build_dir), | |
940 ] | |
941 deps = [ | |
942 "//third_party/widevine/cdm:widevinecdmadapter", | |
943 ] | |
944 } | |
945 | |
946 # Bundle the framework signature. As the framework can only be signed once | |
947 # the framework has been linked, bundle it into the app as well as copy | |
948 # it next to the framework. | |
949 bundle_data("widevine_framework_signature") { | |
950 sources = [ | |
951 "$root_out_dir/signatures/$chrome_framework_name.sig", | |
952 ] | |
953 | |
954 # Signature files must end up in the same directory as the | |
955 # file they are created for. | |
956 outputs = [ | |
957 "{{bundle_root_dir}}/Versions/$chrome_version_full/$chrome_framework_nam e.framework/{{source_file_part}}", | |
958 ] | |
959 public_deps = [ | |
960 ":widevine_copy_framework_signature", | |
961 ":widevine_generate_framework_signature", | |
962 ] | |
963 } | |
964 | |
965 # As the framework is signed after the local bundle is created, copy the | |
966 # signature into the local bundle. | |
967 copy("widevine_copy_framework_signature") { | |
968 sources = [ | |
969 "$root_out_dir/signatures/$chrome_framework_name.sig", | |
970 ] | |
971 outputs = [ | |
972 "$root_out_dir/$chrome_framework_name.framework/$chrome_framework_name.s ig", | |
973 ] | |
974 public_deps = [ | |
975 ":widevine_generate_framework_signature", | |
976 ] | |
977 } | |
978 | |
979 action("widevine_generate_framework_signature") { | |
980 script = "//third_party/widevine/scripts/signature_generator.py" | |
981 framework = "$root_out_dir/$chrome_framework_name.framework/$chrome_framew ork_name" | |
982 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.
| |
983 sources = [ | |
984 "$framework", | |
985 ] | |
986 outputs = [ | |
987 "$signature_file", | |
988 ] | |
989 args = [ | |
990 "--input_file", | |
991 rebase_path("$framework", root_out_dir), | |
992 "--output_file", | |
993 rebase_path("$signature_file", root_out_dir), | |
994 ] | |
995 public_deps = [ | |
996 ":chrome_framework", | |
997 ] | |
998 } | |
890 } | 999 } |
891 | 1000 |
892 group("widevine_cdm_library") { | 1001 group("widevine_cdm_library") { |
893 if (_should_bundle_widevine) { | 1002 if (_should_bundle_widevine) { |
894 deps = [ | 1003 deps = [ |
895 ":widevine_cdm_library_binaries", | 1004 ":widevine_cdm_library_binaries", |
896 ":widevine_cdm_library_manifest", | 1005 ":widevine_cdm_library_manifest", |
897 ] | 1006 ] |
1007 | |
1008 # Signatures are only generated for official chrome. | |
1009 if (is_chrome_branded) { | |
1010 deps += [ ":widevine_cdm_library_signatures" ] | |
1011 } | |
1012 } | |
1013 } | |
1014 | |
1015 group("framework_signed_for_widevine") { | |
1016 # Only do this for official Chrome. | |
1017 if (is_chrome_branded && _should_bundle_widevine) { | |
1018 deps = [ | |
1019 ":widevine_framework_signature", | |
1020 ] | |
898 } | 1021 } |
899 } | 1022 } |
900 | 1023 |
901 if (is_chrome_branded) { | 1024 if (is_chrome_branded) { |
902 action("keystone_registration_framework") { | 1025 action("keystone_registration_framework") { |
903 script = "//chrome/tools/build/mac/copy_keystone_framework.py" | 1026 script = "//chrome/tools/build/mac/copy_keystone_framework.py" |
904 | 1027 |
905 framework_path = "//third_party/googlemac/Releases/Keystone/KeystoneRegist ration.framework" | 1028 framework_path = "//third_party/googlemac/Releases/Keystone/KeystoneRegist ration.framework" |
906 output_path = "$root_out_dir/$chrome_framework_name.framework/Frameworks/" | 1029 output_path = "$root_out_dir/$chrome_framework_name.framework/Frameworks/" |
907 | 1030 |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1596 "//chrome/app/theme/$branding_path_component/product_logo_48.png", | 1719 "//chrome/app/theme/$branding_path_component/product_logo_48.png", |
1597 "//chrome/tools/build/linux/chrome-wrapper", | 1720 "//chrome/tools/build/linux/chrome-wrapper", |
1598 "//third_party/xdg-utils/scripts/xdg-mime", | 1721 "//third_party/xdg-utils/scripts/xdg-mime", |
1599 "//third_party/xdg-utils/scripts/xdg-settings", | 1722 "//third_party/xdg-utils/scripts/xdg-settings", |
1600 ] | 1723 ] |
1601 outputs = [ | 1724 outputs = [ |
1602 "$root_out_dir/{{source_file_part}}", | 1725 "$root_out_dir/{{source_file_part}}", |
1603 ] | 1726 ] |
1604 } | 1727 } |
1605 } | 1728 } |
OLD | NEW |