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")
|
||||
|
||||
|
|
|
@ -51,6 +51,12 @@ RINGTONES = {"ave": "/home/ave/sans.mp3",
|
|||
ICONS = {"ave": "/home/ave/ctclogoave.png",
|
||||
"default": "/home/ave/ctclogo.png"}
|
||||
|
||||
# Custom dynamic icons, default = applied to all the ones not explicitly stated
|
||||
DYN_ICONS = {"ave": {"bg": "/home/ave/distokrepos/cutthecord/icons/bg.png",
|
||||
"fg": "/home/ave/distokrepos/cutthecord/icons/fg.png"},
|
||||
"default": {"bg": "/home/ave/dcbg.png",
|
||||
"fg": "/home/ave/dcfg.png"}}
|
||||
|
||||
# Custom app names, default = applied to all the ones not explicitly stated
|
||||
# Needs to be one word, __ gets replaced with space
|
||||
APP_NAMES = {"ave": "CutTheCord__Ave",
|
||||
|
|
Reference in a new issue