2018-09-06 00:00:37 +03:00
import("//build/config/locales.gni")
2018-10-24 13:49:10 +03:00
import("//build/config/ui.gni")
2018-09-06 00:00:37 +03:00
import("//build/config/win/manifest.gni")
2023-03-20 14:06:57 +03:00
import("//components/os_crypt/sync/features.gni")
2019-10-31 23:11:51 +03:00
import("//components/spellcheck/spellcheck_build_features.gni")
2019-07-03 04:22:09 +03:00
import("//content/public/app/mac_helpers.gni")
2020-04-29 09:16:10 +03:00
import("//extensions/buildflags/buildflags.gni")
2018-09-06 00:00:37 +03:00
import("//pdf/features.gni")
2019-11-04 20:50:31 +03:00
import("//ppapi/buildflags/buildflags.gni")
2019-04-02 04:25:19 +03:00
import("//printing/buildflags/buildflags.gni")
2019-10-03 23:21:30 +03:00
import("//testing/test.gni")
2024-11-08 06:20:50 +03:00
import("//third_party/electron_node/electron_node.gni")
2018-07-31 01:46:04 +03:00
import("//third_party/ffmpeg/ffmpeg_options.gni")
2018-11-10 22:21:40 +03:00
import("//tools/generate_library_loader/generate_library_loader.gni")
2018-10-04 21:08:56 +03:00
import("//tools/grit/grit_rule.gni")
2018-09-06 00:00:37 +03:00
import("//tools/grit/repack.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
2019-05-22 21:45:48 +03:00
import("//v8/gni/snapshot_toolchain.gni")
2019-01-10 13:40:27 +03:00
import("build/asar.gni")
2019-07-05 20:38:30 +03:00
import("build/extract_symbols.gni")
2019-01-10 13:40:27 +03:00
import("build/npm.gni")
2019-06-20 00:31:55 +03:00
import("build/templated_file.gni")
2019-02-06 21:27:20 +03:00
import("build/tsc.gni")
2019-06-02 23:03:03 +03:00
import("build/webpack/webpack.gni")
2021-01-20 22:21:53 +03:00
import("buildflags/buildflags.gni")
2019-01-10 13:40:27 +03:00
import("electron_paks.gni")
2019-02-06 21:27:20 +03:00
import("filenames.auto.gni")
2019-01-10 13:40:27 +03:00
import("filenames.gni")
2019-10-31 23:11:51 +03:00
import("filenames.hunspell.gni")
2021-05-22 21:48:38 +03:00
import("filenames.libcxx.gni")
import("filenames.libcxxabi.gni")
2023-11-30 17:51:35 +03:00
import("js2c_toolchain.gni")
2018-05-04 01:44:29 +03:00
if (is_mac) {
import("//build/config/mac/rules.gni")
import("//third_party/icu/config.gni")
import("//v8/gni/v8.gni")
2019-10-22 00:11:09 +03:00
import("build/rules.gni")
2021-04-08 10:28:02 +03:00
assert(
2024-08-02 17:02:11 +03:00
mac_deployment_target == "11.0",
2021-04-08 10:28:02 +03:00
"Chromium has updated the mac_deployment_target, please update this assert, update the supported versions documentation (docs/tutorial/support.md) and flag this as a breaking change")
2018-05-04 01:44:29 +03:00
}
2018-05-16 22:51:11 +03:00
if (is_linux) {
import("//build/config/linux/pkg_config.gni")
2022-04-18 07:24:32 +03:00
import("//tools/generate_stubs/rules.gni")
2018-05-16 22:51:11 +03:00
pkg_config("gio_unix") {
packages = [ "gio-unix-2.0" ]
}
2018-11-10 22:21:40 +03:00
pkg_config("libnotify_config") {
packages = [
"glib-2.0",
"gdk-pixbuf-2.0",
]
}
2022-04-18 07:24:32 +03:00
generate_library_loader("libnotify_loader") {
name = "LibNotifyLoader"
output_h = "libnotify_loader.h"
output_cc = "libnotify_loader.cc"
header = "<libnotify/notify.h>"
config = ":libnotify_config"
functions = [
"notify_is_initted",
"notify_init",
"notify_get_server_caps",
"notify_get_server_info",
"notify_notification_new",
"notify_notification_add_action",
"notify_notification_set_image_from_pixbuf",
"notify_notification_set_timeout",
"notify_notification_set_urgency",
2024-09-25 14:20:36 +03:00
"notify_notification_set_hint",
2022-04-18 07:24:32 +03:00
"notify_notification_show",
"notify_notification_close",
]
}
2024-05-09 16:51:42 +03:00
# Generates headers which contain stubs for extracting function ptrs
# from the gtk library. Function signatures for which stubs are
# required should be declared in the sig files.
2022-04-18 07:24:32 +03:00
generate_stubs("electron_gtk_stubs") {
2024-05-09 16:51:42 +03:00
sigs = [ "shell/browser/ui/electron_gdk_pixbuf.sigs" ]
2022-04-18 07:24:32 +03:00
extra_header = "shell/browser/ui/electron_gtk.fragment"
output_name = "electron_gtk_stubs"
public_deps = [ "//ui/gtk:gtk_config" ]
logging_function = "LogNoop()"
logging_include = "ui/gtk/log_noop.h"
}
2018-05-16 22:51:11 +03:00
}
2019-06-19 23:46:59 +03:00
branding = read_file("shell/app/BRANDING.json", "json")
2018-09-27 21:53:08 +03:00
electron_project_name = branding.project_name
electron_product_name = branding.product_name
electron_mac_bundle_id = branding.mac_bundle_id
2023-09-27 08:49:10 +03:00
if (override_electron_version != "") {
electron_version = override_electron_version
} else {
# When building from source code tarball there is no git tag available and
# builders must explicitly pass override_electron_version in gn args.
# This read_file call will assert if there is no git information, without it
# gn will generate a malformed build configuration and ninja will get into
# infinite loop.
read_file(".git/packed-refs", "string")
# Set electron version from git tag.
electron_version = exec_script("script/get-git-version.py",
[],
"trim string",
[
".git/packed-refs",
".git/HEAD",
])
}
2018-05-04 01:44:29 +03:00
2018-06-29 01:43:21 +03:00
if (is_mas_build) {
2018-07-31 01:55:41 +03:00
assert(is_mac,
"It doesn't make sense to build a MAS build on a non-mac platform")
2018-05-04 01:44:29 +03:00
}
2020-04-29 09:16:10 +03:00
if (enable_pdf_viewer) {
assert(enable_pdf, "PDF viewer support requires enable_pdf=true")
assert(enable_electron_extensions,
"PDF viewer support requires enable_electron_extensions=true")
}
if (enable_electron_extensions) {
assert(enable_extensions,
"Chrome extension support requires enable_extensions=true")
}
2018-05-04 01:44:29 +03:00
config("branding") {
defines = [
2019-06-17 23:37:55 +03:00
"ELECTRON_PRODUCT_NAME=\"$electron_product_name\"",
"ELECTRON_PROJECT_NAME=\"$electron_project_name\"",
2018-05-04 01:44:29 +03:00
]
}
2019-10-03 23:21:30 +03:00
config("electron_lib_config") {
include_dirs = [ "." ]
}
2022-06-16 10:46:11 +03:00
# We generate the definitions twice here, once in //electron/electron.d.ts
2019-02-06 21:27:20 +03:00
# and once in $target_gen_dir
# The one in $target_gen_dir is used for the actual TSC build later one
# and the one in //electron/electron.d.ts is used by your IDE (vscode)
# for typescript prompting
npm_action("build_electron_definitions") {
script = "gn-typescript-definitions"
args = [ rebase_path("$target_gen_dir/tsc/typings/electron.d.ts") ]
2019-04-30 23:59:47 +03:00
inputs = auto_filenames.api_docs + [ "yarn.lock" ]
2019-02-06 21:27:20 +03:00
2020-01-17 21:41:52 +03:00
outputs = [ "$target_gen_dir/tsc/typings/electron.d.ts" ]
2019-02-06 21:27:20 +03:00
}
2019-06-02 23:03:03 +03:00
webpack_build("electron_browser_bundle") {
2020-01-17 21:41:52 +03:00
deps = [ ":build_electron_definitions" ]
2018-05-04 01:44:29 +03:00
2019-06-02 23:03:03 +03:00
inputs = auto_filenames.browser_bundle_deps
2019-01-12 04:00:43 +03:00
2019-06-02 23:03:03 +03:00
config_file = "//electron/build/webpack/webpack.config.browser.js"
2019-06-04 03:03:59 +03:00
out_file = "$target_gen_dir/js2c/browser_init.js"
2018-05-04 01:44:29 +03:00
}
2019-06-02 23:03:03 +03:00
webpack_build("electron_renderer_bundle") {
2020-01-17 21:41:52 +03:00
deps = [ ":build_electron_definitions" ]
2018-05-04 01:44:29 +03:00
2019-06-02 23:03:03 +03:00
inputs = auto_filenames.renderer_bundle_deps
2018-05-04 01:44:29 +03:00
2019-06-02 23:03:03 +03:00
config_file = "//electron/build/webpack/webpack.config.renderer.js"
2019-06-04 03:03:59 +03:00
out_file = "$target_gen_dir/js2c/renderer_init.js"
2018-05-04 01:44:29 +03:00
}
2019-06-02 23:03:03 +03:00
webpack_build("electron_worker_bundle") {
2020-01-17 21:41:52 +03:00
deps = [ ":build_electron_definitions" ]
2019-03-12 02:27:57 +03:00
2019-06-02 23:03:03 +03:00
inputs = auto_filenames.worker_bundle_deps
2019-03-12 02:27:57 +03:00
2019-06-02 23:03:03 +03:00
config_file = "//electron/build/webpack/webpack.config.worker.js"
2019-06-04 03:03:59 +03:00
out_file = "$target_gen_dir/js2c/worker_init.js"
2019-03-12 02:27:57 +03:00
}
2019-06-02 23:03:03 +03:00
webpack_build("electron_sandboxed_renderer_bundle") {
2020-01-17 21:41:52 +03:00
deps = [ ":build_electron_definitions" ]
2019-04-16 20:57:02 +03:00
2019-06-02 23:03:03 +03:00
inputs = auto_filenames.sandbox_bundle_deps
2019-04-16 20:57:02 +03:00
2019-06-02 23:03:03 +03:00
config_file = "//electron/build/webpack/webpack.config.sandboxed_renderer.js"
out_file = "$target_gen_dir/js2c/sandbox_bundle.js"
2019-04-16 20:57:02 +03:00
}
2019-06-02 23:03:03 +03:00
webpack_build("electron_isolated_renderer_bundle") {
2020-01-17 21:41:52 +03:00
deps = [ ":build_electron_definitions" ]
2019-04-16 20:57:02 +03:00
2019-06-02 23:03:03 +03:00
inputs = auto_filenames.isolated_bundle_deps
2019-04-16 20:57:02 +03:00
2019-06-02 23:03:03 +03:00
config_file = "//electron/build/webpack/webpack.config.isolated_renderer.js"
out_file = "$target_gen_dir/js2c/isolated_bundle.js"
2019-04-16 20:57:02 +03:00
}
2024-01-24 18:54:32 +03:00
webpack_build("electron_node_bundle") {
deps = [ ":build_electron_definitions" ]
inputs = auto_filenames.node_bundle_deps
config_file = "//electron/build/webpack/webpack.config.node.js"
out_file = "$target_gen_dir/js2c/node_init.js"
}
2022-10-20 08:49:49 +03:00
webpack_build("electron_utility_bundle") {
deps = [ ":build_electron_definitions" ]
inputs = auto_filenames.utility_bundle_deps
config_file = "//electron/build/webpack/webpack.config.utility.js"
out_file = "$target_gen_dir/js2c/utility_init.js"
}
2024-10-29 02:09:04 +03:00
webpack_build("electron_preload_realm_bundle") {
deps = [ ":build_electron_definitions" ]
inputs = auto_filenames.preload_realm_bundle_deps
config_file = "//electron/build/webpack/webpack.config.preload_realm.js"
out_file = "$target_gen_dir/js2c/preload_realm_bundle.js"
}
2018-05-04 01:44:29 +03:00
action("electron_js2c") {
deps = [
2019-06-04 03:03:59 +03:00
":electron_browser_bundle",
2019-06-02 23:03:03 +03:00
":electron_isolated_renderer_bundle",
2024-01-24 18:54:32 +03:00
":electron_node_bundle",
2024-10-29 02:09:04 +03:00
":electron_preload_realm_bundle",
2019-06-04 03:03:59 +03:00
":electron_renderer_bundle",
2019-06-02 23:03:03 +03:00
":electron_sandboxed_renderer_bundle",
2022-10-20 08:49:49 +03:00
":electron_utility_bundle",
2019-06-04 03:03:59 +03:00
":electron_worker_bundle",
2023-11-30 17:51:35 +03:00
"//third_party/electron_node:node_js2c($electron_js2c_toolchain)",
2018-05-04 01:44:29 +03:00
]
2020-07-16 21:38:31 +03:00
sources = [
2019-06-04 03:03:59 +03:00
"$target_gen_dir/js2c/browser_init.js",
2018-05-04 01:44:29 +03:00
"$target_gen_dir/js2c/isolated_bundle.js",
2024-01-24 18:54:32 +03:00
"$target_gen_dir/js2c/node_init.js",
2024-10-29 02:09:04 +03:00
"$target_gen_dir/js2c/preload_realm_bundle.js",
2020-01-17 21:41:52 +03:00
"$target_gen_dir/js2c/renderer_init.js",
2019-04-18 00:18:03 +03:00
"$target_gen_dir/js2c/sandbox_bundle.js",
2022-10-20 08:49:49 +03:00
"$target_gen_dir/js2c/utility_init.js",
2020-01-17 21:41:52 +03:00
"$target_gen_dir/js2c/worker_init.js",
2018-05-04 01:44:29 +03:00
]
2023-11-30 17:51:35 +03:00
inputs = sources
2020-01-17 21:41:52 +03:00
outputs = [ "$root_gen_dir/electron_natives.cc" ]
2018-05-04 01:44:29 +03:00
2020-08-08 00:13:09 +03:00
script = "build/js2c.py"
2023-11-30 17:51:35 +03:00
out_dir =
get_label_info(":anything($electron_js2c_toolchain)", "root_out_dir")
args = [
rebase_path("$out_dir/node_js2c"),
rebase_path("$root_gen_dir"),
] + rebase_path(outputs, root_gen_dir) +
rebase_path(sources, root_gen_dir)
2018-05-04 01:44:29 +03:00
}
2021-10-14 17:07:36 +03:00
action("generate_config_gypi") {
outputs = [ "$root_gen_dir/config.gypi" ]
script = "script/generate-config-gypi.py"
2022-08-01 17:52:26 +03:00
inputs = [ "//third_party/electron_node/configure.py" ]
2021-10-14 17:07:36 +03:00
args = rebase_path(outputs) + [ target_cpu ]
}
2019-02-05 23:10:15 +03:00
target_gen_default_app_js = "$target_gen_dir/js/default_app"
2019-02-06 21:27:20 +03:00
typescript_build("default_app_js") {
2020-01-17 21:41:52 +03:00
deps = [ ":build_electron_definitions" ]
2019-02-06 21:27:20 +03:00
sources = filenames.default_app_ts_sources
output_gen_dir = target_gen_default_app_js
output_dir_name = "default_app"
tsconfig = "tsconfig.default_app.json"
}
copy("default_app_static") {
sources = filenames.default_app_static_sources
2020-01-17 21:41:52 +03:00
outputs = [ "$target_gen_default_app_js/{{source}}" ]
2019-02-05 23:10:15 +03:00
}
copy("default_app_octicon_deps") {
sources = filenames.default_app_octicon_sources
2020-01-17 21:41:52 +03:00
outputs = [ "$target_gen_default_app_js/electron/default_app/octicon/{{source_file_part}}" ]
2019-02-05 23:10:15 +03:00
}
asar("default_app_asar") {
deps = [
":default_app_js",
":default_app_octicon_deps",
2019-02-06 21:27:20 +03:00
":default_app_static",
2019-02-05 23:10:15 +03:00
]
root = "$target_gen_default_app_js/electron/default_app"
sources = get_target_outputs(":default_app_js") +
2019-02-06 21:27:20 +03:00
get_target_outputs(":default_app_static") +
2019-02-05 23:10:15 +03:00
get_target_outputs(":default_app_octicon_deps")
2020-01-17 21:41:52 +03:00
outputs = [ "$root_out_dir/resources/default_app.asar" ]
2018-05-04 01:44:29 +03:00
}
2018-10-04 21:08:56 +03:00
grit("resources") {
source = "electron_resources.grd"
outputs = [
"grit/electron_resources.h",
"electron_resources.pak",
]
2019-01-12 04:00:43 +03:00
# Mojo manifest overlays are generated.
2018-10-04 21:08:56 +03:00
grit_flags = [
"-E",
"target_gen_dir=" + rebase_path(target_gen_dir, root_build_dir),
]
2020-01-17 21:41:52 +03:00
deps = [ ":copy_shell_devtools_discovery_page" ]
2018-10-04 21:08:56 +03:00
output_dir = "$target_gen_dir"
}
2019-01-12 04:00:43 +03:00
copy("copy_shell_devtools_discovery_page") {
2020-01-17 21:41:52 +03:00
sources = [ "//content/shell/resources/shell_devtools_discovery_page.html" ]
outputs = [ "$target_gen_dir/shell_devtools_discovery_page.html" ]
2019-01-12 04:00:43 +03:00
}
2019-06-20 00:31:55 +03:00
npm_action("electron_version_args") {
script = "generate-version-json"
2020-01-17 21:41:52 +03:00
outputs = [ "$target_gen_dir/electron_version.args" ]
2019-06-20 00:31:55 +03:00
2022-10-25 09:44:43 +03:00
args = rebase_path(outputs) + [ "$electron_version" ]
2019-06-20 00:31:55 +03:00
2022-10-25 09:44:43 +03:00
inputs = [ "script/generate-version-json.js" ]
2019-06-20 00:31:55 +03:00
}
templated_file("electron_version_header") {
2020-01-17 21:41:52 +03:00
deps = [ ":electron_version_args" ]
2019-06-20 00:31:55 +03:00
template = "build/templates/electron_version.tmpl"
output = "$target_gen_dir/electron_version.h"
args_files = get_target_outputs(":electron_version_args")
}
2022-10-25 09:44:43 +03:00
templated_file("electron_win_rc") {
deps = [ ":electron_version_args" ]
template = "build/templates/electron_rc.tmpl"
output = "$target_gen_dir/win-resources/electron.rc"
args_files = get_target_outputs(":electron_version_args")
}
copy("electron_win_resource_files") {
sources = [
"shell/browser/resources/win/electron.ico",
"shell/browser/resources/win/resource.h",
]
outputs = [ "$target_gen_dir/win-resources/{{source_file_part}}" ]
}
templated_file("electron_version_file") {
deps = [ ":electron_version_args" ]
template = "build/templates/version_string.tmpl"
output = "$root_build_dir/version"
args_files = get_target_outputs(":electron_version_args")
}
group("electron_win32_resources") {
public_deps = [
":electron_win_rc",
":electron_win_resource_files",
]
}
2020-10-27 20:49:25 +03:00
action("electron_fuses") {
script = "build/fuses/build.py"
2021-05-26 22:16:55 +03:00
inputs = [ "build/fuses/fuses.json5" ]
2020-10-27 20:49:25 +03:00
outputs = [
"$target_gen_dir/fuses.h",
"$target_gen_dir/fuses.cc",
]
args = rebase_path(outputs)
}
2021-08-18 23:34:15 +03:00
action("electron_generate_node_defines") {
script = "build/generate_node_defines.py"
inputs = [
"//third_party/electron_node/src/tracing/trace_event_common.h",
"//third_party/electron_node/src/tracing/trace_event.h",
"//third_party/electron_node/src/util.h",
]
outputs = [
"$target_gen_dir/push_and_undef_node_defines.h",
"$target_gen_dir/pop_node_defines.h",
]
args = [ rebase_path(target_gen_dir) ] + rebase_path(inputs)
}
2019-07-23 19:57:40 +03:00
source_set("electron_lib") {
2024-01-19 00:16:45 +03:00
configs += [
"//v8:external_startup_data",
2024-11-08 06:20:50 +03:00
"//third_party/electron_node:node_internals",
2024-01-19 00:16:45 +03:00
]
2018-07-20 02:30:23 +03:00
2019-10-03 23:21:30 +03:00
public_configs = [
":branding",
":electron_lib_config",
]
2018-07-20 02:30:23 +03:00
2018-05-04 01:44:29 +03:00
deps = [
2020-10-27 20:49:25 +03:00
":electron_fuses",
2021-08-18 23:34:15 +03:00
":electron_generate_node_defines",
2018-07-20 02:30:23 +03:00
":electron_js2c",
2019-06-20 00:31:55 +03:00
":electron_version_header",
2019-03-05 08:08:55 +03:00
":resources",
2018-10-01 23:00:53 +03:00
"buildflags",
2018-09-12 16:45:08 +03:00
"chromium_src:chrome",
2019-12-01 01:17:46 +03:00
"chromium_src:chrome_spellchecker",
2024-08-12 11:28:33 +03:00
"shell/common:mojo",
"shell/common:plugin",
2022-10-20 08:49:49 +03:00
"shell/services/node/public/mojom",
2018-10-24 13:49:10 +03:00
"//base:base_static",
2019-03-05 08:08:55 +03:00
"//base/allocator:buildflags",
2022-04-06 19:34:35 +03:00
"//chrome:strings",
2020-06-03 03:00:20 +03:00
"//chrome/app:command_ids",
2018-11-08 17:51:51 +03:00
"//chrome/app/resources:platform_locale_settings",
2021-10-06 05:21:00 +03:00
"//components/autofill/core/common:features",
2018-10-04 21:08:56 +03:00
"//components/certificate_transparency",
2023-10-24 18:24:20 +03:00
"//components/compose:buildflags",
2022-06-13 19:35:42 +03:00
"//components/embedder_support:browser_util",
2024-06-08 00:18:35 +03:00
"//components/input:input",
2019-10-31 23:11:51 +03:00
"//components/language/core/browser",
2018-10-04 21:08:56 +03:00
"//components/net_log",
2019-11-06 02:41:20 +03:00
"//components/network_hints/browser",
"//components/network_hints/common:mojo_bindings",
2019-08-26 19:47:32 +03:00
"//components/network_hints/renderer",
2018-05-04 01:44:29 +03:00
"//components/network_session_configurator/common",
2022-02-25 21:17:35 +03:00
"//components/omnibox/browser:buildflags",
2023-10-24 18:24:20 +03:00
"//components/os_crypt/async/browser",
"//components/os_crypt/async/browser:key_provider_interface",
2023-03-20 14:06:57 +03:00
"//components/os_crypt/sync",
2020-04-29 09:16:10 +03:00
"//components/pref_registry",
2018-05-04 01:44:29 +03:00
"//components/prefs",
2021-05-18 20:08:53 +03:00
"//components/security_state/content",
2020-05-07 23:31:26 +03:00
"//components/upload_list",
2020-04-29 09:16:10 +03:00
"//components/user_prefs",
2018-11-08 19:58:54 +03:00
"//components/viz/host",
2018-06-20 22:50:43 +03:00
"//components/viz/service",
2022-07-20 11:09:14 +03:00
"//components/webrtc",
2018-10-24 13:49:10 +03:00
"//content/public/browser",
2018-07-11 21:32:17 +03:00
"//content/public/child",
2019-04-30 19:45:48 +03:00
"//content/public/gpu",
2019-03-05 08:08:55 +03:00
"//content/public/renderer",
"//content/public/utility",
"//device/bluetooth",
2019-07-25 01:58:51 +03:00
"//device/bluetooth/public/cpp",
2018-05-04 01:44:29 +03:00
"//gin",
2018-11-08 19:58:54 +03:00
"//media/capture/mojom:video_capture",
2019-08-15 23:50:58 +03:00
"//media/mojo/mojom",
2024-06-08 00:18:35 +03:00
"//media/mojo/mojom:web_speech_recognition",
2018-10-24 13:49:10 +03:00
"//net:extras",
2018-05-04 01:44:29 +03:00
"//net:net_resources",
2019-03-05 08:08:55 +03:00
"//printing/buildflags",
2024-03-28 20:23:13 +03:00
"//services/device/public/cpp/bluetooth:bluetooth",
2019-03-08 01:48:22 +03:00
"//services/device/public/cpp/geolocation",
2021-09-23 14:00:11 +03:00
"//services/device/public/cpp/hid",
2018-10-24 08:12:58 +03:00
"//services/device/public/mojom",
2018-10-04 21:08:56 +03:00
"//services/proxy_resolver:lib",
2019-02-06 22:03:39 +03:00
"//services/video_capture/public/mojom:constants",
2019-08-03 02:56:46 +03:00
"//services/viz/privileged/mojom/compositing",
2023-06-13 21:48:53 +03:00
"//services/viz/public/mojom",
2018-05-04 01:44:29 +03:00
"//skia",
2018-07-20 19:08:18 +03:00
"//third_party/blink/public:blink",
2020-08-11 02:54:05 +03:00
"//third_party/blink/public:blink_devtools_inspector_resources",
2021-06-17 01:43:51 +03:00
"//third_party/blink/public/platform/media",
2018-05-04 01:44:29 +03:00
"//third_party/boringssl",
2024-11-08 06:20:50 +03:00
"//third_party/electron_node:node_lib",
2020-05-09 02:13:32 +03:00
"//third_party/inspector_protocol:crdtp",
2018-05-04 01:44:29 +03:00
"//third_party/leveldatabase",
"//third_party/libyuv",
2019-12-11 03:22:35 +03:00
"//third_party/webrtc_overrides:webrtc_component",
2018-09-06 00:00:37 +03:00
"//third_party/widevine/cdm:headers",
2020-10-28 03:05:28 +03:00
"//third_party/zlib/google:zip",
2024-01-03 11:52:49 +03:00
"//ui/base:ozone_buildflags",
2019-03-22 04:07:21 +03:00
"//ui/base/idle",
2023-06-13 21:48:53 +03:00
"//ui/compositor",
2018-05-04 01:44:29 +03:00
"//ui/events:dom_keycode_converter",
2018-06-20 22:50:43 +03:00
"//ui/gl",
2019-03-05 08:08:55 +03:00
"//ui/native_theme",
"//ui/shell_dialogs",
2018-05-04 01:44:29 +03:00
"//ui/views",
2024-03-04 20:32:40 +03:00
"//ui/views/controls/webview",
2018-05-04 01:44:29 +03:00
"//v8",
2019-03-05 08:08:55 +03:00
"//v8:v8_libplatform",
]
public_deps = [
"//base",
"//base:i18n",
2020-04-24 04:55:17 +03:00
"//content/public/app",
2018-05-04 01:44:29 +03:00
]
2018-07-20 02:30:23 +03:00
2018-07-11 20:49:17 +03:00
include_dirs = [
".",
"$target_gen_dir",
2018-07-20 02:30:23 +03:00
2018-07-11 20:49:17 +03:00
# TODO(nornagon): replace usage of SchemeRegistry by an actually exported
2018-08-15 00:49:35 +03:00
# API of blink, then remove this from the include_dirs.
2018-07-20 19:08:18 +03:00
"//third_party/blink/renderer",
2018-07-11 20:49:17 +03:00
]
2018-07-20 02:30:23 +03:00
2024-11-07 23:30:57 +03:00
defines = [
"BLINK_MOJO_IMPL=1",
"V8_DEPRECATION_WARNINGS",
]
2018-07-25 04:21:36 +03:00
libs = []
2018-07-20 02:30:23 +03:00
2018-11-28 00:42:02 +03:00
if (is_linux) {
defines += [ "GDK_DISABLE_DEPRECATION_WARNINGS" ]
}
2020-06-17 00:19:57 +03:00
if (!is_mas_build) {
2021-03-04 20:27:05 +03:00
deps += [
"//components/crash/core/app",
"//components/crash/core/browser",
]
2020-06-17 00:19:57 +03:00
}
2018-07-20 02:30:23 +03:00
2024-09-17 11:38:56 +03:00
deps += [ "//electron/build/config:generate_mas_config" ]
2022-11-14 23:46:52 +03:00
2018-09-09 04:15:32 +03:00
sources = filenames.lib_sources
2020-10-16 04:30:41 +03:00
if (is_win) {
sources += filenames.lib_sources_win
}
if (is_mac) {
sources += filenames.lib_sources_mac
}
if (is_posix) {
sources += filenames.lib_sources_posix
}
if (is_linux) {
sources += filenames.lib_sources_linux
}
if (!is_mac) {
sources += filenames.lib_sources_views
}
2018-07-20 02:30:23 +03:00
if (is_component_build) {
2018-08-29 11:39:47 +03:00
defines += [ "NODE_SHARED_MODE" ]
2018-06-29 00:58:43 +03:00
}
2018-07-20 02:30:23 +03:00
2018-08-23 18:51:46 +03:00
if (enable_fake_location_provider) {
2018-09-09 04:15:32 +03:00
sources += [
2019-06-19 23:46:59 +03:00
"shell/browser/fake_location_provider.cc",
"shell/browser/fake_location_provider.h",
2018-09-09 04:15:32 +03:00
]
2018-08-23 18:51:46 +03:00
}
2018-05-04 01:44:29 +03:00
if (is_mac) {
deps += [
2019-05-03 21:30:03 +03:00
"//components/remote_cocoa/app_shim",
chore: bump chromium to 92.0.4475.0 (master) (#28462)
* chore: bump chromium in DEPS to 91.0.4464.0
* chore: rebuild chromium/dcheck.patch with import-patches -3
Mechanical only; no code changes
* chore: remove content_browser_main_loop.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
The function being patched (BrowserMainLoop::MainMessageLoopRun()) no
longer exists.
NB: if removing this introduces regressions the likely fix will be to
add a similar patch for ShellBrowserMainParts::WillRunMainMessageLoop()
which has similar code and was added at the same time this was removed.
* chore: rebuild chromium/put_back_deleted_colors_for_autofill.patch with import-patches -3
Mechanical only; no code changes
* chore: rebuild chromium/disable_color_correct_rendering.patch with import-patches -3
Mechanical only; no code changes
* chore: rebuild chromium/eat_allow_disabling_blink_scheduler_throttling_per_renderview.patch with patch
Mechanical only; no code changes
* chore: rebuild chromium/gpu_notify_when_dxdiag_request_fails.patch with import-patches -3
Mechanical only; no code changes
* chore: rebuild chromium/ui_gtk_public_header.patch manually
no code changes
* chore: rebuild chromium/web_contents.patch with import-patches -3
Mechanical only; no code changes
* chore: remove v8/skip_global_registration_of_shared_arraybuffer_backing_stores.patch
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2763874
This patch has been merged upstream
* chore: export patches
* chore: update add_trustedauthclient_to_urlloaderfactory.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2757969
Sync with removal of render_frame_id_
* chore: sync chromium/put_back_deleted_colors_for_autofill.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2785841
SkColorFromColorId() no longer takes theme, scheme args
* chore: sync chromium/put_back_deleted_colors_for_autofill.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2772143
Change new calls to GetDarkSchemeColor to fit our patched call signature
* chore: update add_trustedauthclient_to_urlloaderfactory.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2757969
Sync with removal of render_frame_id_ in our mojom
* chore: update chromium/frame_host_manager.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2740008
UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool
* chore: update chromium/revert_remove_contentrendererclient_shouldfork.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2755314
Upstream has removed `history_list_length_` which we were comparing to 0
to calculate our `is_initial_navigation` bool when calling ShouldFork().
ShouldFork() is ours and none of the code paths actually use that param,
so this commit removes it altogether.
* chore: update permissions_to_register
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2789074
Replace all uses of APIPermission::ID enum with Mojo type
* refactor: update return type of PreMainMessageLoopRun()
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
Used to return void; now returns an int errorcode.
Note: 2725153 also has some nice doc updates about Browser's "stages"
* refactor: sync ElectronBrowserMainParts to MainParts changes
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
RunMainMessageLoopParts has been replaced with WillRunMainMessageLoop
so `BrowserMainLoop::result_code_` is no longer available to us for our
exit_code_ pointer.
This variable held a dual role: (1) of course, hold the exit code, but
also (2) was a nullptr before the message loop was ready, indicating to
anyone calling SetExitCode() that we were still in startup and could
just exit() without any extra steps. exit_code_ still fulfills these two
roles but is now a base::Optional.
* chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
BrowserMainParts::BrowsePreDefaultMainMesssageLoopRun() has been
removed; move that work to the new WillRunMainMessageLoop().
* refactor: stop using CallbackList; it has been removed.
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2785973
* refactor: update use of threadpools.
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2773408
The upstream code is still in flux (e.g. reverts and re-lands) but the
tl;dr for this commit is (1) include thread_pool.h if you're using it
and (2) don't instantiate pools directly.
* refactor: remove routing_id from CreateLoaderAndStart
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2762858
NB: One logic branch in ProxyingURLLoaderFactory::CreateLoaderAndStart
calls std::make_unique<InProgressRequest>, which needs a routing_id.
This PR uses the member field `routing_id_` since there's no longer one
being passed into CreateLoaderAndStart.
* refactor: sync to upstream ParittionOptions churn
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771318
PartitionOptions' enums have changed.
* refactor: update Manifest::Location usage
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771320
tldr: s/Manifest::FOO/ManifestLocation::kFoo/
* chore: bump chromium in DEPS to 91.0.4465.0
* update patches
* refactor: update extensions::Manifest to upstream
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771320
- extensions::Manifest::COMPONENT
+ extensions::mojom::ManifestLocation::kExternalComponent
* refactor: sync with upstream UrlInfo ctor changes
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2740008
UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool
* chore: update invocation of convert_protocol_to_json.py
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2792623
python3 is being used in parts of the upstream build, but the copy of
convert_protocol_to_json.py invoked in v8/third_party/inspector_protocol
is not python3-friendly. Node has a py2+3-friendly version of it in its
tools directory, so call it instead.
* chore: use extensions::mojom::APIPermissionID
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2791122
tldr:
- extensions::APIPermission::kFoo
+ extensions::mojom::APIPermissionID::kFoo
* chore: Remove support for TLS1.0/1.1 in SSLVersionMin policy
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2765737
Remove TLS v1.0 & 1.1 from our SSLProtocolVersionFromString() function.
This is the same change made upstream at
https://chromium-review.googlesource.com/c/chromium/src/+/2765737/8/chrome/browser/ssl/ssl_config_service_manager_pref.cc
* fixup! chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun
* chore: Use IDType for permission change subscriptions.
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2791431
tldr: {Subscribe,Unsubscribe}PermissionStatusChange's tag type used to
be an int; now it's the new SubscriptionId type (which is an IdType64).
* chore: sync PowerMonitor code to upstream refactor
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2752635
tldr: PowerMonitor has been split into PowerStateObserver,
PowerSuspendObserver, and PowerThermalObserver to reduce number of tasks
posted to consumers who only need notifications for one of those things
instead of all of them.
* chore: use PartitionOptions's new Cookies field
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771318
* Revert "refactor: remove routing_id from CreateLoaderAndStart"
This reverts commit 8c9773b87a3c84f9073a47089eb2b6889d745245.
8c9773b was only a partial fix; reverting to start & try again.
* update patches
* chore: bump chromium in DEPS to 91.0.4466.0
* chore: update chromium/accelerator.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2795472
tldr: sync patch with upstream renamed variable & macro names.
* chore: update chromium/gtk_visibility.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2796200
tldr: no code changes; just updating the diff to apply cleanly.
note: ooh upstream Wayland hacking!
* chore: update chromium/picture-in-picture.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2710023
tldr: no code changes; just updating the diff to apply cleanly.
* chore: update chromium/worker_feat_add_hook_to_notify_script_ready.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2775573
tldr: no code changes; just updating the diff to apply cleanly.
* chore: export_all_patches
* chore: update chromium/feat_add_set_theme_source_to_allow_apps_to.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2796511
tldr: NotifyObservers has been renamed to NotifyOnNativeThemeUpdated,
so update the invocation in our patch.
* chore: update ElectronBrowserClient w/upstream API
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797454
tldr: GetDevToolsManagerDelegate() was returning an owned raw pointer.
Replaced it with CreateDevToolsManagerDelegate() which uses unique_ptr<>.
* chore: handle new content::PermissionType::FILE_HANDLING in toV8()
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2762201
`file-handling` string confirmed in https://chromium-review.googlesource.com/c/chromium/src/+/2762201/18/chrome/browser/ui/webui/settings/site_settings_helper.cc
* refactor: remove routing_id from CreateLoaderAndStart pt 1
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2762858
Part 1: the easiest ones
* 2796724: Support Python3
https://chromium-review.googlesource.com/c/infra/luci/python-adb/+/2796724
* chore: bump chromium in DEPS to 91.0.4468.0
* 2668974: WebShare: Implement SharingServicePicker
https://chromium-review.googlesource.com/c/chromium/src/+/2668974
* 2802766: Apply modernize-make-unique to media/
https://chromium-review.googlesource.com/c/chromium/src/+/2802766
* 2802823: Apply modernize-make-unique to gpu/
https://chromium-review.googlesource.com/c/chromium/src/+/2802823
* 2803041: Apply modernize-make-unique to remaining files
https://chromium-review.googlesource.com/c/chromium/src/+/2803041
* 2798873: Convert GtkKeyBindingsHandler build checks to runtime checks
https://chromium-review.googlesource.com/c/chromium/src/+/2798873
* 2733595: [ch-r] Parse ACCEPT_CH H2/3 frame and restart with new headers if needed
https://chromium-review.googlesource.com/c/chromium/src/+/2733595
* chore: update patch indices
* 2795107: Remove unused PermissionRequest IDs.
https://chromium-review.googlesource.com/c/chromium/src/+/2795107
* chore: bump chromium in DEPS to 91.0.4469.0
* chore: fixup patch indices
* chore: bump chromium in DEPS to 91.0.4469.5
* PiP 1.5: Add microphone, camera, and hang up buttons to the PiP window
https://chromium-review.googlesource.com/c/chromium/src/+/2710023
* fixup! refactor: remove routing_id from CreateLoaderAndStart
* refactor: use URLLoaderNetworkServiceObserver for auth requests from SimpleURLLoader
* fixup! chore: fixup patch indices
* 2724817: Expand scope of wasm-eval to all URLs
https://chromium-review.googlesource.com/c/chromium/src/+/2724817
* Fixup patch after rebase
* chore: bump chromium in DEPS to 91.0.4472.0
* 2797341: [ozone/x11] Enabled the global shortcut listener.
https://chromium-review.googlesource.com/c/chromium/src/+/2797341
* 2805553: Reland Add GTK ColorMixers to ColorPipeline P1
https://chromium-review.googlesource.com/c/chromium/src/+/2805553
* 2804366: PiP 1.5: Label back to tab button with origin and center it
https://chromium-review.googlesource.com/c/chromium/src/+/2804366
* 2784730: Fix crash on AX mode change in NativeViewHost without a Widget
https://chromium-review.googlesource.com/c/chromium/src/+/2784730
* chore: update patch indices
* 2810174: Add PdfAnnotationsEnabled policy.
https://chromium-review.googlesource.com/c/chromium/src/+/2810174
* 2807829: Allow capturers to indicate if they want a WakeLock or not.
https://chromium-review.googlesource.com/c/chromium/src/+/2807829
* chore: bump chromium in DEPS to 92.0.4473.0
* chore: bump chromium in DEPS to 92.0.4474.0
* chore: bump chromium in DEPS to 92.0.4475.0
* chore: update patches
* chore: updates patches
* chore: update is_media_key patch to handle new ozone impl
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797341
* fix: ExecuteJavascript requests now need to be flagged as non-bf-aware
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2787195
* chore: icon_util_x11 is now icon_util_linux
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2791362
* build: update sysroots
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2628496
* build: fix missing symbols on linux build
* use_ozone and use_x11 are not exclusive
* new button view to build for pip
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797341
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2804366
* chore: fix broken gtk_util color patch
* chore: remove patch conflict
* build: update linux manifests
* chore: build bttlb on all platforms for pip
* chore: add thread_pool include for views delegate win
* chore: fix lint
* chore: add node patches for V8 changes
* build: add missing base include on windows
* fix: update frame host manager patch for new state transitions
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2714464
* chore: update windows zip manifests
* chore: update mac zip manifests
* chore: fix patch linting
* refactor: implement missing URLLoaderNetworkServiceObserver methods
It is against The Mojo Rules to leave hanging callbacks. These always
have to be called.
Refs: https://github.com/electron/electron/commit/186528aab9f8e29d658f07d220bb7f627980edda
* spec: fix locale test on local linux
* fix: pass the exit code correctly in new PreMainMessageLoopRun
Refs: https://github.com/electron/electron/commit/2622e91c4493ceb032e2f80cb484885bb8f97475
* fix: ensure we early-exit when request_handler_ is not provided
Refs: https://github.com/electron/electron/commit/93077afbfb6db248a0c0cc447d7ad2c9ccfda1d5
* fix: strongly set result_code in the BrowserMainLoop
* fix: invalid usage of non-targetted PostTask
You must always either use a host threadpool or specify a target
thread. In this case we did neither after this refactor.
Refs: https://github.com/electron/electron/pull/28462/commits/4e33ee0ad35a710bd34641cb0376bdee6aea2d1f
* chore: fix gn check
* chore: remove stray .rej files in patch
* chore: add mojo error code to url loader failure
* build: ensure CI is truthy in arm test env
* fix: handle windowCaptureMacV2 being enabled when fetching media source id
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2709931
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-04-15 20:44:35 +03:00
"//components/remote_cocoa/browser",
2023-02-03 14:43:42 +03:00
"//content/browser:mac_helpers",
2018-07-20 02:30:23 +03:00
"//ui/accelerated_widget_mac",
2018-06-29 23:39:22 +03:00
]
2019-10-03 23:21:30 +03:00
2020-06-17 00:19:57 +03:00
if (!is_mas_build) {
deps += [ "//third_party/crashpad/crashpad/client" ]
}
2020-07-22 08:34:34 +03:00
frameworks = [
2023-05-23 22:58:58 +03:00
"AuthenticationServices.framework",
2019-10-03 23:21:30 +03:00
"AVFoundation.framework",
"Carbon.framework",
"LocalAuthentication.framework",
"QuartzCore.framework",
"Quartz.framework",
"Security.framework",
"SecurityInterface.framework",
"ServiceManagement.framework",
"StoreKit.framework",
]
2022-02-03 01:01:05 +03:00
weak_frameworks = [ "QuickLookThumbnailing.framework" ]
2019-02-11 22:38:58 +03:00
sources += [
2019-06-19 23:46:59 +03:00
"shell/browser/ui/views/autofill_popup_view.cc",
"shell/browser/ui/views/autofill_popup_view.h",
2019-02-11 22:38:58 +03:00
]
2018-07-20 02:30:23 +03:00
if (is_mas_build) {
2019-06-19 23:46:59 +03:00
sources += [ "shell/browser/api/electron_api_app_mas.mm" ]
2020-05-07 23:31:26 +03:00
sources -= [ "shell/browser/auto_updater_mac.mm" ]
2020-06-17 00:19:57 +03:00
sources -= [
"shell/app/electron_crash_reporter_client.cc",
"shell/app/electron_crash_reporter_client.h",
"shell/common/crash_keys.cc",
"shell/common/crash_keys.h",
]
2018-07-20 02:30:23 +03:00
} else {
2020-07-22 08:34:34 +03:00
frameworks += [
2018-07-20 02:30:23 +03:00
"Squirrel.framework",
2020-07-03 05:42:40 +03:00
"ReactiveObjC.framework",
2018-07-20 02:30:23 +03:00
"Mantle.framework",
]
2020-07-03 05:42:40 +03:00
deps += [
"//third_party/squirrel.mac:reactiveobjc_framework+link",
"//third_party/squirrel.mac:squirrel_framework+link",
2018-07-20 02:30:23 +03:00
]
2020-07-03 05:42:40 +03:00
# ReactiveObjC which is used by Squirrel requires using __weak.
cflags_objcc = [ "-fobjc-weak" ]
2018-07-20 02:30:23 +03:00
}
2018-05-04 01:44:29 +03:00
}
2018-05-16 22:51:11 +03:00
if (is_linux) {
2020-12-14 21:57:36 +03:00
libs = [ "xshmfence" ]
2018-05-16 22:51:11 +03:00
deps += [
2022-04-18 07:24:32 +03:00
":electron_gtk_stubs",
2018-11-10 22:21:40 +03:00
":libnotify_loader",
2018-06-29 23:43:13 +03:00
"//build/config/linux/gtk",
2022-10-17 17:22:24 +03:00
"//components/crash/content/browser",
2018-10-27 06:57:41 +03:00
"//dbus",
2018-05-16 22:51:11 +03:00
"//device/bluetooth",
2022-10-17 17:22:24 +03:00
"//third_party/crashpad/crashpad/client",
2021-11-24 11:45:59 +03:00
"//ui/base/ime/linux",
2018-05-16 22:51:11 +03:00
"//ui/events/devices/x11",
"//ui/events/platform/x11",
2022-10-17 17:22:24 +03:00
"//ui/gtk:gtk_config",
2022-07-20 14:03:34 +03:00
"//ui/linux:linux_ui",
"//ui/linux:linux_ui_factory",
2019-06-13 09:42:21 +03:00
"//ui/wm",
2018-05-16 22:51:11 +03:00
]
2021-11-24 11:45:59 +03:00
if (ozone_platform_x11) {
2020-10-26 20:28:11 +03:00
sources += filenames.lib_sources_linux_x11
2021-11-24 11:45:59 +03:00
public_deps += [
"//ui/base/x",
2022-02-10 05:58:52 +03:00
"//ui/ozone/platform/x11",
2021-11-24 11:45:59 +03:00
]
2020-04-14 02:39:26 +03:00
}
2018-05-16 22:51:11 +03:00
configs += [ ":gio_unix" ]
2018-07-11 20:45:21 +03:00
defines += [
2018-07-20 02:30:23 +03:00
# Disable warnings for g_settings_list_schemas.
"GLIB_DISABLE_DEPRECATION_WARNINGS",
2018-07-11 20:45:21 +03:00
]
2018-10-13 04:57:04 +03:00
2019-10-29 01:12:35 +03:00
sources += [
2021-11-08 03:53:00 +03:00
"shell/browser/certificate_manager_model.cc",
"shell/browser/certificate_manager_model.h",
2019-10-29 01:12:35 +03:00
"shell/browser/ui/gtk_util.cc",
"shell/browser/ui/gtk_util.h",
]
2018-07-20 02:30:23 +03:00
}
if (is_win) {
2018-07-25 04:21:36 +03:00
libs += [ "dwmapi.lib" ]
2024-01-18 23:00:49 +03:00
sources += [ "shell/common/asar/archive_win.cc" ]
2019-03-05 08:08:55 +03:00
deps += [
2024-05-10 18:21:10 +03:00
"//components/app_launch_prefetch",
2020-05-07 23:31:26 +03:00
"//components/crash/core/app:crash_export_thunks",
2019-03-05 08:08:55 +03:00
"//ui/native_theme:native_theme_browser",
2019-06-13 09:42:21 +03:00
"//ui/wm",
2019-03-05 08:08:55 +03:00
"//ui/wm/public",
]
2019-06-13 09:42:21 +03:00
public_deps += [
"//sandbox/win:sandbox",
"//third_party/crashpad/crashpad/handler",
]
2018-07-11 20:45:21 +03:00
}
2019-06-13 09:42:21 +03:00
2019-11-04 20:50:31 +03:00
if (enable_plugins) {
sources += [
2024-09-30 01:10:34 +03:00
"shell/browser/electron_plugin_info_host_impl.cc",
"shell/browser/electron_plugin_info_host_impl.h",
2022-10-27 19:37:04 +03:00
"shell/common/plugin_info.cc",
"shell/common/plugin_info.h",
2022-10-12 17:04:30 +03:00
]
}
2022-10-27 19:37:04 +03:00
if (enable_printing) {
2018-10-13 04:57:04 +03:00
sources += [
2021-05-20 02:15:47 +03:00
"shell/browser/printing/print_view_manager_electron.cc",
"shell/browser/printing/print_view_manager_electron.h",
2024-04-12 02:56:39 +03:00
"shell/browser/printing/printing_utils.cc",
"shell/browser/printing/printing_utils.h",
2019-06-19 23:46:59 +03:00
"shell/renderer/printing/print_render_frame_helper_delegate.cc",
"shell/renderer/printing/print_render_frame_helper_delegate.h",
2018-10-13 04:57:04 +03:00
]
2020-10-29 09:56:41 +03:00
deps += [
"//chrome/services/printing/public/mojom",
"//components/printing/common:mojo_interfaces",
]
2021-03-16 18:41:00 +03:00
if (is_mac) {
deps += [ "//chrome/services/mac_notifications/public/mojom" ]
}
2018-10-13 04:57:04 +03:00
}
2019-07-25 02:01:08 +03:00
if (enable_electron_extensions) {
sources += filenames.lib_sources_extensions
2020-02-13 03:39:12 +03:00
deps += [
"shell/browser/extensions/api:api_registration",
"shell/common/extensions/api",
"shell/common/extensions/api:extensions_features",
"//chrome/browser/resources:component_extension_resources",
2023-11-03 22:37:55 +03:00
"//components/guest_view/common:mojom",
2020-09-15 19:29:32 +03:00
"//components/update_client:update_client",
2020-02-13 03:39:12 +03:00
"//components/zoom",
2020-04-29 09:16:10 +03:00
"//extensions/browser",
2022-12-06 01:59:19 +03:00
"//extensions/browser/api:api_provider",
2021-03-04 20:27:05 +03:00
"//extensions/browser/updater",
2020-04-29 09:16:10 +03:00
"//extensions/common",
"//extensions/common:core_api_provider",
"//extensions/renderer",
2020-02-13 03:39:12 +03:00
]
2019-07-25 02:01:08 +03:00
}
2019-11-04 20:50:31 +03:00
if (enable_pdf) {
# Printing depends on some //pdf code, so it needs to be built even if the
# pdf viewer isn't enabled.
2020-02-13 03:39:12 +03:00
deps += [
"//pdf",
"//pdf:features",
]
2019-11-04 20:50:31 +03:00
}
if (enable_pdf_viewer) {
deps += [
2021-02-09 23:16:21 +03:00
"//chrome/browser/resources/pdf:resources",
2019-11-04 20:50:31 +03:00
"//components/pdf/browser",
2022-03-30 21:55:38 +03:00
"//components/pdf/browser:interceptors",
2024-02-21 23:27:05 +03:00
"//components/pdf/common:constants",
2024-04-16 01:10:32 +03:00
"//components/pdf/common:util",
2019-11-04 20:50:31 +03:00
"//components/pdf/renderer",
2022-03-25 04:39:03 +03:00
"//pdf",
2024-08-23 20:34:26 +03:00
"//pdf:content_restriction",
2019-11-04 20:50:31 +03:00
]
sources += [
chore: bump chromium to 118.0.5975.0 (main) (#39531)
* chore: bump chromium in DEPS to 118.0.5951.0
* chore: update printing.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4727894
No logic changes, but patch needed to be manually re-applied due to upstream code shear
* chore: update port_autofill_colors_to_the_color_pipeline.patch
No manual changes; patch applied with fuzz
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5953.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5955.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5957.0
* chore: update patches
* chore: include path of native_web_keyboard_event.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
* chore: remove reference to eextensions/browser/notification-types.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4771627
* chore: update references to renamed upstream field NativeWebKeyboardEvent.skip_if_unhandled (formerly known as skip_in_browser
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
Need a second pair of eyes on this commit. In particular the reference in content_converter.cc, skipInBrowser, seems to not be set or documented anywhere? Is this unused/vestigal code?
* chore: sync signature of ElectronExtensionsBrowserClient::IsValidContext() to upstream change
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4784198
* chore: add auto_pip_setting_helper.[cc,h] to chromium_src build
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4688277
Exiting upstream code used by chromium_src now depends on this new upstream class
* chore: bump chromium in DEPS to 118.0.5959.0
* chore: update add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
Xref: add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
manually adjust patch to minor upstream chagnes
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5961.0
* chore: bump chromium in DEPS to 118.0.5963.0
* chore: update patches
* 4780994: Rename various base files to "apple" since iOS uses them too
https://chromium-review.googlesource.com/c/chromium/src/+/4780994
* Many files moved from `mac` -> `apple`
This commit follows a handful of CLs that simply rename files/symbols to change `mac`
to `apple`
to signify their use across both macOS and iOS:
- 4784010: Move scoped_nsautorelease_pool to base/apple, leave a forwarding header
- 4790744: Move foundation_util to base/apple, leave a forwarding header
- 4790741: Move scoped_cftypreref to base/apple, leave a forwarding header
- 4787627: Move and rename macOS+iOS base/ files in PA to "apple"
- 4780399: Move OSStatus logging to base/apple
- 4787387: Remove forwarding headers
- 4781113: Rename message_pump_mac to "apple" because iOS uses it too
* fixup minor patch update error
A function param got dropped from this patch somewhere earlier
* chore: bump chromium in DEPS to 118.0.5965.2
* chore: update patches
* 4799213: Move ScopedTypeRef and ScopedCFTypeRef into base::apple::
https://chromium-review.googlesource.com/c/chromium/src/+/4799213
* Fix removed include to BrowserContext
In crrev.com/c/4767962 an include to BrowserContext was removed,
which was necessary for compilation. This broke only for us because
"chrome/browser/profiles/profile.h" includes that class, but we remove
all references to profiles.
* chore: bump chromium in DEPS to 118.0.5967.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5969.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5971.0
* chore: bump chromium in DEPS to 118.0.5973.0
* chore: update patches
* 4772121: [OOPIF PDF] Replace PDFWebContentsHelper with PDFDocumentHelper
https://chromium-review.googlesource.com/c/chromium/src/+/4772121
* 4811164: [Extensions] Do some cleanup in ChromeManagementAPIDelegate.
https://chromium-review.googlesource.com/c/chromium/src/+/4811164
* 4809488: Remove duplicate dnd functionality between Web and Renderer prefs
https://chromium-review.googlesource.com/c/chromium/src/+/4809488
Given that this is no longer an option of web preferences, we should
consider deprecating this option and then removing it.
* chore: bump chromium in DEPS to 118.0.5975.0
* chore: update patches
* fixup! chore: add auto_pip_settings_helper.{cc|h} to chromium_src build
* Reland "[windows] Remove RegKey::DeleteEmptyKey"
Refs https://chromium-review.googlesource.com/c/chromium/src/+/4813255
* Ensure StrCat means StrCat
Refs https://chromium-review.googlesource.com/c/chromium/src/+/1117180
* fixup! Remove RegKey::DeleteEmptyKey
* Consistently reject large p and large q in DH
Refs https://boringssl-review.googlesource.com/c/boringssl/+/62226
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2023-09-01 09:54:59 +03:00
"shell/browser/electron_pdf_document_helper_client.cc",
"shell/browser/electron_pdf_document_helper_client.h",
2023-05-24 21:37:07 +03:00
"shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc",
"shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.h",
2019-11-04 20:50:31 +03:00
]
}
2020-10-27 20:49:25 +03:00
sources += get_target_outputs(":electron_fuses")
2020-10-28 23:00:21 +03:00
2021-05-26 22:16:55 +03:00
if (allow_runtime_configurable_key_storage) {
defines += [ "ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE" ]
}
2018-05-04 01:44:29 +03:00
}
2018-07-18 01:34:19 +03:00
electron_paks("packed_resources") {
if (is_mac) {
2018-07-27 18:04:03 +03:00
output_dir = "$root_gen_dir/electron_repack"
2018-07-18 01:34:19 +03:00
copy_data_to_bundle = true
} else {
output_dir = root_out_dir
}
}
2018-05-04 01:44:29 +03:00
if (is_mac) {
2018-09-27 21:53:08 +03:00
electron_framework_name = "$electron_product_name Framework"
electron_helper_name = "$electron_product_name Helper"
electron_login_helper_name = "$electron_product_name Login Helper"
2018-05-04 01:44:29 +03:00
electron_framework_version = "A"
2019-10-22 00:11:09 +03:00
mac_xib_bundle_data("electron_xibs") {
2020-01-17 21:41:52 +03:00
sources = [ "shell/common/resources/mac/MainMenu.xib" ]
2019-10-22 00:11:09 +03:00
}
2018-05-04 01:44:29 +03:00
bundle_data("electron_framework_resources") {
2020-01-17 21:41:52 +03:00
public_deps = [ ":packed_resources" ]
2018-07-18 01:34:19 +03:00
sources = []
2018-05-04 01:44:29 +03:00
if (icu_use_data_file) {
sources += [ "$root_out_dir/icudtl.dat" ]
public_deps += [ "//third_party/icu:icudata" ]
}
if (v8_use_external_startup_data) {
public_deps += [ "//v8" ]
2018-06-20 22:50:43 +03:00
if (use_v8_context_snapshot) {
2023-06-08 02:34:02 +03:00
sources += [ "$root_out_dir/$v8_context_snapshot_filename" ]
public_deps += [ "//tools/v8_context_snapshot" ]
2018-06-20 22:50:43 +03:00
} else {
sources += [ "$root_out_dir/snapshot_blob.bin" ]
}
2018-05-04 01:44:29 +03:00
}
2020-01-17 21:41:52 +03:00
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
2018-05-04 01:44:29 +03:00
}
2020-02-05 10:02:02 +03:00
if (!is_component_build && is_component_ffmpeg) {
2018-08-21 00:02:52 +03:00
bundle_data("electron_framework_libraries") {
2018-09-20 01:42:42 +03:00
sources = []
public_deps = []
2020-02-05 10:02:02 +03:00
sources += [ "$root_out_dir/libffmpeg.dylib" ]
public_deps += [ "//third_party/ffmpeg:ffmpeg" ]
2020-01-17 21:41:52 +03:00
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
2018-08-21 00:02:52 +03:00
}
} else {
group("electron_framework_libraries") {
}
}
2019-06-20 04:14:51 +03:00
2024-07-02 10:51:33 +03:00
# Add the ANGLE .dylibs in the Libraries directory of the Framework.
bundle_data("electron_angle_binaries") {
sources = [
"$root_out_dir/egl_intermediates/libEGL.dylib",
"$root_out_dir/egl_intermediates/libGLESv2.dylib",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [ "//ui/gl:angle_library_copy" ]
2019-06-20 04:14:51 +03:00
}
2024-07-02 10:51:33 +03:00
# Add the SwiftShader .dylibs in the Libraries directory of the Framework.
bundle_data("electron_swiftshader_binaries") {
sources = [
"$root_out_dir/vk_intermediates/libvk_swiftshader.dylib",
"$root_out_dir/vk_intermediates/vk_swiftshader_icd.json",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [ "//ui/gl:swiftshader_vk_library_copy" ]
}
2019-06-20 04:14:51 +03:00
group("electron_angle_library") {
2024-07-02 10:51:33 +03:00
deps = [ ":electron_angle_binaries" ]
2019-06-20 04:14:51 +03:00
}
group("electron_swiftshader_library") {
2024-07-02 10:51:33 +03:00
deps = [ ":electron_swiftshader_binaries" ]
2019-06-20 04:14:51 +03:00
}
2018-08-21 00:02:52 +03:00
2018-06-29 01:43:21 +03:00
bundle_data("electron_crashpad_helper") {
2020-05-07 23:31:26 +03:00
sources = [ "$root_out_dir/chrome_crashpad_handler" ]
2018-05-04 01:44:29 +03:00
2020-05-07 23:31:26 +03:00
outputs = [ "{{bundle_contents_dir}}/Helpers/{{source_file_part}}" ]
2018-05-04 01:44:29 +03:00
2020-05-07 23:31:26 +03:00
public_deps = [ "//components/crash/core/app:chrome_crashpad_handler" ]
2020-04-21 00:50:10 +03:00
if (is_asan) {
# crashpad_handler requires the ASan runtime at its @executable_path.
sources += [ "$root_out_dir/libclang_rt.asan_osx_dynamic.dylib" ]
2024-03-15 07:06:43 +03:00
public_deps += [ "//build/config/sanitizers:copy_sanitizer_runtime" ]
2020-04-21 00:50:10 +03:00
}
2018-05-04 01:44:29 +03:00
}
mac_framework_bundle("electron_framework") {
output_name = electron_framework_name
framework_version = electron_framework_version
2018-10-01 23:00:53 +03:00
framework_contents = [
"Resources",
"Libraries",
]
2020-06-17 00:19:57 +03:00
if (!is_mas_build) {
framework_contents += [ "Helpers" ]
}
2018-07-31 01:55:41 +03:00
public_deps = [
2019-10-03 23:21:30 +03:00
":electron_framework_libraries",
2018-07-31 01:55:41 +03:00
":electron_lib",
]
2018-05-04 01:44:29 +03:00
deps = [
2019-06-20 04:14:51 +03:00
":electron_angle_library",
2018-08-21 00:02:52 +03:00
":electron_framework_libraries",
2018-08-29 11:39:47 +03:00
":electron_framework_resources",
2019-06-20 04:14:51 +03:00
":electron_swiftshader_library",
2019-10-22 00:11:09 +03:00
":electron_xibs",
2024-11-08 06:20:50 +03:00
"//third_party/electron_node:node_lib",
2018-05-04 01:44:29 +03:00
]
2018-06-29 01:43:21 +03:00
if (!is_mas_build) {
deps += [ ":electron_crashpad_helper" ]
}
2019-06-19 23:46:59 +03:00
info_plist = "shell/common/resources/mac/Info.plist"
2018-09-27 21:53:08 +03:00
2018-09-06 00:00:37 +03:00
extra_substitutions = [
2019-06-18 01:56:15 +03:00
"ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.framework",
2018-09-06 00:00:37 +03:00
"ELECTRON_VERSION=$electron_version",
]
2018-05-04 01:44:29 +03:00
2018-07-31 01:55:41 +03:00
include_dirs = [ "." ]
2018-09-09 04:15:32 +03:00
sources = filenames.framework_sources
2023-06-13 21:48:53 +03:00
frameworks = [ "IOSurface.framework" ]
2019-04-18 00:10:04 +03:00
2018-05-04 01:44:29 +03:00
ldflags = [
"-Wl,-install_name,@rpath/$output_name.framework/$output_name",
"-rpath",
"@loader_path/Libraries",
2020-08-11 13:17:18 +03:00
# Required for exporting all symbols of libuv.
"-Wl,-force_load,obj/third_party/electron_node/deps/uv/libuv.a",
2018-05-04 01:44:29 +03:00
]
if (is_component_build) {
ldflags += [
"-rpath",
2018-07-31 01:55:41 +03:00
"@executable_path/../../../../../..",
2018-05-04 01:44:29 +03:00
]
}
2022-08-03 10:51:30 +03:00
# For component ffmpeg under non-component build, it is linked from
# @loader_path. However the ffmpeg.dylib is moved to a different place
# when generating app bundle, and we should change to link from @rpath.
if (is_component_ffmpeg && !is_component_build) {
ldflags += [ "-Wcrl,installnametool,-change,@loader_path/libffmpeg.dylib,@rpath/libffmpeg.dylib" ]
}
2018-05-04 01:44:29 +03:00
}
2019-07-03 04:22:09 +03:00
template("electron_helper_app") {
mac_app_bundle(target_name) {
assert(defined(invoker.helper_name_suffix))
output_name = electron_helper_name + invoker.helper_name_suffix
2024-09-17 11:38:56 +03:00
deps = [
":electron_framework+link",
"//electron/build/config:generate_mas_config",
]
2019-07-03 04:22:09 +03:00
if (!is_mas_build) {
deps += [ "//sandbox/mac:seatbelt" ]
}
defines = [ "HELPER_EXECUTABLE" ]
2022-01-17 10:46:33 +03:00
sources = [
"shell/app/electron_main_mac.cc",
"shell/app/uv_stdio_fix.cc",
"shell/app/uv_stdio_fix.h",
]
2019-07-03 04:22:09 +03:00
include_dirs = [ "." ]
info_plist = "shell/renderer/resources/mac/Info.plist"
extra_substitutions =
[ "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.helper" ]
ldflags = [
2018-12-13 03:01:10 +03:00
"-rpath",
2019-07-03 04:22:09 +03:00
"@executable_path/../../..",
2018-12-13 03:01:10 +03:00
]
2019-07-03 04:22:09 +03:00
if (is_component_build) {
ldflags += [
"-rpath",
"@executable_path/../../../../../..",
]
}
}
}
foreach(helper_params, content_mac_helpers) {
_helper_target = helper_params[0]
_helper_bundle_id = helper_params[1]
_helper_suffix = helper_params[2]
electron_helper_app("electron_helper_app_${_helper_target}") {
helper_name_suffix = _helper_suffix
2018-12-13 03:01:10 +03:00
}
2018-05-04 01:44:29 +03:00
}
2020-07-03 05:42:40 +03:00
template("stripped_framework") {
action(target_name) {
assert(defined(invoker.framework))
script = "//electron/build/strip_framework.py"
forward_variables_from(invoker, [ "deps" ])
inputs = [ "$root_out_dir/" + invoker.framework ]
outputs = [ "$target_out_dir/stripped_frameworks/" + invoker.framework ]
args = rebase_path(inputs) + rebase_path(outputs)
}
}
stripped_framework("stripped_mantle_framework") {
framework = "Mantle.framework"
deps = [ "//third_party/squirrel.mac:mantle_framework" ]
}
stripped_framework("stripped_reactiveobjc_framework") {
framework = "ReactiveObjC.framework"
deps = [ "//third_party/squirrel.mac:reactiveobjc_framework" ]
}
stripped_framework("stripped_squirrel_framework") {
framework = "Squirrel.framework"
deps = [ "//third_party/squirrel.mac:squirrel_framework" ]
}
2018-05-04 01:44:29 +03:00
bundle_data("electron_app_framework_bundle_data") {
2020-01-17 21:41:52 +03:00
sources = [ "$root_out_dir/$electron_framework_name.framework" ]
2018-06-29 01:43:21 +03:00
if (!is_mas_build) {
2020-07-03 05:42:40 +03:00
sources += get_target_outputs(":stripped_mantle_framework") +
get_target_outputs(":stripped_reactiveobjc_framework") +
get_target_outputs(":stripped_squirrel_framework")
2018-06-29 01:43:21 +03:00
}
2020-01-17 21:41:52 +03:00
outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
2020-07-03 05:42:40 +03:00
public_deps = [
":electron_framework+link",
":stripped_mantle_framework",
":stripped_reactiveobjc_framework",
":stripped_squirrel_framework",
]
2019-07-03 04:22:09 +03:00
foreach(helper_params, content_mac_helpers) {
sources +=
[ "$root_out_dir/${electron_helper_name}${helper_params[2]}.app" ]
public_deps += [ ":electron_helper_app_${helper_params[0]}" ]
}
2018-05-04 01:44:29 +03:00
}
2018-06-29 01:43:21 +03:00
mac_app_bundle("electron_login_helper") {
output_name = electron_login_helper_name
2018-09-09 04:15:32 +03:00
sources = filenames.login_helper_sources
2018-06-29 01:43:21 +03:00
include_dirs = [ "." ]
2020-07-22 08:34:34 +03:00
frameworks = [ "AppKit.framework" ]
2019-06-19 23:46:59 +03:00
info_plist = "shell/app/resources/mac/loginhelper-Info.plist"
2018-07-31 01:55:41 +03:00
extra_substitutions =
2019-06-18 01:56:15 +03:00
[ "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.loginhelper" ]
2018-06-29 01:43:21 +03:00
}
bundle_data("electron_login_helper_app") {
2020-01-17 21:41:52 +03:00
public_deps = [ ":electron_login_helper" ]
sources = [ "$root_out_dir/$electron_login_helper_name.app" ]
outputs =
[ "{{bundle_contents_dir}}/Library/LoginItems/{{source_file_part}}" ]
2018-06-29 01:43:21 +03:00
}
2018-11-15 20:30:45 +03:00
action("electron_app_lproj_dirs") {
outputs = []
2022-03-25 04:39:03 +03:00
foreach(locale, locales_as_apple_outputs) {
2018-11-15 20:30:45 +03:00
outputs += [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ]
}
script = "build/mac/make_locale_dirs.py"
args = rebase_path(outputs)
}
2022-03-25 04:39:03 +03:00
foreach(locale, locales_as_apple_outputs) {
2018-11-15 20:30:45 +03:00
bundle_data("electron_app_strings_${locale}_bundle_data") {
2020-01-17 21:41:52 +03:00
sources = [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ]
outputs = [ "{{bundle_resources_dir}}/$locale.lproj" ]
public_deps = [ ":electron_app_lproj_dirs" ]
2018-11-15 20:30:45 +03:00
}
}
group("electron_app_strings_bundle_data") {
public_deps = []
2022-03-25 04:39:03 +03:00
foreach(locale, locales_as_apple_outputs) {
2018-11-15 20:30:45 +03:00
public_deps += [ ":electron_app_strings_${locale}_bundle_data" ]
}
}
2018-05-04 01:44:29 +03:00
bundle_data("electron_app_resources") {
public_deps = [
2019-02-05 23:10:15 +03:00
":default_app_asar",
2018-11-15 20:30:45 +03:00
":electron_app_strings_bundle_data",
2018-05-04 01:44:29 +03:00
]
sources = [
2018-05-16 22:51:11 +03:00
"$root_out_dir/resources/default_app.asar",
2019-06-19 23:46:59 +03:00
"shell/browser/resources/mac/electron.icns",
2018-05-04 01:44:29 +03:00
]
2020-01-17 21:41:52 +03:00
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
2018-05-04 01:44:29 +03:00
}
2021-09-10 00:49:01 +03:00
asar_hashed_info_plist("electron_app_plist") {
keys = [ "DEFAULT_APP_ASAR_HEADER_SHA" ]
hash_targets = [ ":default_app_asar_header_hash" ]
plist_file = "shell/browser/resources/mac/Info.plist"
}
2018-05-04 01:44:29 +03:00
mac_app_bundle("electron_app") {
output_name = electron_product_name
2022-01-17 10:46:33 +03:00
sources = [
"shell/app/electron_main_mac.cc",
"shell/app/uv_stdio_fix.cc",
"shell/app/uv_stdio_fix.h",
]
2018-05-04 01:44:29 +03:00
include_dirs = [ "." ]
deps = [
":electron_app_framework_bundle_data",
2021-09-10 00:49:01 +03:00
":electron_app_plist",
2018-05-04 01:44:29 +03:00
":electron_app_resources",
2021-02-09 00:19:28 +03:00
":electron_fuses",
2024-09-17 11:38:56 +03:00
"//electron/build/config:generate_mas_config",
2021-02-03 01:01:58 +03:00
"//electron/buildflags",
2018-05-04 01:44:29 +03:00
]
2018-06-29 01:43:21 +03:00
if (is_mas_build) {
deps += [ ":electron_login_helper_app" ]
}
2021-09-10 00:49:01 +03:00
info_plist_target = ":electron_app_plist"
2019-06-18 01:56:15 +03:00
extra_substitutions = [
"ELECTRON_BUNDLE_ID=$electron_mac_bundle_id",
"ELECTRON_VERSION=$electron_version",
]
2018-05-04 01:44:29 +03:00
ldflags = [
"-rpath",
"@executable_path/../Frameworks",
]
}
2019-07-05 20:38:30 +03:00
if (enable_dsyms) {
extract_symbols("electron_framework_syms") {
binary = "$root_out_dir/$electron_framework_name.framework/Versions/$electron_framework_version/$electron_framework_name"
symbol_dir = "$root_out_dir/breakpad_symbols"
dsym_file = "$root_out_dir/$electron_framework_name.dSYM/Contents/Resources/DWARF/$electron_framework_name"
2020-01-17 21:41:52 +03:00
deps = [ ":electron_framework" ]
2019-07-05 20:38:30 +03:00
}
2019-07-19 18:02:43 +03:00
foreach(helper_params, content_mac_helpers) {
_helper_target = helper_params[0]
_helper_bundle_id = helper_params[1]
_helper_suffix = helper_params[2]
extract_symbols("electron_helper_syms_${_helper_target}") {
binary = "$root_out_dir/$electron_helper_name${_helper_suffix}.app/Contents/MacOS/$electron_helper_name${_helper_suffix}"
symbol_dir = "$root_out_dir/breakpad_symbols"
dsym_file = "$root_out_dir/$electron_helper_name${_helper_suffix}.dSYM/Contents/Resources/DWARF/$electron_helper_name${_helper_suffix}"
2020-01-17 21:41:52 +03:00
deps = [ ":electron_helper_app_${_helper_target}" ]
2019-07-19 18:02:43 +03:00
}
2019-07-05 20:38:30 +03:00
}
extract_symbols("electron_app_syms") {
binary = "$root_out_dir/$electron_product_name.app/Contents/MacOS/$electron_product_name"
symbol_dir = "$root_out_dir/breakpad_symbols"
dsym_file = "$root_out_dir/$electron_product_name.dSYM/Contents/Resources/DWARF/$electron_product_name"
2020-01-17 21:41:52 +03:00
deps = [ ":electron_app" ]
2019-07-05 20:38:30 +03:00
}
2022-04-23 01:36:22 +03:00
extract_symbols("egl_syms") {
2022-04-26 00:00:32 +03:00
binary = "$root_out_dir/libEGL.dylib"
2019-07-05 20:38:30 +03:00
symbol_dir = "$root_out_dir/breakpad_symbols"
2022-04-23 01:36:22 +03:00
dsym_file = "$root_out_dir/libEGL.dylib.dSYM/Contents/Resources/DWARF/libEGL.dylib"
deps = [ "//third_party/angle:libEGL" ]
2019-07-05 20:38:30 +03:00
}
2022-04-23 01:36:22 +03:00
extract_symbols("gles_syms") {
binary = "$root_out_dir/libGLESv2.dylib"
2019-07-05 20:38:30 +03:00
symbol_dir = "$root_out_dir/breakpad_symbols"
2022-04-23 01:36:22 +03:00
dsym_file = "$root_out_dir/libGLESv2.dylib.dSYM/Contents/Resources/DWARF/libGLESv2.dylib"
deps = [ "//third_party/angle:libGLESv2" ]
2019-07-05 20:38:30 +03:00
}
extract_symbols("crashpad_handler_syms") {
2020-05-13 23:54:40 +03:00
binary = "$root_out_dir/chrome_crashpad_handler"
2019-07-05 20:38:30 +03:00
symbol_dir = "$root_out_dir/breakpad_symbols"
2020-05-13 23:54:40 +03:00
dsym_file = "$root_out_dir/chrome_crashpad_handler.dSYM/Contents/Resources/DWARF/chrome_crashpad_handler"
deps = [ "//components/crash/core/app:chrome_crashpad_handler" ]
2019-07-05 20:38:30 +03:00
}
group("electron_symbols") {
deps = [
2022-04-23 01:36:22 +03:00
":egl_syms",
2019-07-05 20:38:30 +03:00
":electron_app_syms",
":electron_framework_syms",
2022-04-23 01:36:22 +03:00
":gles_syms",
2019-07-05 20:38:30 +03:00
]
2019-07-19 18:02:43 +03:00
2020-06-17 00:19:57 +03:00
if (!is_mas_build) {
deps += [ ":crashpad_handler_syms" ]
}
2019-07-19 18:02:43 +03:00
foreach(helper_params, content_mac_helpers) {
_helper_target = helper_params[0]
deps += [ ":electron_helper_syms_${_helper_target}" ]
}
2019-07-05 20:38:30 +03:00
}
} else {
group("electron_symbols") {
}
}
2018-06-29 00:58:43 +03:00
} else {
windows_manifest("electron_app_manifest") {
sources = [
2019-06-19 23:46:59 +03:00
"shell/browser/resources/win/disable_window_filtering.manifest",
"shell/browser/resources/win/dpi_aware.manifest",
2018-06-29 00:58:43 +03:00
as_invoker_manifest,
common_controls_manifest,
default_compatibility_manifest,
]
}
2018-05-16 22:51:11 +03:00
executable("electron_app") {
output_name = electron_project_name
2022-01-17 10:46:33 +03:00
if (is_win) {
sources = [ "shell/app/electron_main_win.cc" ]
} else if (is_linux) {
sources = [
"shell/app/electron_main_linux.cc",
"shell/app/uv_stdio_fix.cc",
"shell/app/uv_stdio_fix.h",
]
}
2018-05-16 22:51:11 +03:00
include_dirs = [ "." ]
deps = [
2019-02-05 23:10:15 +03:00
":default_app_asar",
2018-06-29 00:58:43 +03:00
":electron_app_manifest",
2018-05-16 22:51:11 +03:00
":electron_lib",
2022-10-25 09:44:43 +03:00
":electron_win32_resources",
2018-07-25 23:28:10 +03:00
":packed_resources",
2020-05-07 23:31:26 +03:00
"//components/crash/core/app",
2018-06-29 00:58:43 +03:00
"//content:sandbox_helper_win",
2019-03-05 08:08:55 +03:00
"//electron/buildflags",
2024-11-08 06:20:50 +03:00
"//third_party/electron_node:node_lib",
2018-07-31 01:55:41 +03:00
"//ui/strings",
2018-05-16 22:51:11 +03:00
]
2018-06-29 00:58:43 +03:00
2018-08-21 20:06:28 +03:00
data = []
2021-08-24 03:52:17 +03:00
data_deps = []
2018-08-21 20:06:28 +03:00
data += [ "$root_out_dir/resources.pak" ]
data += [ "$root_out_dir/chrome_100_percent.pak" ]
if (enable_hidpi) {
data += [ "$root_out_dir/chrome_200_percent.pak" ]
}
2022-02-25 21:17:35 +03:00
foreach(locale, platform_pak_locales) {
2018-08-21 20:06:28 +03:00
data += [ "$root_out_dir/locales/$locale.pak" ]
}
if (!is_mac) {
2018-09-22 04:29:55 +03:00
data += [ "$root_out_dir/resources/default_app.asar" ]
2018-08-21 20:06:28 +03:00
}
2020-07-06 21:11:48 +03:00
if (use_v8_context_snapshot) {
public_deps = [ "//tools/v8_context_snapshot:v8_context_snapshot" ]
}
2018-06-29 00:58:43 +03:00
2021-08-24 03:52:17 +03:00
if (is_linux) {
data_deps += [ "//components/crash/core/app:chrome_crashpad_handler" ]
}
2018-06-29 00:58:43 +03:00
if (is_win) {
sources += [
2022-10-25 09:44:43 +03:00
"$target_gen_dir/win-resources/electron.rc",
2019-06-19 23:46:59 +03:00
"shell/browser/resources/win/resource.h",
2018-06-29 00:58:43 +03:00
]
2020-05-07 23:31:26 +03:00
deps += [
2023-03-10 19:07:42 +03:00
"//chrome/app:exit_code_watcher",
2020-05-07 23:31:26 +03:00
"//components/crash/core/app:run_as_crashpad_handler",
]
2020-09-12 09:01:41 +03:00
ldflags = []
2018-06-29 00:58:43 +03:00
libs = [
2018-07-12 23:26:17 +03:00
"comctl32.lib",
2018-06-29 00:58:43 +03:00
"uiautomationcore.lib",
2018-07-12 23:26:17 +03:00
"wtsapi32.lib",
2018-06-29 00:58:43 +03:00
]
2020-10-05 20:10:38 +03:00
configs -= [ "//build/config/win:console" ]
2020-09-12 09:01:41 +03:00
configs += [
"//build/config/win:windowed",
"//build/config/win:delayloads",
2018-06-29 00:58:43 +03:00
]
2018-10-16 03:26:34 +03:00
2021-01-20 11:50:05 +03:00
if (current_cpu == "x86") {
# Set the initial stack size to 0.5MiB, instead of the 1.5MiB needed by
# Chrome's main thread. This saves significant memory on threads (like
# those in the Windows thread pool, and others) whose stack size we can
# only control through this setting. Because Chrome's main thread needs
# a minimum 1.5 MiB stack, the main thread (in 32-bit builds only) uses
# fibers to switch to a 1.5 MiB stack before running any other code.
ldflags += [ "/STACK:0x80000" ]
} else {
# Increase the initial stack size. The default is 1MB, this is 8MB.
ldflags += [ "/STACK:0x800000" ]
}
2018-10-16 03:26:34 +03:00
# This is to support renaming of electron.exe. node-gyp has hard-coded
# executable names which it will recognise as node. This module definition
# file claims that the electron executable is in fact named "node.exe",
# which is one of the executable names that node-gyp recognizes.
# See https://github.com/nodejs/node-gyp/commit/52ceec3a6d15de3a8f385f43dbe5ecf5456ad07a
ldflags += [ "/DEF:" + rebase_path("build/electron.def", root_build_dir) ]
inputs = [
2020-04-14 02:07:27 +03:00
"shell/browser/resources/win/electron.ico",
2018-10-16 03:26:34 +03:00
"build/electron.def",
]
2018-06-29 00:58:43 +03:00
}
2018-07-31 01:46:04 +03:00
if (is_linux) {
2020-08-11 13:17:18 +03:00
ldflags = [
"-pie",
# Required for exporting all symbols of libuv.
"-Wl,--whole-archive",
"obj/third_party/electron_node/deps/uv/libuv.a",
"-Wl,--no-whole-archive",
]
2018-10-04 17:10:48 +03:00
2018-07-31 01:46:04 +03:00
if (!is_component_build && is_component_ffmpeg) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
2022-04-27 09:14:59 +03:00
if (is_linux) {
deps += [ "//sandbox/linux:chrome_sandbox" ]
}
2018-07-31 01:46:04 +03:00
}
2018-05-16 22:51:11 +03:00
}
2019-07-05 20:38:30 +03:00
if (is_official_build) {
if (is_linux) {
_target_executable_suffix = ""
_target_shared_library_suffix = ".so"
} else if (is_win) {
_target_executable_suffix = ".exe"
_target_shared_library_suffix = ".dll"
}
extract_symbols("electron_app_symbols") {
binary = "$root_out_dir/$electron_project_name$_target_executable_suffix"
symbol_dir = "$root_out_dir/breakpad_symbols"
2020-01-17 21:41:52 +03:00
deps = [ ":electron_app" ]
2019-07-05 20:38:30 +03:00
}
2022-04-23 01:36:22 +03:00
extract_symbols("egl_symbols") {
binary = "$root_out_dir/libEGL$_target_shared_library_suffix"
2019-07-05 20:38:30 +03:00
symbol_dir = "$root_out_dir/breakpad_symbols"
2022-04-23 01:36:22 +03:00
deps = [ "//third_party/angle:libEGL" ]
2019-07-05 20:38:30 +03:00
}
2022-04-23 01:36:22 +03:00
extract_symbols("gles_symbols") {
binary = "$root_out_dir/libGLESv2$_target_shared_library_suffix"
2019-07-05 20:38:30 +03:00
symbol_dir = "$root_out_dir/breakpad_symbols"
2022-04-23 01:36:22 +03:00
deps = [ "//third_party/angle:libGLESv2" ]
2019-07-05 20:38:30 +03:00
}
group("electron_symbols") {
deps = [
2022-04-23 01:36:22 +03:00
":egl_symbols",
2019-07-05 20:38:30 +03:00
":electron_app_symbols",
2022-04-23 01:36:22 +03:00
":gles_symbols",
2019-07-05 20:38:30 +03:00
]
}
}
2018-05-16 22:51:11 +03:00
}
2018-08-18 01:28:00 +03:00
2018-08-21 20:06:28 +03:00
template("dist_zip") {
_runtime_deps_target = "${target_name}__deps"
_runtime_deps_file =
2018-08-29 11:39:47 +03:00
"$root_out_dir/gen.runtime/" + get_label_info(target_name, "dir") + "/" +
2018-08-21 20:06:28 +03:00
get_label_info(target_name, "name") + ".runtime_deps"
group(_runtime_deps_target) {
2018-08-29 11:39:47 +03:00
forward_variables_from(invoker,
[
"deps",
"data_deps",
"data",
2019-05-01 03:18:22 +03:00
"testonly",
2018-08-29 11:39:47 +03:00
])
2018-08-21 20:06:28 +03:00
write_runtime_deps = _runtime_deps_file
}
action(target_name) {
script = "//electron/build/zip.py"
2020-01-17 21:41:52 +03:00
deps = [ ":$_runtime_deps_target" ]
2019-05-01 03:18:22 +03:00
forward_variables_from(invoker,
[
"outputs",
"testonly",
])
2019-10-31 23:11:51 +03:00
flatten = false
2021-05-22 21:48:38 +03:00
flatten_relative_to = false
2019-10-31 23:11:51 +03:00
if (defined(invoker.flatten)) {
flatten = invoker.flatten
2021-05-22 21:48:38 +03:00
if (defined(invoker.flatten_relative_to)) {
flatten_relative_to = invoker.flatten_relative_to
}
2019-10-31 23:11:51 +03:00
}
2018-08-29 11:39:47 +03:00
args = rebase_path(outputs + [ _runtime_deps_file ], root_build_dir) + [
target_cpu,
target_os,
2019-10-31 23:11:51 +03:00
"$flatten",
2021-05-22 21:48:38 +03:00
"$flatten_relative_to",
2018-08-29 11:39:47 +03:00
]
2018-08-21 20:06:28 +03:00
}
}
copy("electron_license") {
2020-01-17 21:41:52 +03:00
sources = [ "LICENSE" ]
outputs = [ "$root_build_dir/{{source_file_part}}" ]
2018-08-21 20:06:28 +03:00
}
copy("chromium_licenses") {
2020-01-17 21:41:52 +03:00
deps = [ "//components/resources:about_credits" ]
sources = [ "$root_gen_dir/components/resources/about_credits.html" ]
outputs = [ "$root_build_dir/LICENSES.chromium.html" ]
2018-08-21 20:06:28 +03:00
}
group("licenses") {
2018-08-29 11:39:47 +03:00
data_deps = [
":chromium_licenses",
2020-01-17 21:41:52 +03:00
":electron_license",
2018-08-29 11:39:47 +03:00
]
2018-08-21 20:06:28 +03:00
}
dist_zip("electron_dist_zip") {
2018-08-29 11:39:47 +03:00
data_deps = [
":electron_app",
2022-10-25 09:44:43 +03:00
":electron_version_file",
2020-01-17 21:41:52 +03:00
":licenses",
2018-08-29 11:39:47 +03:00
]
2019-03-09 00:10:26 +03:00
if (is_linux) {
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
}
2022-02-08 21:03:33 +03:00
deps = data_deps
2020-01-17 21:41:52 +03:00
outputs = [ "$root_build_dir/dist.zip" ]
2018-08-21 20:06:28 +03:00
}
2018-09-20 21:10:10 +03:00
dist_zip("electron_ffmpeg_zip") {
2020-01-17 21:41:52 +03:00
data_deps = [ "//third_party/ffmpeg" ]
2022-02-08 21:03:33 +03:00
deps = data_deps
2020-01-17 21:41:52 +03:00
outputs = [ "$root_build_dir/ffmpeg.zip" ]
2018-09-20 21:10:10 +03:00
}
2020-02-05 10:02:02 +03:00
electron_chromedriver_deps = [
":licenses",
2022-11-17 22:59:23 +03:00
"//chrome/test/chromedriver:chromedriver_server",
2020-02-05 10:02:02 +03:00
"//electron/buildflags",
]
group("electron_chromedriver") {
testonly = true
public_deps = electron_chromedriver_deps
}
2018-09-20 01:42:42 +03:00
dist_zip("electron_chromedriver_zip") {
2019-05-01 03:18:22 +03:00
testonly = true
2020-02-05 10:02:02 +03:00
data_deps = electron_chromedriver_deps
2022-02-08 21:03:33 +03:00
deps = data_deps
2020-01-17 21:41:52 +03:00
outputs = [ "$root_build_dir/chromedriver.zip" ]
2018-09-20 01:42:42 +03:00
}
2019-11-28 03:29:53 +03:00
mksnapshot_deps = [
":licenses",
"//v8:mksnapshot($v8_snapshot_toolchain)",
]
2020-07-06 21:11:48 +03:00
if (use_v8_context_snapshot) {
mksnapshot_deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_generator($v8_snapshot_toolchain)" ]
}
2019-11-28 03:29:53 +03:00
group("electron_mksnapshot") {
public_deps = mksnapshot_deps
}
2018-09-25 04:48:49 +03:00
dist_zip("electron_mksnapshot_zip") {
2019-11-28 03:29:53 +03:00
data_deps = mksnapshot_deps
2022-02-08 21:03:33 +03:00
deps = data_deps
2020-01-17 21:41:52 +03:00
outputs = [ "$root_build_dir/mksnapshot.zip" ]
2018-09-25 04:48:49 +03:00
}
2019-10-31 23:11:51 +03:00
copy("hunspell_dictionaries") {
sources = hunspell_dictionaries + hunspell_licenses
2020-01-17 21:41:52 +03:00
outputs = [ "$target_gen_dir/electron_hunspell/{{source_file_part}}" ]
2019-10-31 23:11:51 +03:00
}
dist_zip("hunspell_dictionaries_zip") {
2020-01-17 21:41:52 +03:00
data_deps = [ ":hunspell_dictionaries" ]
2022-02-08 21:03:33 +03:00
deps = data_deps
2019-10-31 23:11:51 +03:00
flatten = true
2020-01-17 21:41:52 +03:00
outputs = [ "$root_build_dir/hunspell_dictionaries.zip" ]
2019-10-31 23:11:51 +03:00
}
2021-05-22 21:48:38 +03:00
copy("libcxx_headers") {
2024-04-12 17:50:03 +03:00
sources = libcxx_headers + libcxx_licenses + [
"//buildtools/third_party/libc++/__assertion_handler",
"//buildtools/third_party/libc++/__config_site",
]
2021-05-22 21:48:38 +03:00
outputs = [ "$target_gen_dir/electron_libcxx_include/{{source_root_relative_dir}}/{{source_file_part}}" ]
}
dist_zip("libcxx_headers_zip") {
data_deps = [ ":libcxx_headers" ]
2022-02-08 21:03:33 +03:00
deps = data_deps
2021-05-22 21:48:38 +03:00
flatten = true
2023-08-15 18:49:41 +03:00
flatten_relative_to =
rebase_path(
"$target_gen_dir/electron_libcxx_include/third_party/libc++/src",
2021-05-22 21:48:38 +03:00
"$root_out_dir")
outputs = [ "$root_build_dir/libcxx_headers.zip" ]
}
copy("libcxxabi_headers") {
sources = libcxxabi_headers + libcxxabi_licenses
outputs = [ "$target_gen_dir/electron_libcxxabi_include/{{source_root_relative_dir}}/{{source_file_part}}" ]
}
dist_zip("libcxxabi_headers_zip") {
data_deps = [ ":libcxxabi_headers" ]
2022-02-08 21:03:33 +03:00
deps = data_deps
2021-05-22 21:48:38 +03:00
flatten = true
flatten_relative_to = rebase_path(
2023-08-15 18:49:41 +03:00
"$target_gen_dir/electron_libcxxabi_include/third_party/libc++abi/src",
2021-05-22 21:48:38 +03:00
"$root_out_dir")
outputs = [ "$root_build_dir/libcxxabi_headers.zip" ]
}
2021-05-24 03:10:54 +03:00
action("libcxx_objects_zip") {
2021-05-22 21:48:38 +03:00
deps = [ "//buildtools/third_party/libc++" ]
script = "build/zip_libcxx.py"
outputs = [ "$root_build_dir/libcxx_objects.zip" ]
args = rebase_path(outputs)
}
2018-08-21 20:06:28 +03:00
group("electron") {
2020-01-17 21:41:52 +03:00
public_deps = [ ":electron_app" ]
2018-08-21 20:06:28 +03:00
}
2023-08-22 12:13:49 +03:00
##### node_headers
node_dir = "../third_party/electron_node"
node_files = read_file("$node_dir/filenames.json", "json")
node_headers_dir = "$root_gen_dir/node_headers"
header_group_index = 0
header_groups = []
foreach(header_group, node_files.headers) {
copy("node_headers_${header_group_index}") {
sources = rebase_path(header_group.files, ".", node_dir)
outputs =
[ "$node_headers_dir/${header_group.dest_dir}/{{source_file_part}}" ]
}
header_groups += [ ":node_headers_${header_group_index}" ]
header_group_index += 1
}
copy("zlib_headers") {
sources = [
"$node_dir/deps/zlib/zconf.h",
"$node_dir/deps/zlib/zlib.h",
]
outputs = [ "$node_headers_dir/include/node/{{source_file_part}}" ]
}
copy("node_gypi_headers") {
deps = [ ":generate_config_gypi" ]
sources = [
"$node_dir/common.gypi",
"$root_gen_dir/config.gypi",
]
outputs = [ "$node_headers_dir/include/node/{{source_file_part}}" ]
}
action("node_version_header") {
inputs = [ "$node_dir/src/node_version.h" ]
outputs = [ "$node_headers_dir/include/node/node_version.h" ]
2024-10-29 15:22:26 +03:00
script = "script/node/generate_node_version_header.py"
2023-08-22 12:13:49 +03:00
args = rebase_path(inputs) + rebase_path(outputs)
if (node_module_version != "") {
args += [ "$node_module_version" ]
}
}
action("tar_node_headers") {
deps = [ ":copy_node_headers" ]
outputs = [ "$root_gen_dir/node_headers.tar.gz" ]
script = "script/tar.py"
args = [
rebase_path("$root_gen_dir/node_headers"),
rebase_path(outputs[0]),
]
}
group("copy_node_headers") {
public_deps = header_groups + [
":node_gypi_headers",
":node_version_header",
":zlib_headers",
]
}
group("node_headers") {
public_deps = [ ":tar_node_headers" ]
}