Exporter now checks OS it's running under and bundles only the executable required for the target OS

This commit is contained in:
ikuyo 2024-01-20 00:37:56 -03:00
parent 6d6426ff05
commit 0e44bbcb74

View file

@ -6,10 +6,12 @@ import logging
import shutil
import textwrap
import sys
import platform as pl
import pre_edited_cs
CSVERSION = 5
class CaverException(Exception):
@ -56,6 +58,12 @@ def patch_files(patch_data: dict, output_dir: Path, platform: CSPlatform, progre
progress_update("Copying UUID...", i/total)
patch_uuid(patch_data["uuid"], output_dir)
if platform == CSPlatform.TWEAKED:
if pl.system() == "Linux":
output_dir.joinpath("CSTweaked.exe").unlink()
else:
output_dir.joinpath("CSTweaked").unlink()
def ensure_base_files_exist(platform: CSPlatform, output_dir: Path):
internal_copy = pre_edited_cs.get_path()