diff --git a/build/commands/lib/config.js b/build/commands/lib/config.js index c7de4a339a63..f26a81a8041e 100644 --- a/build/commands/lib/config.js +++ b/build/commands/lib/config.js @@ -693,9 +693,11 @@ Config.prototype.buildArgs = function () { args.ios_locales_pack_extra_source_patterns = [ "%root_gen_dir%/components/brave_components_strings_", + "%root_gen_dir%/brave/ios/app/resources/brave_ios_strings_", ] args.ios_locales_pack_extra_deps = [ "//brave/components/resources:strings", + "//brave/ios/app/resources:strings", ] delete args.safebrowsing_api_endpoint diff --git a/ios/app/resources/BUILD.gn b/ios/app/resources/BUILD.gn index e77fc5493fd0..deb46fc079db 100644 --- a/ios/app/resources/BUILD.gn +++ b/ios/app/resources/BUILD.gn @@ -3,6 +3,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. +import("//build/config/locales.gni") +import("//brave/resources/brave_grit.gni") import("//tools/grit/repack.gni") group("resources") { @@ -14,11 +16,53 @@ repack("repack_unscaled_resources") { output = "$target_gen_dir/brave_resources.pak" sources = [ "$root_gen_dir/components/brave_components_resources.pak", - "$root_gen_dir/brave/ios/browser/components/brave_ios_components_resources.pak", + "$root_gen_dir/brave/ios/app/resources/brave_ios_resources.pak", ] deps = [ - "//brave/components/resources", - "//brave/ios/browser/components/resources", + "//brave/components/resources", + ":ios_resources", ] copy_data_to_bundle = true } + + +## Packs our own separate resources and strings ## + +repack("ios_resources") { + + deps = [ + ":static_resources", + ] + sources = [ + "$root_gen_dir/brave/ios/app/resources/brave_ios_resources_static.pak", + ] + + output = "$root_gen_dir/brave/ios/app/resources/brave_ios_resources.pak" +} + +brave_grit("static_resources") { + + source = "brave_ios_resources.grd" + output_name = "brave_ios_resources_new" + + outputs = [ + "grit/brave_ios_resources.h", + "brave_ios_resources_static.pak", + ] + + deps = [ ":strings" ] + + output_dir = "$root_gen_dir/brave/ios/app/resources" +} + +brave_grit("strings") { + + source = "brave_ios_strings.grd" + outputs = [ "grit/brave_ios_strings.h" ] + + foreach(locale, all_chrome_locales) { + outputs += [ "brave_ios_strings_$locale.pak" ] + } + + output_dir = "$root_gen_dir/brave/ios/app/resources" +} \ No newline at end of file diff --git a/ios/browser/components/resources/components_resources.grd b/ios/app/resources/brave_ios_resources.grd similarity index 67% rename from ios/browser/components/resources/components_resources.grd rename to ios/app/resources/brave_ios_resources.grd index 69efbde03a49..2de3912ce67b 100644 --- a/ios/browser/components/resources/components_resources.grd +++ b/ios/app/resources/brave_ios_resources.grd @@ -1,10 +1,10 @@ - + - + diff --git a/ios/app/resources/brave_ios_strings.grd b/ios/app/resources/brave_ios_strings.grd new file mode 100644 index 000000000000..5c7994444485 --- /dev/null +++ b/ios/app/resources/brave_ios_strings.grd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/browser/components/resources/components_ui/BUILD.gn b/ios/app/resources/components_ui/BUILD.gn similarity index 100% rename from ios/browser/components/resources/components_ui/BUILD.gn rename to ios/app/resources/components_ui/BUILD.gn diff --git a/ios/browser/components/resources/components_ui/components.css b/ios/app/resources/components_ui/components.css similarity index 100% rename from ios/browser/components/resources/components_ui/components.css rename to ios/app/resources/components_ui/components.css diff --git a/ios/app/resources/components_ui/components.grdp b/ios/app/resources/components_ui/components.grdp new file mode 100644 index 000000000000..b3f3833e2995 --- /dev/null +++ b/ios/app/resources/components_ui/components.grdp @@ -0,0 +1,6 @@ + + + + + + diff --git a/ios/browser/components/resources/components_ui/components.html b/ios/app/resources/components_ui/components.html similarity index 100% rename from ios/browser/components/resources/components_ui/components.html rename to ios/app/resources/components_ui/components.html diff --git a/ios/browser/components/resources/components_ui/components.js b/ios/app/resources/components_ui/components.js similarity index 100% rename from ios/browser/components/resources/components_ui/components.js rename to ios/app/resources/components_ui/components.js diff --git a/ios/browser/components/resources/components_ui/components.ts b/ios/app/resources/components_ui/components.ts similarity index 100% rename from ios/browser/components/resources/components_ui/components.ts rename to ios/app/resources/components_ui/components.ts diff --git a/ios/browser/components/resources/BUILD.gn b/ios/browser/components/resources/BUILD.gn deleted file mode 100644 index 093a555403a3..000000000000 --- a/ios/browser/components/resources/BUILD.gn +++ /dev/null @@ -1,27 +0,0 @@ -import("//build/config/locales.gni") -import("//brave/resources/brave_grit.gni") -import("//tools/grit/repack.gni") - -repack("resources") { - deps = [ - ":static_resources", - ] - sources = [ - "$root_gen_dir/brave/ios/browser/components/brave_ios_components_static.pak", - ] - - output = "$root_gen_dir/brave/ios/browser/components/brave_ios_components_resources.pak" -} - -brave_grit("static_resources") { - source = "components_resources.grd" - - output_name = "brave_ios_components_resources_new" - - outputs = [ - "grit/brave_ios_components_resources.h", - "brave_ios_components_static.pak", - ] - - output_dir = "$root_gen_dir/brave/ios/browser/components" -} \ No newline at end of file diff --git a/ios/browser/components/resources/components_ui/components.grdp b/ios/browser/components/resources/components_ui/components.grdp deleted file mode 100644 index ddb7b8e9ab7f..000000000000 --- a/ios/browser/components/resources/components_ui/components.grdp +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/resources/resource_ids.spec b/resources/resource_ids.spec index cb319d1c0278..3279b37fc778 100644 --- a/resources/resource_ids.spec +++ b/resources/resource_ids.spec @@ -225,4 +225,11 @@ "META": {"sizes": {"includes": [10]}}, "includes": [64700], }, + "brave/ios/app/resources/brave_ios_resources.grd": { + "META": {"sizes": {"includes": [300]}}, + "includes": [64630], + }, + "brave/ios/app/resources/brave_ios_strings.grd": { + "messages": [64930], + }, }