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/features.gni") | 8 import("//build/config/features.gni") |
9 import("//build/config/locales.gni") | 9 import("//build/config/locales.gni") |
10 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
11 import("//build/config/ui.gni") | 11 import("//build/config/ui.gni") |
12 import("//build/config/win/console_app.gni") | 12 import("//build/config/win/console_app.gni") |
13 import("//build/config/win/manifest.gni") | 13 import("//build/config/win/manifest.gni") |
14 import("//chrome/chrome_repack_locales.gni") | 14 import("//chrome/chrome_repack_locales.gni") |
15 import("//chrome/common/features.gni") | 15 import("//chrome/common/features.gni") |
16 import("//chrome/version.gni") | 16 import("//chrome/version.gni") |
17 import("//ui/base/ui_features.gni") | 17 import("//ui/base/ui_features.gni") |
18 import("//v8/gni/v8.gni") | 18 import("//v8/gni/v8.gni") |
19 | 19 |
20 android_resource_whitelist = "$target_gen_dir/resource_whitelist.txt" | |
21 | |
20 if (is_android) { | 22 if (is_android) { |
21 import("//build/config/android/rules.gni") | 23 import("//build/config/android/rules.gni") |
22 } else if (is_mac) { | 24 } else if (is_mac) { |
23 import("//build/compiled_action.gni") | 25 import("//build/compiled_action.gni") |
24 import("//build/config/mac/rules.gni") | 26 import("//build/config/mac/rules.gni") |
25 import("//build/config/mac/symbols.gni") | 27 import("//build/config/mac/symbols.gni") |
26 import("//build/mac/tweak_info_plist.gni") | 28 import("//build/mac/tweak_info_plist.gni") |
27 import("//build/util/branding.gni") | 29 import("//build/util/branding.gni") |
28 import("//build/util/version.gni") | 30 import("//build/util/version.gni") |
29 import("//build_overrides/v8.gni") | 31 import("//build_overrides/v8.gni") |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1476 } | 1478 } |
1477 | 1479 |
1478 # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms | 1480 # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms |
1479 # it them copies it. This skipes the copy step and writes it to the final | 1481 # it them copies it. This skipes the copy step and writes it to the final |
1480 # location. | 1482 # location. |
1481 if (is_mac || is_ios) { | 1483 if (is_mac || is_ios) { |
1482 output = "$root_gen_dir/repack/resources.pak" | 1484 output = "$root_gen_dir/repack/resources.pak" |
1483 } else { | 1485 } else { |
1484 output = "$root_out_dir/resources.pak" | 1486 output = "$root_out_dir/resources.pak" |
1485 } | 1487 } |
1488 | |
1489 if (is_android && enable_resource_whitelist_generation) { | |
1490 repack_whitelist = android_resource_whitelist | |
1491 deps += [ "//chrome:resource_whitelist" ] | |
1492 } | |
1486 } | 1493 } |
1487 | 1494 |
1488 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak | 1495 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak |
1489 repack("browser_tests_pak") { | 1496 repack("browser_tests_pak") { |
1490 sources = [ | 1497 sources = [ |
1491 "$root_gen_dir/chrome/options_test_resources.pak", | 1498 "$root_gen_dir/chrome/options_test_resources.pak", |
1492 "$root_gen_dir/chrome/webui_test_resources.pak", | 1499 "$root_gen_dir/chrome/webui_test_resources.pak", |
1493 ] | 1500 ] |
1494 output = "$root_out_dir/browser_tests.pak" | 1501 output = "$root_out_dir/browser_tests.pak" |
1495 deps = [ | 1502 deps = [ |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1590 if (enable_extensions) { | 1597 if (enable_extensions) { |
1591 sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${perc ent}_percent.pak" ] | 1598 sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${perc ent}_percent.pak" ] |
1592 deps += [ "//extensions:extensions_browser_resources" ] | 1599 deps += [ "//extensions:extensions_browser_resources" ] |
1593 } | 1600 } |
1594 if (enable_app_list) { | 1601 if (enable_app_list) { |
1595 sources += [ "$root_gen_dir/ui/app_list/resources/app_list_resources_${per cent}_percent.pak" ] | 1602 sources += [ "$root_gen_dir/ui/app_list/resources/app_list_resources_${per cent}_percent.pak" ] |
1596 deps += [ "//ui/app_list/resources" ] | 1603 deps += [ "//ui/app_list/resources" ] |
1597 } | 1604 } |
1598 | 1605 |
1599 output = repack_output_file | 1606 output = repack_output_file |
1607 | |
1608 if (is_android && enable_resource_whitelist_generation) { | |
1609 repack_whitelist = android_resource_whitelist | |
1610 deps += [ "//chrome:resource_whitelist" ] | |
1611 } | |
1600 } | 1612 } |
1601 | 1613 |
1602 copy(copy_name) { | 1614 copy(copy_name) { |
1603 visibility = [ ":*" ] | 1615 visibility = [ ":*" ] |
1604 deps = [ | 1616 deps = [ |
1605 ":$repack_name", | 1617 ":$repack_name", |
1606 ] | 1618 ] |
1607 sources = [ | 1619 sources = [ |
1608 repack_output_file, | 1620 repack_output_file, |
1609 ] | 1621 ] |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1757 "//chrome/common", | 1769 "//chrome/common", |
1758 "//chrome/gpu", | 1770 "//chrome/gpu", |
1759 "//chrome/renderer", | 1771 "//chrome/renderer", |
1760 "//chrome/utility", | 1772 "//chrome/utility", |
1761 "//components/safe_browsing_db:safe_browsing_db_mobile", | 1773 "//components/safe_browsing_db:safe_browsing_db_mobile", |
1762 "//content/public/app:both", | 1774 "//content/public/app:both", |
1763 ] | 1775 ] |
1764 } | 1776 } |
1765 } | 1777 } |
1766 | 1778 |
1779 action("resource_whitelist") { | |
agrieve
2016/07/29 01:55:21
You should guard this target behind: if (is_androi
estevenson
2016/07/29 15:33:57
Done.
| |
1780 deps = [ | |
1781 "//chrome/android:chrome", | |
1782 ] | |
1783 script = "//tools/resources/generate_resource_whitelist.py" | |
1784 | |
1785 _infile = "$root_out_dir/libchrome.cr.so.whitelist" | |
1786 inputs = [ | |
1787 _infile, | |
1788 ] | |
1789 | |
1790 _outfile = android_resource_whitelist | |
1791 outputs = [ | |
1792 _outfile, | |
1793 ] | |
1794 | |
1795 args = [ | |
1796 "-i", | |
1797 rebase_path(_infile, root_build_dir), | |
1798 "-o", | |
1799 rebase_path(_outfile, root_build_dir), | |
1800 "--out-dir=.", | |
1801 ] | |
1802 } | |
1803 | |
1767 if (is_linux) { | 1804 if (is_linux) { |
1768 action("manpage") { | 1805 action("manpage") { |
1769 if (is_chrome_branded) { | 1806 if (is_chrome_branded) { |
1770 name = "Google Chrome" | 1807 name = "Google Chrome" |
1771 filename = "google-chrome" | 1808 filename = "google-chrome" |
1772 confdir = "google-chrome" | 1809 confdir = "google-chrome" |
1773 } else { | 1810 } else { |
1774 name = "Chromium" | 1811 name = "Chromium" |
1775 filename = "chromium-browser" | 1812 filename = "chromium-browser" |
1776 confdir = "chromium" | 1813 confdir = "chromium" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1840 "//chrome/app/theme/$branding_path_component/product_logo_48.png", | 1877 "//chrome/app/theme/$branding_path_component/product_logo_48.png", |
1841 "//chrome/tools/build/linux/chrome-wrapper", | 1878 "//chrome/tools/build/linux/chrome-wrapper", |
1842 "//third_party/xdg-utils/scripts/xdg-mime", | 1879 "//third_party/xdg-utils/scripts/xdg-mime", |
1843 "//third_party/xdg-utils/scripts/xdg-settings", | 1880 "//third_party/xdg-utils/scripts/xdg-settings", |
1844 ] | 1881 ] |
1845 outputs = [ | 1882 outputs = [ |
1846 "$root_out_dir/{{source_file_part}}", | 1883 "$root_out_dir/{{source_file_part}}", |
1847 ] | 1884 ] |
1848 } | 1885 } |
1849 } | 1886 } |
OLD | NEW |