Skip to content

Commit

Permalink
added patcher-args option
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hc committed Nov 14, 2024
1 parent 0934135 commit 8281608
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ patches-version = "v2.160.0" # 'latest', 'dev', or a version number. default: "l
[Some-App]
app-name = "SomeApp" # if set, release name becomes SomeApp instead of Some-App. default is same as table name, which is 'Some-App' here.
enabled = true # whether to build the app. default: true
patcher-args = "-Okey=value" # optional args to be passed to cli. can be used to set patch options
version = "auto" # 'auto', 'latest', 'beta' or a version number (e.g. '17.40.41'). default: auto
# 'auto' option gets the latest possible version supported by all the included patches
# 'latest' gets the latest stable without checking patches support. 'beta' gets the latest beta/alpha
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ for table_name in $(toml_get_table_names); do
app_args[exclusive_patches]=$(toml_get "$t" exclusive-patches) && vtf "${app_args[exclusive_patches]}" "exclusive-patches" || app_args[exclusive_patches]=false
app_args[version]=$(toml_get "$t" version) || app_args[version]="auto"
app_args[app_name]=$(toml_get "$t" app-name) || app_args[app_name]=$table_name
app_args[patcher_args]=$(toml_get "$t" patcher-args) || app_args[patcher_args]=""
app_args[table]=$table_name
app_args[build_mode]=$(toml_get "$t" build-mode) && {
if ! isoneof "${app_args[build_mode]}" both apk module; then
Expand Down
4 changes: 3 additions & 1 deletion utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@ build_rv() {
local arch_f="${arch// /}"

local p_patcher_args=()
p_patcher_args+=("$(join_args "${args[excluded_patches]}" -d) $(join_args "${args[included_patches]}" -e)")
if [ "${args[excluded_patches]}" ]; then p_patcher_args+=("$(join_args "${args[excluded_patches]}" -d)"); fi
if [ "${args[included_patches]}" ]; then p_patcher_args+=("$(join_args "${args[included_patches]}" -e)"); fi
[ "${args[exclusive_patches]}" = true ] && p_patcher_args+=("--exclusive")

local tried_dl=()
Expand Down Expand Up @@ -520,6 +521,7 @@ build_rv() {
local patcher_args patched_apk build_mode
local rv_brand_f=${args[rv_brand],,}
rv_brand_f=${rv_brand_f// /-}
if [ "${args[patcher_args]}" ]; then p_patcher_args+=("${args[patcher_args]}"); fi
for build_mode in "${build_mode_arr[@]}"; do
patcher_args=("${p_patcher_args[@]}")
pr "Building '${table}' in '$build_mode' mode"
Expand Down

0 comments on commit 8281608

Please sign in to comment.