ykit/buildtool/task/patch_resources.py

21 lines
652 B
Python
Raw Permalink Normal View History

from .util import *
from . import fileutil
from polly.patcher import process_all_patches
# Task dependencies
from .extract import extract
def patch_resources():
_ = extract()
2024-08-17 20:16:36 +00:00
# Previously, we populated patched_resources with original resources too, now that is covered in the merge_resources step
2024-08-17 17:14:45 +00:00
2024-08-17 20:16:36 +00:00
s = fileutil.merge_into(SRC_RESOURCES_DIR, PATCHED_RSC_DIR)
if s:
print("Copied custom resources from src/resources")
else:
print("Skipped copying resources from src/resources")
# Patch other resources
process_all_patches(SRC_RESOURCE_PATCHES_DIR, dest=PATCHED_RSC_DIR)