Moved shared data files out of Tweaked/Freeware and into data pre_edited_cs. Patcher moves data files from that folder into the respective build. Freeware files have been kept to ensure BL compatibility.

This commit is contained in:
ikuyo 2024-01-14 19:11:21 -03:00
parent 5358ef9fc6
commit 6d6426ff05
408 changed files with 7037 additions and 1 deletions

View file

@ -59,7 +59,7 @@ def patch_files(patch_data: dict, output_dir: Path, platform: CSPlatform, progre
def ensure_base_files_exist(platform: CSPlatform, output_dir: Path): def ensure_base_files_exist(platform: CSPlatform, output_dir: Path):
internal_copy = pre_edited_cs.get_path() internal_copy = pre_edited_cs.get_path()
version = output_dir.joinpath(platform.value, "data", "Stage", "_version.txt") version = output_dir.joinpath("data", "Stage", "_version.txt")
keep_existing_files = version.exists() and int(version.read_text()) >= CSVERSION keep_existing_files = version.exists() and int(version.read_text()) >= CSVERSION
def should_ignore(path: str, names: list[str]): def should_ignore(path: str, names: list[str]):
@ -71,6 +71,7 @@ def ensure_base_files_exist(platform: CSPlatform, output_dir: Path):
try: try:
shutil.copytree(internal_copy.joinpath(platform.value), output_dir, ignore=should_ignore, dirs_exist_ok=True) shutil.copytree(internal_copy.joinpath(platform.value), output_dir, ignore=should_ignore, dirs_exist_ok=True)
shutil.copytree(internal_copy.joinpath("data"), output_dir.joinpath("data"), ignore=should_ignore, dirs_exist_ok=True)
except shutil.Error: except shutil.Error:
raise CaverException("Error copying base files. Ensure the directory is not read-only, and that Doukutsu.exe is closed") raise CaverException("Error copying base files. Ensure the directory is not read-only, and that Doukutsu.exe is closed")
output_dir.joinpath("data", "Plaintext").mkdir(exist_ok=True) output_dir.joinpath("data", "Plaintext").mkdir(exist_ok=True)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more