🎨 Per app arch support

This commit is contained in:
Nikhil Badyal
2023-08-05 17:49:40 +05:30
parent f419e0e36f
commit b93b8a915d
4 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -215,6 +215,7 @@ By default, script build the version as recommended by Revanced team.
YOUTUBE_MUSIC_PATCHES_DL=https://github.com/inotia00/revanced-patches/releases/latest
YOUTUBE_MUSIC_CLI_DL=https://github.com/inotia00/revanced-cli/releases/latest
YOUTUBE_MUSIC_KEYSTORE_FILE_NAME=key.store
YOUTUBE_MUSIC_ARCHS_TO_BUILD=arm64-v8a,armeabi-v7a
```
These link if not from GitHub must be direct download links.
7. You can also provide a default resources which will be used when per app config is missing.
@@ -280,10 +281,10 @@ By default, script build the version as recommended by Revanced team.
12. You can build only for a particular arch in order to get smaller apk files.This can be done with by adding comma
separated `ARCHS_TO_BUILD` in `ENVS` in `GitHub secrets` (Recommended) in the format.
```dotenv
ARCHS_TO_BUILD=arm64-v8a,armeabi-v7a
GLOABAL_ARCHS_TO_BUILD=arm64-v8a,armeabi-v7a
```
Possible values for `ARCHS_TO_BUILD` are: `armeabi-v7a`,`x86`,`x86_64`,`arm64-v8a`
Make sure you are using `revanced-extended` as `revanced` doesn't support this.
Make sure the patching resource support this.
13. You can scan your built apks files with VirusTotal. For that, Add `VT_API_KEY` in `GitHub secrets`.
14. Configuration defined in `ENVS` in `GitHub secrets` will override the configuration in `.env` file. You can use this
fact to define your normal configurations in `.env` file and sometimes if you want to build something different just
+3
View File
@@ -32,6 +32,9 @@ class APP(object):
self.keystore_name = config.env.str(
f"{app_name}_KEYSTORE_FILE_NAME".upper(), config.global_keystore_name
)
self.archs_to_build = config.env.list(
f"{app_name}_ARCHS_TO_BUILD".upper(), config.global_archs_to_build
)
self.download_patch_resources(config)
def get_output_file_name(self) -> str:
+1 -1
View File
@@ -75,7 +75,7 @@ class RevancedConfig(object):
key: value + value.split("/")[-2]
for key, value in self.apk_mirror_urls.items()
}
self.archs_to_build = env.list("ARCHS_TO_BUILD", [])
self.global_archs_to_build = env.list("GLOBAL_ARCHS_TO_BUILD", [])
self.alternative_youtube_patches = env.list("ALTERNATIVE_YOUTUBE_PATCHES", [])
self.alternative_youtube_music_patches = env.list(
"ALTERNATIVE_YOUTUBE_MUSIC_PATCHES", []
+1 -1
View File
@@ -102,7 +102,7 @@ class Parser(object):
if self._PATCHES:
args.extend(self._PATCHES)
if app.app_name in self.config.rip_libs_apps:
excluded = set(possible_archs) - set(self.config.archs_to_build)
excluded = set(possible_archs) - set(app.archs_to_build)
for arch in excluded:
args.append("--rip-lib")
args.append(arch)