forked from distok/cutthecord
Dynamic icon support
This commit is contained in:
parent
deeb9f1f3c
commit
92e0511451
11 changed files with 506 additions and 3 deletions
|
@ -128,11 +128,35 @@ for patch_name in PATCHES:
|
|||
os.path.join(WORK_APK_PATH, "res",
|
||||
"mipmap-xxxhdpi", "logo_debug.png"))
|
||||
|
||||
if BRANCH in DYN_ICONS:
|
||||
shutil.copyfile(DYN_ICONS[BRANCH]["bg"],
|
||||
os.path.join(WORK_APK_PATH, "res",
|
||||
"mipmap-xxxhdpi",
|
||||
"ic_launcher_background.png"))
|
||||
shutil.copyfile(DYN_ICONS[BRANCH]["fg"],
|
||||
os.path.join(WORK_APK_PATH, "res",
|
||||
"mipmap-xxxhdpi",
|
||||
"ic_launcher_foreground.png"))
|
||||
elif "default" in ICONS:
|
||||
shutil.copyfile(DYN_ICONS["default"]["bg"],
|
||||
os.path.join(WORK_APK_PATH, "res",
|
||||
"mipmap-xxxhdpi",
|
||||
"ic_launcher_background.png"))
|
||||
shutil.copyfile(DYN_ICONS["default"]["fg"],
|
||||
os.path.join(WORK_APK_PATH, "res",
|
||||
"mipmap-xxxhdpi",
|
||||
"ic_launcher_foreground.png"))
|
||||
|
||||
patch_script = os.path.join(REPO_FOLDER, "patches",
|
||||
patch_name, "customicon.sh")
|
||||
|
||||
subprocess.run(f"bash {patch_script}", shell=True, cwd=WORK_APK_PATH)
|
||||
|
||||
patch_script = os.path.join(REPO_FOLDER, "patches",
|
||||
patch_name, "customdynamicicon.sh")
|
||||
|
||||
subprocess.run(f"bash {patch_script}", shell=True, cwd=WORK_APK_PATH)
|
||||
|
||||
patch_script = os.path.join(REPO_FOLDER, "patches",
|
||||
patch_name, "addpatch.py")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue