mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-04-29 22:24:34 +02:00
added patcher-args option
This commit is contained in:
parent
0934135a2d
commit
828160801d
@ -27,6 +27,7 @@ patches-version = "v2.160.0" # 'latest', 'dev', or a version number. default: "l
|
|||||||
[Some-App]
|
[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.
|
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
|
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
|
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
|
# '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
|
# 'latest' gets the latest stable without checking patches support. 'beta' gets the latest beta/alpha
|
||||||
|
1
build.sh
1
build.sh
@ -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[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[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[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[table]=$table_name
|
||||||
app_args[build_mode]=$(toml_get "$t" build-mode) && {
|
app_args[build_mode]=$(toml_get "$t" build-mode) && {
|
||||||
if ! isoneof "${app_args[build_mode]}" both apk module; then
|
if ! isoneof "${app_args[build_mode]}" both apk module; then
|
||||||
|
4
utils.sh
4
utils.sh
@ -437,7 +437,8 @@ build_rv() {
|
|||||||
local arch_f="${arch// /}"
|
local arch_f="${arch// /}"
|
||||||
|
|
||||||
local p_patcher_args=()
|
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")
|
[ "${args[exclusive_patches]}" = true ] && p_patcher_args+=("--exclusive")
|
||||||
|
|
||||||
local tried_dl=()
|
local tried_dl=()
|
||||||
@ -520,6 +521,7 @@ build_rv() {
|
|||||||
local patcher_args patched_apk build_mode
|
local patcher_args patched_apk build_mode
|
||||||
local rv_brand_f=${args[rv_brand],,}
|
local rv_brand_f=${args[rv_brand],,}
|
||||||
rv_brand_f=${rv_brand_f// /-}
|
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
|
for build_mode in "${build_mode_arr[@]}"; do
|
||||||
patcher_args=("${p_patcher_args[@]}")
|
patcher_args=("${p_patcher_args[@]}")
|
||||||
pr "Building '${table}' in '$build_mode' mode"
|
pr "Building '${table}' in '$build_mode' mode"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user