Перенос resources и добавления assets в патч настроек
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
- `patches` Модули патчей
|
||||
- `utils` Вспомогательные модули
|
||||
- `tools` Инструменты для модификации
|
||||
- `patches/resources` Ресурсы, используемые патчами
|
||||
- `resources` Ресурсы, используемые патчами
|
||||
- `todo_drafts` Заметки для новых патчей(можно в любом формате)
|
||||
|
||||
### Схема
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ def compress_png_files(config):
|
||||
|
||||
|
||||
def remove_AI_voiceover(config):
|
||||
blank = "./patches/resources/blank.mp3"
|
||||
blank = "./resources/blank.mp3"
|
||||
path = "./decompiled/res/raw"
|
||||
files = [
|
||||
"reputation_1.mp3",
|
||||
|
||||
+7
-18
@@ -17,31 +17,20 @@ from utils.public import insert_after_public
|
||||
# Patch
|
||||
def apply(config: dict) -> bool:
|
||||
# Mod first launch window
|
||||
shutil.copy("./resources/avatar.png", "./decompiled/assets/avatar.png")
|
||||
shutil.copy(
|
||||
"./resources/OpenSans-Regular.ttf",
|
||||
"./decompiled/assets/OpenSans-Regular.ttf",
|
||||
)
|
||||
shutil.copytree(
|
||||
"./patches/resources/smali_classes4/", "./decompiled/smali_classes4/"
|
||||
"./resources/smali_classes4/", "./decompiled/smali_classes4/"
|
||||
)
|
||||
|
||||
# Mod assets
|
||||
shutil.copy("./patches/resources/avatar.png", "./decompiled/assets/avatar.png")
|
||||
shutil.copy(
|
||||
"./patches/resources/OpenSans-Regular.ttf",
|
||||
"./decompiled/assets/OpenSans-Regular.ttf",
|
||||
)
|
||||
shutil.copy(
|
||||
"./patches/resources/ic_custom_crown.xml",
|
||||
"./decompiled/res/drawable/ic_custom_crown.xml",
|
||||
)
|
||||
shutil.copy(
|
||||
"./patches/resources/ic_custom_telegram.xml",
|
||||
"./decompiled/res/drawable/ic_custom_telegram.xml",
|
||||
)
|
||||
shutil.copy(
|
||||
"./patches/resources/ytsans_medium.ttf",
|
||||
"./resources/ytsans_medium.ttf",
|
||||
"./decompiled/res/font/ytsans_medium.ttf",
|
||||
)
|
||||
os.remove("./decompiled/res/font/ytsans_medium.otf")
|
||||
|
||||
insert_after_public("warning_error_counter_background", "ic_custom_telegram")
|
||||
insert_after_public("warning_error_counter_background", "ic_custom_crown")
|
||||
|
||||
return True
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
priority = 0
|
||||
|
||||
# imports
|
||||
import shutil
|
||||
from lxml import etree
|
||||
from utils.public import insert_after_public
|
||||
|
||||
|
||||
# Patch
|
||||
@@ -48,6 +50,18 @@ def make_category(ns, name, items):
|
||||
return cat
|
||||
|
||||
def apply(config: dict) -> bool:
|
||||
shutil.copy(
|
||||
"./resources/ic_custom_crown.xml",
|
||||
"./decompiled/res/drawable/ic_custom_crown.xml",
|
||||
)
|
||||
insert_after_public("warning_error_counter_background", "ic_custom_crown")
|
||||
|
||||
shutil.copy(
|
||||
"./resources/ic_custom_telegram.xml",
|
||||
"./decompiled/res/drawable/ic_custom_telegram.xml",
|
||||
)
|
||||
insert_after_public("warning_error_counter_background", "ic_custom_telegram")
|
||||
|
||||
file_path = "./decompiled/res/xml/preference_main.xml"
|
||||
parser = etree.XMLParser(remove_blank_text=True)
|
||||
tree = etree.parse(file_path, parser)
|
||||
|
||||
|
Before Width: | Height: | Size: 26 MiB After Width: | Height: | Size: 26 MiB |
Reference in New Issue
Block a user