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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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", |
863 "//third_party/widevine/cdm:widevinecdmadapter", | 867 "//third_party/widevine/cdm:widevinecdmadapter", |
864 ] | 868 ] |
869 | |
870 # Signatures are only generated for official chrome. | |
871 if (is_chrome_branded) { | |
872 sources += [ | |
873 "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin.sig", | |
874 "$root_out_dir/libwidevinecdm.dylib.sig", | |
875 ] | |
876 public_deps += [ ":widevine_generate_cdm_adapter_signature" ] | |
877 } | |
865 } | 878 } |
866 | 879 |
867 copy("widevine_cdm_library_copy") { | 880 copy("widevine_cdm_library_copy") { |
868 sources = [ | 881 sources = [ |
869 "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", | 882 "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", |
870 ] | 883 ] |
884 if (is_chrome_branded) { | |
885 sources += | |
886 [ "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib.sig" ] | |
887 } | |
871 outputs = [ | 888 outputs = [ |
872 "$root_out_dir/{{source_file_part}}", | 889 "$root_out_dir/{{source_file_part}}", |
873 ] | 890 ] |
874 deps = [ | 891 deps = [ |
875 "//third_party/widevine/cdm:widevinecdm", | 892 "//third_party/widevine/cdm:widevinecdm", |
876 ] | 893 ] |
877 } | 894 } |
878 | 895 |
879 bundle_data("widevine_cdm_library_manifest") { | 896 bundle_data("widevine_cdm_library_manifest") { |
880 sources = [ | 897 sources = [ |
881 "$root_out_dir/WidevineCdm/manifest.json", | 898 "$root_out_dir/WidevineCdm/manifest.json", |
882 ] | 899 ] |
883 outputs = [ | 900 outputs = [ |
884 "{{bundle_root_dir}}/Libraries/WidevineCdm/{{source_file_part}}", | 901 "{{bundle_root_dir}}/Libraries/WidevineCdm/{{source_file_part}}", |
885 ] | 902 ] |
886 public_deps = [ | 903 public_deps = [ |
887 "//third_party/widevine/cdm:widevine_cdm_manifest", | 904 "//third_party/widevine/cdm:widevine_cdm_manifest", |
888 ] | 905 ] |
889 } | 906 } |
907 | |
908 action("widevine_generate_cdm_adapter_signature") { | |
xhwang
2017/01/28 00:29:38
It seems we'll use similar action in a lot of plac
jrummell
2017/01/28 02:05:09
Done.
| |
909 script = "//third_party/widevine/scripts/signature_generator.py" | |
910 plugin = "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin" | |
911 sources = [ | |
912 "$plugin", | |
913 ] | |
914 outputs = [ | |
915 "$plugin.sig", | |
916 ] | |
917 args = [ | |
918 "--input_file", | |
919 rebase_path("$plugin", root_build_dir), | |
920 "--output_file", | |
921 rebase_path("$plugin.sig", root_build_dir), | |
922 ] | |
923 deps = [ | |
924 "//third_party/widevine/cdm:widevinecdmadapter", | |
925 ] | |
926 } | |
927 | |
928 # Bundle the framework signature into the app. As the framework can only | |
xhwang
2017/01/28 00:29:37
here and everywhere else, s/framework/chrome frame
jrummell
2017/01/28 02:05:09
Done.
| |
929 # be signed once the framework has been linked, this can't be bundled with | |
930 # the framework, so :widevine_generate_framework_signature adds the | |
931 # signature to the framework, and this bundles it with the app. | |
932 bundle_data("widevine_framework_signature") { | |
933 sources = [ | |
934 "$root_out_dir/$chrome_framework_name.framework/$chrome_framework_name.s ig", | |
935 ] | |
936 outputs = [ | |
937 "{{bundle_root_dir}}/Versions/$chrome_version_full/$chrome_framework_nam e.framework/{{source_file_part}}", | |
938 ] | |
939 public_deps = [ | |
940 ":widevine_generate_framework_signature", | |
941 ] | |
942 } | |
943 | |
944 action("widevine_generate_framework_signature") { | |
xhwang
2017/01/28 00:29:37
ditto about naming, how about
sign_chrome_framewo
jrummell
2017/01/28 02:05:09
Done (as sign_chrome_framework_for_widevine).
| |
945 script = "//third_party/widevine/scripts/signature_generator.py" | |
946 framework = "$root_out_dir/$chrome_framework_name.framework/$chrome_framew ork_name" | |
947 sources = [ | |
948 "$framework", | |
949 ] | |
950 outputs = [ | |
951 "$framework.sig", | |
952 ] | |
953 args = [ | |
954 "--input_file", | |
955 rebase_path("$framework", root_out_dir), | |
956 "--output_file", | |
957 rebase_path("$framework.sig", root_out_dir), | |
958 ] | |
959 public_deps = [ | |
960 ":chrome_framework", | |
961 ] | |
962 } | |
890 } | 963 } |
891 | 964 |
892 group("widevine_cdm_library") { | 965 group("widevine_cdm_library") { |
893 if (_should_bundle_widevine) { | 966 if (_should_bundle_widevine) { |
894 deps = [ | 967 deps = [ |
895 ":widevine_cdm_library_binaries", | 968 ":widevine_cdm_library_binaries", |
896 ":widevine_cdm_library_manifest", | 969 ":widevine_cdm_library_manifest", |
897 ] | 970 ] |
898 } | 971 } |
899 } | 972 } |
900 | 973 |
974 group("framework_signed_for_widevine") { | |
975 # Only do this for official Chrome. | |
976 if (is_chrome_branded && _should_bundle_widevine) { | |
977 deps = [ | |
978 ":widevine_framework_signature", | |
979 ] | |
980 } | |
981 } | |
982 | |
901 if (is_chrome_branded) { | 983 if (is_chrome_branded) { |
902 action("keystone_registration_framework") { | 984 action("keystone_registration_framework") { |
903 script = "//chrome/tools/build/mac/copy_keystone_framework.py" | 985 script = "//chrome/tools/build/mac/copy_keystone_framework.py" |
904 | 986 |
905 framework_path = "//third_party/googlemac/Releases/Keystone/KeystoneRegist ration.framework" | 987 framework_path = "//third_party/googlemac/Releases/Keystone/KeystoneRegist ration.framework" |
906 output_path = "$root_out_dir/$chrome_framework_name.framework/Frameworks/" | 988 output_path = "$root_out_dir/$chrome_framework_name.framework/Frameworks/" |
907 | 989 |
908 sources = [ | 990 sources = [ |
909 framework_path, | 991 framework_path, |
910 script, | 992 script, |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1596 "//chrome/app/theme/$branding_path_component/product_logo_48.png", | 1678 "//chrome/app/theme/$branding_path_component/product_logo_48.png", |
1597 "//chrome/tools/build/linux/chrome-wrapper", | 1679 "//chrome/tools/build/linux/chrome-wrapper", |
1598 "//third_party/xdg-utils/scripts/xdg-mime", | 1680 "//third_party/xdg-utils/scripts/xdg-mime", |
1599 "//third_party/xdg-utils/scripts/xdg-settings", | 1681 "//third_party/xdg-utils/scripts/xdg-settings", |
1600 ] | 1682 ] |
1601 outputs = [ | 1683 outputs = [ |
1602 "$root_out_dir/{{source_file_part}}", | 1684 "$root_out_dir/{{source_file_part}}", |
1603 ] | 1685 ] |
1604 } | 1686 } |
1605 } | 1687 } |
OLD | NEW |