OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 'variables': { | 5 'variables': { |
6 'chromium_code': 1, | 6 'chromium_code': 1, |
7 | 7 |
8 'variables': { | 8 'variables': { |
9 'version_py_path': 'tools/build/version.py', | 9 'version_py_path': 'tools/build/version.py', |
10 'version_path': 'VERSION', | 10 'version_path': 'VERSION', |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 'conditions': [ | 933 'conditions': [ |
934 ['OS=="mac"', | 934 ['OS=="mac"', |
935 { 'targets': [ | 935 { 'targets': [ |
936 { | 936 { |
937 'target_name': 'helper_app', | 937 'target_name': 'helper_app', |
938 'type': 'executable', | 938 'type': 'executable', |
939 'product_name': '<(mac_product_name) Helper', | 939 'product_name': '<(mac_product_name) Helper', |
940 'mac_bundle': 1, | 940 'mac_bundle': 1, |
941 'dependencies': [ | 941 'dependencies': [ |
942 'chrome_dll', | 942 'chrome_dll', |
943 'interpose_dependency_shim', | |
944 'infoplist_strings_tool', | 943 'infoplist_strings_tool', |
945 ], | 944 ], |
946 'sources': [ | 945 'sources': [ |
947 # chrome_exe_main_mac.mm's main() is the entry point for | 946 # chrome_exe_main_mac.mm's main() is the entry point for |
948 # the "chrome" (browser app) target. All it does is jump | 947 # the "chrome" (browser app) target. All it does is jump |
949 # to chrome_dll's ChromeMain. This is appropriate for | 948 # to chrome_dll's ChromeMain. This is appropriate for |
950 # helper processes too, because the logic to discriminate | 949 # helper processes too, because the logic to discriminate |
951 # between process types at run time is actually directed | 950 # between process types at run time is actually directed |
952 # by the --type command line argument processed by | 951 # by the --type command line argument processed by |
953 # ChromeMain. Sharing chrome_exe_main_mac.mm with the | 952 # ChromeMain. Sharing chrome_exe_main_mac.mm with the |
(...skipping 11 matching lines...) Expand all Loading... |
965 # resources directory will be a symbolic link to the browser app's | 964 # resources directory will be a symbolic link to the browser app's |
966 # resources directory. | 965 # resources directory. |
967 'mac_bundle_resources/': [ | 966 'mac_bundle_resources/': [ |
968 ['exclude', '.*'], | 967 ['exclude', '.*'], |
969 ], | 968 ], |
970 'xcode_settings': { | 969 'xcode_settings': { |
971 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)', | 970 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)', |
972 'CHROMIUM_SHORT_NAME': '<(branding)', | 971 'CHROMIUM_SHORT_NAME': '<(branding)', |
973 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves', | 972 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves', |
974 'INFOPLIST_FILE': 'app/helper-Info.plist', | 973 'INFOPLIST_FILE': 'app/helper-Info.plist', |
975 # Stop the helper executable from being position-independent | |
976 # since that turns on ASLR, which breaks NaCl. ASLR breaks | |
977 # NaCl's ability to reliably allocate 1GB of address space for | |
978 # untrusted code to run in. | |
979 # See http://code.google.com/p/nativeclient/issues/detail?id=2043 | |
980 # TODO(mseaborn): Create a separate helper executable for NaCl | |
981 # so that the renderer process can still use ASLR. | |
982 'OTHER_LDFLAGS!': ['-Wl,-pie'], | |
983 }, | 974 }, |
984 'copies': [ | 975 'postbuilds': [ |
985 { | 976 { |
986 'destination': '<(PRODUCT_DIR)/<(mac_product_name) Helper.app/Cont
ents/MacOS', | 977 # The helper doesn't have real localizations, it just has |
987 'files': [ | 978 # empty .lproj directories, which is enough to convince Cocoa |
988 '<(PRODUCT_DIR)/libplugin_carbon_interpose.dylib', | 979 # that anything running out of the helper .app supports those |
| 980 # languages. |
| 981 'postbuild_name': 'Make Empty Localizations', |
| 982 'variables': { |
| 983 'locale_dirs': [ |
| 984 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))', |
| 985 ], |
| 986 }, |
| 987 'action': [ |
| 988 'tools/build/mac/make_locale_dirs.sh', |
| 989 '<@(locale_dirs)', |
989 ], | 990 ], |
990 }, | 991 }, |
991 ], | |
992 'actions': [ | |
993 { | |
994 # Generate the InfoPlist.strings file | |
995 'action_name': 'Generate InfoPlist.strings files', | |
996 'variables': { | |
997 'tool_path': '<(PRODUCT_DIR)/infoplist_strings_tool', | |
998 # Unique dir to write to so the [lang].lproj/InfoPlist.strings | |
999 # for the main app and the helper app don't name collide. | |
1000 'output_path': '<(INTERMEDIATE_DIR)/helper_infoplist_strings', | |
1001 }, | |
1002 'conditions': [ | |
1003 [ 'branding == "Chrome"', { | |
1004 'variables': { | |
1005 'branding_name': 'google_chrome_strings', | |
1006 }, | |
1007 }, { # else branding!="Chrome" | |
1008 'variables': { | |
1009 'branding_name': 'chromium_strings', | |
1010 }, | |
1011 }], | |
1012 ], | |
1013 'inputs': [ | |
1014 '<(tool_path)', | |
1015 '<(version_path)', | |
1016 # TODO: remove this helper when we have loops in GYP | |
1017 '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(branding_name)_ZZL
OCALE.pak\' <(locales))', | |
1018 ], | |
1019 'outputs': [ | |
1020 # TODO: remove this helper when we have loops in GYP | |
1021 '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/Inf
oPlist.strings\' <(locales))', | |
1022 ], | |
1023 'action': [ | |
1024 '<(tool_path)', | |
1025 '-b', '<(branding_name)', | |
1026 '-v', '<(version_path)', | |
1027 '-g', '<(grit_out_dir)', | |
1028 '-o', '<(output_path)', | |
1029 '-t', 'helper', | |
1030 '<@(locales)', | |
1031 ], | |
1032 'message': 'Generating the language InfoPlist.strings files', | |
1033 'process_outputs_as_mac_bundle_resources': 1, | |
1034 }, | |
1035 ], | |
1036 'postbuilds': [ | |
1037 { | 992 { |
1038 # The framework (chrome_dll) defines its load-time path | 993 # The framework (chrome_dll) defines its load-time path |
1039 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable | 994 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable |
1040 # (chrome). A different relative path needs to be used in | 995 # (chrome). A different relative path needs to be used in |
1041 # helper_app. | 996 # helper_app. |
1042 'postbuild_name': 'Fix Framework Link', | 997 'postbuild_name': 'Fix Framework Link', |
1043 'action': [ | 998 'action': [ |
1044 'install_name_tool', | 999 'install_name_tool', |
1045 '-change', | 1000 '-change', |
1046 '@executable_path/../Versions/<(version_full)/<(mac_product_name
) Framework.framework/<(mac_product_name) Framework', | 1001 '@executable_path/../Versions/<(version_full)/<(mac_product_name
) Framework.framework/<(mac_product_name) Framework', |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 '..', | 1118 '..', |
1164 ], | 1119 ], |
1165 'link_settings': { | 1120 'link_settings': { |
1166 'libraries': [ | 1121 'libraries': [ |
1167 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', | 1122 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', |
1168 ], | 1123 ], |
1169 }, | 1124 }, |
1170 'xcode_settings': { | 1125 'xcode_settings': { |
1171 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)', | 1126 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)', |
1172 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)', | 1127 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)', |
1173 'DYLIB_INSTALL_NAME_BASE': '@executable_path', | 1128 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', |
1174 }, | 1129 }, |
1175 'postbuilds': [ | 1130 'postbuilds': [ |
1176 { | 1131 { |
1177 # The framework (chrome_dll) defines its load-time path | 1132 # The framework (chrome_dll) defines its load-time path |
1178 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable | 1133 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable |
1179 # (chrome). A different relative path needs to be used in | 1134 # (chrome). A different relative path needs to be used in |
1180 # plugin_carbon_interpose, which runs in the helper_app. | 1135 # plugin_carbon_interpose, which runs in the helper_app. |
1181 'postbuild_name': 'Fix Framework Link', | 1136 'postbuild_name': 'Fix Framework Link', |
1182 'action': [ | 1137 'action': [ |
1183 'install_name_tool', | 1138 'install_name_tool', |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1759 'destination': '<(PRODUCT_DIR)', | 1714 'destination': '<(PRODUCT_DIR)', |
1760 'files': [ | 1715 'files': [ |
1761 '<(INTERMEDIATE_DIR)/repack/chrome.pak' | 1716 '<(INTERMEDIATE_DIR)/repack/chrome.pak' |
1762 ], | 1717 ], |
1763 }, | 1718 }, |
1764 ], | 1719 ], |
1765 }], # targets | 1720 }], # targets |
1766 }], # OS != "mac" | 1721 }], # OS != "mac" |
1767 ], # 'conditions' | 1722 ], # 'conditions' |
1768 } | 1723 } |
OLD | NEW |