electron/patches/chromium/resource_file_conflict.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
2.9 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2018-09-20 17:30:26 -07:00
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Thu, 20 Sep 2018 17:48:59 -0700
Subject: resource_file_conflict.patch
Resolve conflict between //chrome's .pak files and //electron's. The paths
that chrome code hardcodes require that we generate resources at these
paths, but GN throws errors if there are multiple targets that generate the
same files.
This is due to the hardcoded names here:
https://chromium.googlesource.com/chromium/src/+/69.0.3497.106/ui/base/resource/resource_bundle.cc#780
and here:
https://chromium.googlesource.com/chromium/src/+/69.0.3497.106/ui/base/resource/resource_bundle_mac.mm#50
This isn't needed on Mac because resource files are copied into the app bundle,
and are built in `$root_out_dir/electron_repack` (while Chromium's resources
target `$root_out_dir/repack`), but on Windows and Linux, the resource files go
directly in `$root_out_dir`, and so they conflict.
We don't actually ever generate Chromium's resource paks, but without this
patch, GN refuses to generate the ninja files:
ERROR at //tools/grit/repack.gni:35:3: Duplicate output file.
action(_repack_target_name) {
^----------------------------
Two or more targets generate the same output:
chrome_100_percent.pak
This is can often be fixed by changing one of the target names, or by
setting an output_name on one of them.
Collisions:
//chrome:packed_resources_100_percent
//electron:packed_resources_100_percent
See //tools/grit/repack.gni:35:3: Collision.
action(_repack_target_name) {
^----------------------------
Some alternatives to this patch:
1. Refactor upstream in such a way that the "chrome" pak names were
configurable, for instance by adding a method to ResourceBundle::Delegate that
LoadChromeResources would check.
2. Pass a Delegate that overrides `GetPathForResourcePack`, check for the
`chrome_{100,200}_percent.pak` filenames, and rewrite them to
`electron_{100,200}_percent.pak`.
3. Initialize the resource bundle with DO_NOT_LOAD_COMMON_RESOURCES and load
the paks ourselves.
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
chore: bump chromium to 140.0.7301.0 (main) (#47747) * chore: bump chromium in DEPS to 140.0.7296.0 * chore: update patches * 6702959: Remove OwnedByWidgetPassKey usage from content analysis dialog tests | https://chromium-review.googlesource.com/c/chromium/src/+/6702959 * 6722750: Remove un-used `stream_id` argument for `AidaCodeComplete` | https://chromium-review.googlesource.com/c/chromium/src/+/6722750 * 6696478: Reland Reland [video pip] Add fade in/out animation to controls visibility changes | https://chromium-review.googlesource.com/c/chromium/src/+/6696478 * chore: update libc++-filenames * build: explicitly include cstdlib in Boyer-Moore patch * chore: bump chromium in DEPS to 140.0.7297.0 * chore: update patches * 6729537: [FPF] Pipe flag state from the browser to the renderer | https://chromium-review.googlesource.com/c/chromium/src/+/6729537 * 6727996: [Win] Detect pre-IPC crashes in sandboxed utility processes | https://chromium-review.googlesource.com/c/chromium/src/+/6727996 * 6707182: Move wtf/cross_thread_copier*.* to "blink" namespace | https://chromium-review.googlesource.com/c/chromium/src/+/6707182 * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 * chore: bump chromium in DEPS to 140.0.7299.0 * chore: update patches * chore: update main patches * build: reset the minimum macOS SDK to 15 to match upstream This reverts commit 499e987c777baac6f71f8bef2470055961143663. * 6730215: Remove IPC_MESSAGE_LOG_ENABLED ifdef blocks. | https://chromium-review.googlesource.com/c/chromium/src/+/6730215 * 6690442: Delete ppapi/buildflags/buildflags.h | https://chromium-review.googlesource.com/c/chromium/src/+/6690442 * [wip]: 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 * chore: bump chromium in DEPS to 140.0.7301.0 * chore: update patches * 6656309: extensions: Port proxy API to desktop Android | https://chromium-review.googlesource.com/c/chromium/src/+/6656309 * 6758510: Reland 'Move GN enable_plugins variable out of //ppapi' | https://chromium-review.googlesource.com/c/chromium/src/+/6758510 * 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 * 6735979: [FSA] Replace `request_writable` with a new enum `FileSystemAccessPermissionMode`. | https://chromium-review.googlesource.com/c/chromium/src/+/6735979 * 6712080: Reland "Turn on gender translation PAK generation everywhere" | https://chromium-review.googlesource.com/c/chromium/src/+/6712080 * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 * build: restore minimum macOS SDK to 10, restore patch This reverts commit a04c579b994d5f4a782b793a69f34ff7a260e74f. * fixup! 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 * chore: correct node patches * fixup! 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-21 09:32:53 -07:00
index cfdf42197c0855b63680e60e4b01f4624b201383..2fb245ad4daabdf430be1f593e73b2da90504419 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
chore: bump chromium to 140.0.7301.0 (main) (#47747) * chore: bump chromium in DEPS to 140.0.7296.0 * chore: update patches * 6702959: Remove OwnedByWidgetPassKey usage from content analysis dialog tests | https://chromium-review.googlesource.com/c/chromium/src/+/6702959 * 6722750: Remove un-used `stream_id` argument for `AidaCodeComplete` | https://chromium-review.googlesource.com/c/chromium/src/+/6722750 * 6696478: Reland Reland [video pip] Add fade in/out animation to controls visibility changes | https://chromium-review.googlesource.com/c/chromium/src/+/6696478 * chore: update libc++-filenames * build: explicitly include cstdlib in Boyer-Moore patch * chore: bump chromium in DEPS to 140.0.7297.0 * chore: update patches * 6729537: [FPF] Pipe flag state from the browser to the renderer | https://chromium-review.googlesource.com/c/chromium/src/+/6729537 * 6727996: [Win] Detect pre-IPC crashes in sandboxed utility processes | https://chromium-review.googlesource.com/c/chromium/src/+/6727996 * 6707182: Move wtf/cross_thread_copier*.* to "blink" namespace | https://chromium-review.googlesource.com/c/chromium/src/+/6707182 * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 * chore: bump chromium in DEPS to 140.0.7299.0 * chore: update patches * chore: update main patches * build: reset the minimum macOS SDK to 15 to match upstream This reverts commit 499e987c777baac6f71f8bef2470055961143663. * 6730215: Remove IPC_MESSAGE_LOG_ENABLED ifdef blocks. | https://chromium-review.googlesource.com/c/chromium/src/+/6730215 * 6690442: Delete ppapi/buildflags/buildflags.h | https://chromium-review.googlesource.com/c/chromium/src/+/6690442 * [wip]: 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 * chore: bump chromium in DEPS to 140.0.7301.0 * chore: update patches * 6656309: extensions: Port proxy API to desktop Android | https://chromium-review.googlesource.com/c/chromium/src/+/6656309 * 6758510: Reland 'Move GN enable_plugins variable out of //ppapi' | https://chromium-review.googlesource.com/c/chromium/src/+/6758510 * 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 * 6735979: [FSA] Replace `request_writable` with a new enum `FileSystemAccessPermissionMode`. | https://chromium-review.googlesource.com/c/chromium/src/+/6735979 * 6712080: Reland "Turn on gender translation PAK generation everywhere" | https://chromium-review.googlesource.com/c/chromium/src/+/6712080 * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 * build: restore minimum macOS SDK to 10, restore patch This reverts commit a04c579b994d5f4a782b793a69f34ff7a260e74f. * fixup! 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 * chore: correct node patches * fixup! 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-21 09:32:53 -07:00
@@ -1539,7 +1539,7 @@ if (is_chrome_branded && !is_android) {
}
}
-if (!is_android) {
+if (!is_android && !is_electron_build) {
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
chore: bump chromium to 140.0.7301.0 (main) (#47747) * chore: bump chromium in DEPS to 140.0.7296.0 * chore: update patches * 6702959: Remove OwnedByWidgetPassKey usage from content analysis dialog tests | https://chromium-review.googlesource.com/c/chromium/src/+/6702959 * 6722750: Remove un-used `stream_id` argument for `AidaCodeComplete` | https://chromium-review.googlesource.com/c/chromium/src/+/6722750 * 6696478: Reland Reland [video pip] Add fade in/out animation to controls visibility changes | https://chromium-review.googlesource.com/c/chromium/src/+/6696478 * chore: update libc++-filenames * build: explicitly include cstdlib in Boyer-Moore patch * chore: bump chromium in DEPS to 140.0.7297.0 * chore: update patches * 6729537: [FPF] Pipe flag state from the browser to the renderer | https://chromium-review.googlesource.com/c/chromium/src/+/6729537 * 6727996: [Win] Detect pre-IPC crashes in sandboxed utility processes | https://chromium-review.googlesource.com/c/chromium/src/+/6727996 * 6707182: Move wtf/cross_thread_copier*.* to "blink" namespace | https://chromium-review.googlesource.com/c/chromium/src/+/6707182 * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 * chore: bump chromium in DEPS to 140.0.7299.0 * chore: update patches * chore: update main patches * build: reset the minimum macOS SDK to 15 to match upstream This reverts commit 499e987c777baac6f71f8bef2470055961143663. * 6730215: Remove IPC_MESSAGE_LOG_ENABLED ifdef blocks. | https://chromium-review.googlesource.com/c/chromium/src/+/6730215 * 6690442: Delete ppapi/buildflags/buildflags.h | https://chromium-review.googlesource.com/c/chromium/src/+/6690442 * [wip]: 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 * chore: bump chromium in DEPS to 140.0.7301.0 * chore: update patches * 6656309: extensions: Port proxy API to desktop Android | https://chromium-review.googlesource.com/c/chromium/src/+/6656309 * 6758510: Reland 'Move GN enable_plugins variable out of //ppapi' | https://chromium-review.googlesource.com/c/chromium/src/+/6758510 * 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 * 6735979: [FSA] Replace `request_writable` with a new enum `FileSystemAccessPermissionMode`. | https://chromium-review.googlesource.com/c/chromium/src/+/6735979 * 6712080: Reland "Turn on gender translation PAK generation everywhere" | https://chromium-review.googlesource.com/c/chromium/src/+/6712080 * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 * build: restore minimum macOS SDK to 10, restore patch This reverts commit a04c579b994d5f4a782b793a69f34ff7a260e74f. * fixup! 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 * chore: correct node patches * fixup! 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-21 09:32:53 -07:00
@@ -1585,6 +1585,12 @@ repack("browser_tests_pak") {
chore: bump chromium to 135.0.7027.0 (main) (#45677) * chore: bump chromium in DEPS to 135.0.7021.0 * chore: bump chromium in DEPS to 135.0.7023.0 * chore: update patches * chore: gen-libc++-filenames.js * [Extensions] Add a BUILD.gn file for the chrome.system.display API. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6227347 * chore: bump chromium in DEPS to 135.0.7025.0 * fixup! [Extensions] Add a BUILD.gn file for the chrome.system.display API. * [DevTools] Add support for automatic workspace folders. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6275926 * Add UseCounter for potential PNA 2.0 breakage Refs https://chromium-review.googlesource.com/c/chromium/src/+/6259197 * Remove references to NavigationEntry/Controller in Zoom code. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6258070 * chore: update patches * Allow DevTools to record UmaHistogramMediumTimes Refs https://chromium-review.googlesource.com/c/chromium/src/+/6183713 * chore: update patches * [gpu] Remove unnecessary media_buildflags include Refs https://chromium-review.googlesource.com/c/chromium/src/+/6286526 * chore: bump chromium in DEPS to 135.0.7027.0 * chore: update patches * Remove type alias Refs https://chromium-review.googlesource.com/c/chromium/src/+/6280957 * [Refactor] Make ExtensionRegistrar a browser keyed service. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6285230 * Remove unused functions Refs https://chromium-review.googlesource.com/c/chromium/src/+/6278736 * chore: IWYU --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-02-21 14:46:51 -08:00
deps = [ "//chrome/test/data/webui:resources" ]
}
+if (is_electron_build) {
+ group("packed_resources") {
+ public_deps = [ "//electron:packed_resources" ]
+ }
+}
+
chore: bump chromium to 135.0.7027.0 (main) (#45677) * chore: bump chromium in DEPS to 135.0.7021.0 * chore: bump chromium in DEPS to 135.0.7023.0 * chore: update patches * chore: gen-libc++-filenames.js * [Extensions] Add a BUILD.gn file for the chrome.system.display API. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6227347 * chore: bump chromium in DEPS to 135.0.7025.0 * fixup! [Extensions] Add a BUILD.gn file for the chrome.system.display API. * [DevTools] Add support for automatic workspace folders. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6275926 * Add UseCounter for potential PNA 2.0 breakage Refs https://chromium-review.googlesource.com/c/chromium/src/+/6259197 * Remove references to NavigationEntry/Controller in Zoom code. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6258070 * chore: update patches * Allow DevTools to record UmaHistogramMediumTimes Refs https://chromium-review.googlesource.com/c/chromium/src/+/6183713 * chore: update patches * [gpu] Remove unnecessary media_buildflags include Refs https://chromium-review.googlesource.com/c/chromium/src/+/6286526 * chore: bump chromium in DEPS to 135.0.7027.0 * chore: update patches * Remove type alias Refs https://chromium-review.googlesource.com/c/chromium/src/+/6280957 * [Refactor] Make ExtensionRegistrar a browser keyed service. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6285230 * Remove unused functions Refs https://chromium-review.googlesource.com/c/chromium/src/+/6278736 * chore: IWYU --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-02-21 14:46:51 -08:00
group("strings") {
public_deps = [
"//chrome/app:branded_strings",