2024-08-17 15:52:49 +00:00
|
|
|
from .util import *
|
|
|
|
from . import fileutil
|
|
|
|
|
2024-08-17 19:25:06 +00:00
|
|
|
from polly.patcher import process_all_patches
|
|
|
|
|
2024-08-17 15:52:49 +00:00
|
|
|
# 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)
|
2024-08-17 15:52:49 +00:00
|
|
|
if s:
|
|
|
|
print("Copied custom resources from src/resources")
|
|
|
|
else:
|
|
|
|
print("Skipped copying resources from src/resources")
|
|
|
|
|
2024-08-17 19:25:06 +00:00
|
|
|
# Patch other resources
|
2024-08-19 23:44:39 +00:00
|
|
|
process_all_patches(SRC_RESOURCE_PATCHES_DIR, dest=PATCHED_RSC_DIR)
|