diff --git a/docs/Frequently Asked Questions.md b/docs/Frequently Asked Questions.md index c9dbdb9..7bbb61b 100644 --- a/docs/Frequently Asked Questions.md +++ b/docs/Frequently Asked Questions.md @@ -39,6 +39,14 @@ You should open the folder `Revanced-And-Revanced-Extended-Non-Root/src/patches/ You should open the folder [Revanced-And-Revanced-Extended-Non-Root/src/options/](../src/options). It contains files revanced.json, ReX.json... edit those file the same as you would options.json +Revanced CLI version 5 no longer use options.json anymore use directly `Revanced-And-Revanced-Extended-Non-Root/src/patches/` instead. + +The options separate with patches name with `|` + +Example Youtube apps include patches: + +`Custom branding|-OappName="YouTube ReVanced" -OiconPath=ReVanced*Logo` + --- ### Q: I am facing errors using your apps, what do I do? diff --git a/src/build/utils.sh b/src/build/utils.sh index 014622a..355e8fb 100644 --- a/src/build/utils.sh +++ b/src/build/utils.sh @@ -99,9 +99,14 @@ get_patches_key() { excludePatches+=" -d \"$line1\"" excludeLinesFound=true done < src/patches/$1/exclude-patches - while IFS= read -r line2; do - includePatches+=" -e \"$line2\"" + if [[ "$line2" == *"|"* ]]; then + patch_name="${line2%%|*}" + options="${line2#*|}" + includePatches+=" -e \"${patch_name}\" ${options}" + else + includePatches+=" -e \"$line2\"" + fi includeLinesFound=true done < src/patches/$1/include-patches else diff --git a/src/options/revanced.json b/src/options/revanced.json deleted file mode 100644 index 8e58bf9..0000000 --- a/src/options/revanced.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "patchName" : "Custom branding", - "options" : [ { - "key" : "appName", - "value" : "ReVanced" - } ] - } -] \ No newline at end of file diff --git a/src/patches/youtube-revanced/include-patches b/src/patches/youtube-revanced/include-patches index fcc012e..f44083c 100644 --- a/src/patches/youtube-revanced/include-patches +++ b/src/patches/youtube-revanced/include-patches @@ -1 +1 @@ -Custom branding +Custom branding|-OappName="YouTube ReVanced" -OiconPath=ReVanced*Logo