Disable crash reporters on patch

Bump to 1.2.7
This commit is contained in:
2022-02-18 23:33:43 +07:00
parent ccb2d876fc
commit 2d6cff77c6
2 changed files with 12 additions and 1 deletions

View File

@ -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):