From 2d6cff77c62b1341d75a9eb74561b8611beb08cc Mon Sep 17 00:00:00 2001 From: tretrauit Date: Fri, 18 Feb 2022 23:33:43 +0700 Subject: [PATCH] Disable crash reporters on patch Bump to 1.2.7 --- setup.py | 2 +- worthless/patcher.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5e0b0cb..61dadb1 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text() setup( name='worthless', - version='1.2.6', + version='1.2.7', packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'], url='https://git.froggi.es/tretrauit/worthless-launcher', license='MIT License', diff --git a/worthless/patcher.py b/worthless/patcher.py index e750113..23e1c43 100644 --- a/worthless/patcher.py +++ b/worthless/patcher.py @@ -160,12 +160,23 @@ class Patcher: :param crash_fix: Whether to patch xLua or not :return: None """ + # Patch UnityPlayer.dll if fallback: asyncio.run(self._patch_unityplayer_fallback()) else: self._patch_unityplayer() + # Patch xLua.dll if crash_fix: self.apply_xlua_patch(fallback=fallback) + # Disable crash reporters + disable_files = [ + self._installer.get_game_data_name() + "upload_crash.exe", + self._installer.get_game_data_name() + "Plugins/crashreport.exe", + ] + for file in disable_files: + file_path = Path(file).resolve() + if file_path.exists(): + file_path.rename(str(file_path) + ".bak") @staticmethod def _creation_date(file_path: Path):