Skip to content

Commit

Permalink
Fix compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Oct 25, 2024
1 parent 4b1d4e7 commit 2b93dd4
Show file tree
Hide file tree
Showing 13 changed files with 164 additions and 38 deletions.
2 changes: 2 additions & 0 deletions build/commands/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 47 additions & 3 deletions ios/app/resources/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="0" current_release="1" output_all_resource_defines="false">
<outputs>
<output filename="grit/brave_ios_components_resources.h" type="rc_header">
<output filename="grit/brave_ios_resources.h" type="rc_header">
<emit emit_type='prepend'></emit>
</output>
<output filename="brave_ios_components_static.pak" type="data_package" />
<output filename="brave_ios_resources_static.pak" type="data_package" />
</outputs>
<release seq="1">
<includes>
Expand Down
100 changes: 100 additions & 0 deletions ios/app/resources/brave_ios_strings.grd
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="0" current_release="1" output_all_resource_defines="false" source_lang_id="en">
<outputs>
<output filename="grit/brave_ios_strings.h" type="rc_header">
<emit emit_type='prepend'></emit>
</output>
<output filename="brave_ios_strings_af.pak" type="data_package" lang="af" />
<output filename="brave_ios_strings_am.pak" type="data_package" lang="am" />
<output filename="brave_ios_strings_ar.pak" type="data_package" lang="ar" />
<output filename="brave_ios_strings_as.pak" type="data_package" lang="as" />
<output filename="brave_ios_strings_az.pak" type="data_package" lang="az" />
<output filename="brave_ios_strings_be.pak" type="data_package" lang="be" />
<output filename="brave_ios_strings_bg.pak" type="data_package" lang="bg" />
<output filename="brave_ios_strings_bn.pak" type="data_package" lang="bn" />
<output filename="brave_ios_strings_bs.pak" type="data_package" lang="bs" />
<output filename="brave_ios_strings_ca.pak" type="data_package" lang="ca" />
<output filename="brave_ios_strings_cs.pak" type="data_package" lang="cs" />
<output filename="brave_ios_strings_cy.pak" type="data_package" lang="cy" />
<output filename="brave_ios_strings_da.pak" type="data_package" lang="da" />
<output filename="brave_ios_strings_de.pak" type="data_package" lang="de" />
<output filename="brave_ios_strings_el.pak" type="data_package" lang="el" />
<output filename="brave_ios_strings_en-GB.pak" type="data_package" lang="en-GB" />
<output filename="brave_ios_strings_en-US.pak" type="data_package" lang="en" />
<output filename="brave_ios_strings_es.pak" type="data_package" lang="es" />
<output filename="brave_ios_strings_es-MX.pak" type="data_package" lang="es-419" />
<output filename="brave_ios_strings_et.pak" type="data_package" lang="et" />
<output filename="brave_ios_strings_eu.pak" type="data_package" lang="eu" />
<output filename="brave_ios_strings_fa.pak" type="data_package" lang="fa" />
<output filename="brave_ios_strings_fi.pak" type="data_package" lang="fi" />
<output filename="brave_ios_strings_fil.pak" type="data_package" lang="fil" />
<output filename="brave_ios_strings_fr.pak" type="data_package" lang="fr" />
<output filename="brave_ios_strings_fr-CA.pak" type="data_package" lang="fr-CA" />
<output filename="brave_ios_strings_gl.pak" type="data_package" lang="gl" />
<output filename="brave_ios_strings_gu.pak" type="data_package" lang="gu" />
<output filename="brave_ios_strings_he.pak" type="data_package" lang="he" />
<output filename="brave_ios_strings_hi.pak" type="data_package" lang="hi" />
<output filename="brave_ios_strings_hr.pak" type="data_package" lang="hr" />
<output filename="brave_ios_strings_hu.pak" type="data_package" lang="hu" />
<output filename="brave_ios_strings_hy.pak" type="data_package" lang="hy" />
<output filename="brave_ios_strings_id.pak" type="data_package" lang="id" />
<output filename="brave_ios_strings_it.pak" type="data_package" lang="it" />
<output filename="brave_ios_strings_is.pak" type="data_package" lang="is" />
<output filename="brave_ios_strings_ja.pak" type="data_package" lang="ja" />
<output filename="brave_ios_strings_ka.pak" type="data_package" lang="ka" />
<output filename="brave_ios_strings_kk.pak" type="data_package" lang="kk" />
<output filename="brave_ios_strings_km.pak" type="data_package" lang="km" />
<output filename="brave_ios_strings_kn.pak" type="data_package" lang="kn" />
<output filename="brave_ios_strings_ko.pak" type="data_package" lang="ko" />
<output filename="brave_ios_strings_ky.pak" type="data_package" lang="ky" />
<output filename="brave_ios_strings_lo.pak" type="data_package" lang="lo" />
<output filename="brave_ios_strings_lt.pak" type="data_package" lang="lt" />
<output filename="brave_ios_strings_lv.pak" type="data_package" lang="lv" />
<output filename="brave_ios_strings_mk.pak" type="data_package" lang="mk" />
<output filename="brave_ios_strings_ml.pak" type="data_package" lang="ml" />
<output filename="brave_ios_strings_mn.pak" type="data_package" lang="mn" />
<output filename="brave_ios_strings_mr.pak" type="data_package" lang="mr" />
<output filename="brave_ios_strings_ms.pak" type="data_package" lang="ms" />
<output filename="brave_ios_strings_my.pak" type="data_package" lang="my" />
<!-- The translation console uses 'no' for Norwegian Bokmål. It should
be 'nb'. -->
<output filename="brave_ios_strings_nb.pak" type="data_package" lang="no" />
<output filename="brave_ios_strings_ne.pak" type="data_package" lang="ne" />
<output filename="brave_ios_strings_nl.pak" type="data_package" lang="nl" />
<output filename="brave_ios_strings_or.pak" type="data_package" lang="or" />
<output filename="brave_ios_strings_pa.pak" type="data_package" lang="pa" />
<output filename="brave_ios_strings_pl.pak" type="data_package" lang="pl" />
<output filename="brave_ios_strings_pt.pak" type="data_package" lang="pt-BR" />
<output filename="brave_ios_strings_pt-PT.pak" type="data_package" lang="pt-PT" />
<output filename="brave_ios_strings_ro.pak" type="data_package" lang="ro" />
<output filename="brave_ios_strings_ru.pak" type="data_package" lang="ru" />
<output filename="brave_ios_strings_si.pak" type="data_package" lang="si" />
<output filename="brave_ios_strings_sk.pak" type="data_package" lang="sk" />
<output filename="brave_ios_strings_sl.pak" type="data_package" lang="sl" />
<output filename="brave_ios_strings_sq.pak" type="data_package" lang="sq" />
<output filename="brave_ios_strings_sr.pak" type="data_package" lang="sr" />
<output filename="brave_ios_strings_sr-Latn.pak" type="data_package" lang="sr-Latn" />
<output filename="brave_ios_strings_sv.pak" type="data_package" lang="sv" />
<output filename="brave_ios_strings_sw.pak" type="data_package" lang="sw" />
<output filename="brave_ios_strings_ta.pak" type="data_package" lang="ta" />
<output filename="brave_ios_strings_te.pak" type="data_package" lang="te" />
<output filename="brave_ios_strings_th.pak" type="data_package" lang="th" />
<output filename="brave_ios_strings_tr.pak" type="data_package" lang="tr" />
<output filename="brave_ios_strings_uk.pak" type="data_package" lang="uk" />
<output filename="brave_ios_strings_ur.pak" type="data_package" lang="ur" />
<output filename="brave_ios_strings_uz.pak" type="data_package" lang="uz" />
<output filename="brave_ios_strings_vi.pak" type="data_package" lang="vi" />
<output filename="brave_ios_strings_zh-CN.pak" type="data_package" lang="zh-CN" />
<output filename="brave_ios_strings_zh-HK.pak" type="data_package" lang="zh-HK" />
<output filename="brave_ios_strings_zh-TW.pak" type="data_package" lang="zh-TW" />
<output filename="brave_ios_strings_zu.pak" type="data_package" lang="zu" />
<!-- Pseudolocales -->
<output filename="brave_ios_strings_ar-XB.pak" type="data_package" lang="ar-XB" />
<output filename="brave_ios_strings_en-XA.pak" type="data_package" lang="en-XA" />
</outputs>
<release seq="1">
<messages fallback_to_english="true">
<!-- <part file="components_strings.grdp" />-->
</messages>
</release>
</grit>
File renamed without changes.
6 changes: 6 additions & 0 deletions ios/app/resources/components_ui/components.grdp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<grit-part>
<include name="IDR_COMPONENTS_COMPONENTS_HTML" file="components_ui/components.html" type="BINDATA" />
<include name="IDR_COMPONENTS_COMPONENTS_CSS" file="components_ui/components.css" type="BINDATA" />
<include name="IDR_COMPONENTS_COMPONENTS_JS" file="components_ui/components.js" type="BINDATA" />
</grit-part>
27 changes: 0 additions & 27 deletions ios/browser/components/resources/BUILD.gn

This file was deleted.

This file was deleted.

7 changes: 7 additions & 0 deletions resources/resource_ids.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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],
},
}

0 comments on commit 2b93dd4

Please sign in to comment.