Squashed commit of 1.8.0

This commit is contained in:
2025-06-07 17:48:07 -05:00
parent 40d337ac97
commit 888271b7d9
73 changed files with 27227 additions and 1345 deletions

View File

@@ -1,19 +1,38 @@
class PatchTask:
def __init__(self, config, input_dir, output_dir):
def __init__(self, config, input_dir, output_dir, renpy_path, registry):
self.config = config
self.input_dir = input_dir
self.output_dir = output_dir
self.renpy_path = renpy_path
self.registry = registry
def pre_build(self):
def pre_build(self, on_builds):
import subprocess
print("================Initiating patching==================")
from os.path import exists
try:
subprocess.run(["patch", f"/tmp/cache/{self.config['ver']}/renpy.py", "./build_patch/patch.diff"])
except Exception as e:
print(e)
raise e
print("================File Patched==================")
if exists(f"{self.renpy_path}/patched.txt"):
print("================File already patched!==================")
else:
patch_exec = "patch"
if self.config.get('patch_path') != None and self.config['patch_path'] != "":
patch_exec = self.config['patch_path']
def post_build(self):
print("================Initiating patching==================")
try:
subprocess.run([patch_exec, f"{self.renpy_path}/renpy.py", f"{self.input_dir}/build_patch/patch.diff"])
except Exception as e:
print(e)
raise e
# Create a flag so we don't try to patch this again on re-runs
try:
flag = open(f"{self.renpy_path}/patched.txt", 'x')
except Exception as e:
print(e)
raise e
print("================File Patched==================")
def post_build(self, on_builds):
pass