| Index: chrome/BUILD.gn
|
| diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
| index 3109d77ba870fe1c67aa33cdb8785431a5e5b7f4..18fe19c374dc8af5489130d0c0288742dcc909d9 100644
|
| --- a/chrome/BUILD.gn
|
| +++ b/chrome/BUILD.gn
|
| @@ -29,6 +29,12 @@ declare_args() {
|
|
|
| if (is_android) {
|
| import("//build/config/android/rules.gni")
|
| +} else if (is_mac) {
|
| + import("//build/compiled_action.gni")
|
| + import("//build/config/mac/rules.gni")
|
| + import("//build/util/branding.gni")
|
| + import("//build/util/version.gni")
|
| + import("//build_overrides/v8.gni")
|
| }
|
|
|
| if (is_win) {
|
| @@ -58,7 +64,7 @@ if (is_win) {
|
| }
|
| }
|
|
|
| -if (!is_android) {
|
| +if (!is_android && !is_mac) {
|
| group("chrome") {
|
| public_deps = [
|
| ":chrome_initial",
|
| @@ -217,34 +223,27 @@ if (!is_android) {
|
| }
|
| }
|
|
|
| - if (is_mac) {
|
| - sources += [ "app/chrome_exe_main_mac.c" ]
|
| - deps += [ ":chrome_dll" ]
|
| -
|
| - # TODO(GYP) lots more stuff in the is_mac block.
|
| - } else { # Non-Mac.
|
| - # These files are used by the installer so we need a public dep.
|
| - public_deps += [
|
| - ":packed_extra_resources",
|
| - ":packed_resources",
|
| - ]
|
| - deps += [
|
| - "//components/startup_metric_utils/browser:lib",
|
| + # These files are used by the installer so we need a public dep.
|
| + public_deps += [
|
| + ":packed_extra_resources",
|
| + ":packed_resources",
|
| + ]
|
| + deps += [
|
| + "//components/startup_metric_utils/browser:lib",
|
|
|
| - # Precompiled plugins that need to get copied to the output directory.
|
| - # On Mac, internal plugins go inside the framework, so these
|
| - # dependencies are on chrome.dll.
|
| - "//third_party/adobe/flash:flapper_binaries",
|
| - "//third_party/widevine/cdm:widevinecdmadapter",
|
| - ]
|
| - }
|
| + # Precompiled plugins that need to get copied to the output directory.
|
| + # On Mac, internal plugins go inside the framework, so these
|
| + # dependencies are on chrome.dll.
|
| + "//third_party/adobe/flash:flapper_binaries",
|
| + "//third_party/widevine/cdm:widevinecdmadapter",
|
| + ]
|
|
|
| if (is_multi_dll_chrome) {
|
| defines += [ "CHROME_MULTIPLE_DLL" ]
|
| data_deps += [ ":chrome_child" ]
|
| }
|
| }
|
| -} # !is_android
|
| +} # !is_android && !is_mac
|
|
|
| if (is_mac) {
|
| if (is_component_build) {
|
| @@ -259,7 +258,7 @@ if (is_mac) {
|
| # On Mac non-component builds, this is a no-op forwarding target.
|
| group("chrome_dll") {
|
| public_deps = [
|
| - ":main_dll",
|
| + ":chrome_framework",
|
| ]
|
| }
|
| }
|
| @@ -279,9 +278,7 @@ if (is_win) {
|
| data_deps += [ ":chrome_child" ]
|
| }
|
| }
|
| -}
|
|
|
| -if (is_mac || is_win) {
|
| shared_library("main_dll") {
|
| configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
| defines = []
|
| @@ -351,28 +348,6 @@ if (is_mac || is_win) {
|
| ]
|
| }
|
|
|
| - if (is_mac) {
|
| - #['OS=="mac" and component!="shared_library"', { TODO(GYP)
|
| - # 'includes': [ 'chrome_dll_bundle.gypi' ],
|
| - #}],
|
| - # TODO(GYP) Lots of other stuff in the OS=="mac" block.
|
| - sources += [
|
| - "app/chrome_crash_reporter_client.cc",
|
| - "app/chrome_crash_reporter_client.h",
|
| - "app/chrome_crash_reporter_client_mac.mm",
|
| - ]
|
| - deps += [
|
| - "//components/crash/content/app",
|
| - "//components/policy",
|
| - ]
|
| -
|
| - # Define the order of symbols within the framework.
|
| - ldflags += [
|
| - "-Wl,-order_file",
|
| - "-Wl," + rebase_path("app/framework.order", root_build_dir),
|
| - ]
|
| - }
|
| -
|
| if (enable_plugins && enable_pdf && !is_multi_dll_chrome) {
|
| deps += [ "//pdf" ]
|
| }
|
| @@ -448,6 +423,287 @@ if (is_mac || is_win) {
|
| }
|
| }
|
| }
|
| +} else if (is_mac) {
|
| + chrome_helper_name = chrome_product_full_name + " Helper"
|
| + chrome_framework_name = chrome_product_full_name + " Framework"
|
| +
|
| + group("chrome_initial") {
|
| + deps = [
|
| + ":chrome",
|
| + ]
|
| + }
|
| +
|
| + mac_app_bundle("chrome") {
|
| + output_name = chrome_product_full_name
|
| +
|
| + info_plist = "app/app-Info.plist"
|
| +
|
| + sources = [
|
| + "app/chrome_exe_main_mac.c",
|
| + ]
|
| +
|
| + deps = [
|
| + ":chrome_app_strings_bundle_data",
|
| + ":chrome_resources",
|
| + ":chrome_versioned_bundle_data",
|
| + "//chrome/common:version_header",
|
| + ]
|
| + }
|
| +
|
| + compiled_action("chrome_app_strings") {
|
| + tool = "//chrome/tools/mac_helpers:infoplist_strings_tool"
|
| +
|
| + inputs = [
|
| + chrome_version_file,
|
| + ]
|
| +
|
| + outputs = []
|
| +
|
| + foreach(locale, locales) {
|
| + if (is_chrome_branded) {
|
| + _strings_file = "google_chrome_strings"
|
| + } else {
|
| + _strings_file = "chromium_strings"
|
| + }
|
| +
|
| + inputs += [ "$root_gen_dir/chrome/${_strings_file}_${locale}.pak" ]
|
| + }
|
| +
|
| + foreach(locale, locales_as_mac_outputs) {
|
| + outputs += [ "$target_gen_dir/app_infoplist_strings/$locale.lproj/InfoPlist.strings" ]
|
| + }
|
| +
|
| + args =
|
| + [
|
| + "-b",
|
| + "${branding_path_component}_strings",
|
| + "-v",
|
| + rebase_path(chrome_version_file, root_build_dir),
|
| + "-g",
|
| + rebase_path("$root_gen_dir/chrome", root_build_dir),
|
| + "-o",
|
| + rebase_path("$target_gen_dir/app_infoplist_strings", root_build_dir),
|
| + "-t",
|
| + "main",
|
| + ] + locales
|
| +
|
| + if (is_chrome_branded) {
|
| + deps = [
|
| + "//chrome/app:google_chrome_strings",
|
| + ]
|
| + } else {
|
| + deps = [
|
| + "//chrome/app:chromium_strings",
|
| + ]
|
| + }
|
| + }
|
| +
|
| + foreach(locale, locales_as_mac_outputs) {
|
| + bundle_data("chrome_app_strings_${locale}_bundle_data") {
|
| + sources = [
|
| + "$target_gen_dir/app_infoplist_strings/$locale.lproj/InfoPlist.strings",
|
| + ]
|
| + outputs = [
|
| + "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
|
| + ]
|
| + public_deps = [
|
| + ":chrome_app_strings",
|
| + ]
|
| + }
|
| + }
|
| + group("chrome_app_strings_bundle_data") {
|
| + public_deps = []
|
| + foreach(locale, locales_as_mac_outputs) {
|
| + public_deps += [ ":chrome_app_strings_${locale}_bundle_data" ]
|
| + }
|
| + }
|
| +
|
| + bundle_data("chrome_resources") {
|
| + sources = [
|
| + "app/theme/$branding_path_component/mac/app.icns",
|
| + "app/theme/$branding_path_component/mac/document.icns",
|
| + "browser/ui/cocoa/applescript/scripting.sdef",
|
| +
|
| + # TODO(rsesek): mac_bundle_id.manifest
|
| + ]
|
| +
|
| + outputs = [
|
| + "{{bundle_resources_dir}}/{{source_file_part}}",
|
| + ]
|
| +
|
| + deps = [
|
| + ":chrome_app_strings",
|
| + ]
|
| + }
|
| +
|
| + bundle_data("chrome_versioned_bundle_data") {
|
| + sources = [
|
| + "$root_out_dir/$chrome_framework_name.framework",
|
| + "$root_out_dir/$chrome_helper_name.app",
|
| + ]
|
| + outputs = [
|
| + "{{bundle_root_dir}}/Versions/$chrome_version_full/{{source_file_part}}",
|
| + ]
|
| + public_deps = [
|
| + ":chrome_framework",
|
| + ":chrome_helper_app",
|
| + ]
|
| + }
|
| +
|
| + mac_app_bundle("chrome_helper_app") {
|
| + output_name = chrome_helper_name
|
| +
|
| + info_plist = "app/helper-Info.plist"
|
| +
|
| + sources = [
|
| + "app/chrome_exe_main_mac.c",
|
| + ]
|
| +
|
| + defines = [ "HELPER_EXECUTABLE" ]
|
| +
|
| + deps = [
|
| + "//chrome/common:version_header",
|
| + ]
|
| + }
|
| +
|
| + bundle_data("chrome_framework_locales") {
|
| + sources = []
|
| + public_deps = [
|
| + ":repack_locales_pack",
|
| + ]
|
| +
|
| + foreach(locale, locales_as_mac_outputs) {
|
| + sources += [ "$root_gen_dir/repack/locales/$locale.pak" ]
|
| + }
|
| +
|
| + outputs = [
|
| + "{{bundle_resources_dir}}/{{source_name_part}}.lproj/locale.pak",
|
| + ]
|
| + }
|
| +
|
| + bundle_data("chrome_framework_helpers") {
|
| + sources = [
|
| + "$root_out_dir/crashpad_handler",
|
| + ]
|
| +
|
| + outputs = [
|
| + "{{bundle_root_dir}}/Helpers/{{source_file_part}}",
|
| + ]
|
| +
|
| + public_deps = [
|
| + "//third_party/crashpad/crashpad/handler:crashpad_handler",
|
| + ]
|
| + }
|
| +
|
| + bundle_data("chrome_framework_resources") {
|
| + sources = [
|
| + # This image is used to badge the lock icon in the
|
| + # authentication dialogs, such as those used for installation
|
| + # from disk image and Keystone promotion (if so enabled). It
|
| + # needs to exist as a file on disk and not just something in a
|
| + # resource bundle because that's the interface that
|
| + # Authorization Services uses. Also, Authorization Services
|
| + # can't deal with .icns files.
|
| + "$root_gen_dir/repack/resources.pak",
|
| + "$root_out_dir/app_mode_loader.app",
|
| + "$root_out_dir/chrome_100_percent.pak",
|
| + "$root_out_dir/icudtl.dat",
|
| + "app/theme/default_100_percent/$branding_path_component/product_logo_32.png",
|
| +
|
| + # TODO(rsesek): pdfsqueeze the PDFs
|
| + "app/theme/find_next_Template.pdf",
|
| + "app/theme/find_prev_Template.pdf",
|
| + "app/theme/menu_overflow_down.pdf",
|
| + "app/theme/menu_overflow_up.pdf",
|
| + "browser/mac/install.sh",
|
| + ]
|
| +
|
| + outputs = [
|
| + "{{bundle_resources_dir}}/{{source_file_part}}",
|
| + ]
|
| +
|
| + public_deps = [
|
| + ":packed_extra_resources",
|
| + ":packed_resources",
|
| + "//chrome/app_shim:app_mode_loader",
|
| + "//third_party/icu:icudata",
|
| + ]
|
| +
|
| + if (enable_hidpi) {
|
| + sources += [ "$root_out_dir/chrome_200_percent.pak" ]
|
| + }
|
| +
|
| + if (enable_topchrome_md) {
|
| + sources += [ "$root_out_dir/chrome_material_100_percent.pak" ]
|
| +
|
| + if (enable_hidpi) {
|
| + sources += [ "$root_out_dir/chrome_material_200_percent.pak" ]
|
| + }
|
| + }
|
| +
|
| + if (v8_use_external_startup_data) {
|
| + sources += [
|
| + "$root_out_dir/natives_blob.bin",
|
| + "$root_out_dir/snapshot_blob.bin",
|
| + ]
|
| + public_deps += [ "//v8" ]
|
| + }
|
| + }
|
| +
|
| + mac_framework_bundle("chrome_framework") {
|
| + output_name = chrome_framework_name
|
| +
|
| + configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
| +
|
| + sources = [
|
| + "app/chrome_command_ids.h",
|
| + "app/chrome_crash_reporter_client.cc",
|
| + "app/chrome_crash_reporter_client.h",
|
| + "app/chrome_crash_reporter_client_mac.mm",
|
| + "app/chrome_dll_resource.h",
|
| + "app/chrome_main.cc",
|
| + "app/chrome_main_delegate.cc",
|
| + "app/chrome_main_delegate.h",
|
| + "app/chrome_main_mac.h",
|
| + "app/chrome_main_mac.mm",
|
| + ]
|
| +
|
| + info_plist = "app/framework-Info.plist"
|
| +
|
| + deps = [
|
| + ":browser_dependencies",
|
| + ":child_dependencies",
|
| + ":chrome_framework_helpers",
|
| + ":chrome_framework_locales",
|
| + ":chrome_framework_resources",
|
| + "//build/config/sanitizers:deps",
|
| + "//chrome/app/nibs:chrome_xibs",
|
| + "//chrome/common:features",
|
| + "//components/crash/content/app",
|
| + "//components/policy",
|
| + "//content/public/app:both",
|
| + "//third_party/cld_2",
|
| + ]
|
| +
|
| + ldflags = [
|
| + "-Wl,-order_file",
|
| + "-Wl," + rebase_path("app/framework.order", root_build_dir),
|
| + "-install_name",
|
| + "@executable_path/../Versions/$chrome_version_full/$chrome_framework_name.framework/$chrome_framework_name",
|
| + "-compatibility_version",
|
| + chrome_dylib_version,
|
| + "-current_version",
|
| + chrome_dylib_version,
|
| + ]
|
| +
|
| + if (enable_plugins && enable_pdf) {
|
| + deps += [ "//pdf" ]
|
| + }
|
| +
|
| + if (enable_package_mash_services) {
|
| + deps += [ "//chrome/app/mash" ]
|
| + }
|
| + }
|
| }
|
|
|
| # GYP version: chromium_browser_dependencies variable in chrome.gyp
|
|
|