Wait for patch process to exit
Bump to 1.2.9-2
This commit is contained in:
parent
f7e5362e86
commit
8f541ff0c4
2
setup.py
2
setup.py
@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
|
||||
|
||||
setup(
|
||||
name='worthless',
|
||||
version='1.2.9-1',
|
||||
version='1.2.9-2',
|
||||
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
|
||||
url='https://git.froggi.es/tretrauit/worthless-launcher',
|
||||
license='MIT License',
|
||||
|
@ -12,6 +12,7 @@ class LinuxUtils:
|
||||
"""Execute a command using pkexec (friendly gui)
|
||||
"""
|
||||
rsp = await asyncio.create_subprocess_exec(*args)
|
||||
await rsp.wait()
|
||||
match rsp.returncode:
|
||||
case 127:
|
||||
raise OSError("Authentication failed.")
|
||||
|
@ -147,9 +147,12 @@ class Patcher:
|
||||
gamever = "".join(self._installer.get_game_version().split("."))
|
||||
unity_path = self._gamedir.joinpath("UnityPlayer.dll")
|
||||
unity_path.rename(self._gamedir.joinpath("UnityPlayer.dll.bak"))
|
||||
await asyncio.create_subprocess_exec("xdelta3", "-d", "-s", str(self._gamedir.joinpath("UnityPlayer.dll.bak")),
|
||||
str(self._patch_path.joinpath("{}/patch_files/{}".format(gamever, patch))),
|
||||
str(self._gamedir.joinpath("UnityPlayer.dll")), cwd=self._gamedir)
|
||||
proc = await asyncio.create_subprocess_exec("xdelta3", "-d", "-s",
|
||||
str(self._gamedir.joinpath("UnityPlayer.dll.bak")),
|
||||
str(self._patch_path.joinpath(
|
||||
"{}/patch_files/{}".format(gamever, patch))),
|
||||
str(self._gamedir.joinpath("UnityPlayer.dll")), cwd=self._gamedir)
|
||||
await proc.wait()
|
||||
|
||||
async def _patch_xlua_fallback(self):
|
||||
# xdelta3-python doesn't work becuase it's outdated.
|
||||
@ -161,11 +164,15 @@ class Patcher:
|
||||
data_name = self._installer.get_game_data_name()
|
||||
xlua_path = self._gamedir.joinpath("{}/Plugins/xlua.dll".format(data_name))
|
||||
xlua_path.rename(self._gamedir.joinpath("{}/Plugins/xlua.dll.bak".format(data_name)))
|
||||
await asyncio.create_subprocess_exec("xdelta3", "-d", "-s",
|
||||
str(self._gamedir.joinpath("{}/Plugins/xlua.dll.bak".format(data_name))),
|
||||
str(self._patch_path.joinpath("{}/patch_files/{}".format(gamever, patch))),
|
||||
str(self._gamedir.joinpath("{}/Plugins/xlua.dll".format(data_name))),
|
||||
cwd=self._gamedir)
|
||||
proc = await asyncio.create_subprocess_exec("xdelta3", "-d", "-s",
|
||||
str(self._gamedir.joinpath(
|
||||
"{}/Plugins/xlua.dll.bak".format(data_name))),
|
||||
str(self._patch_path.joinpath(
|
||||
"{}/patch_files/{}".format(gamever, patch))),
|
||||
str(self._gamedir.joinpath(
|
||||
"{}/Plugins/xlua.dll".format(data_name))),
|
||||
cwd=self._gamedir)
|
||||
await proc.wait()
|
||||
|
||||
def _patch_unityplayer(self):
|
||||
if self._overseas:
|
||||
|
Loading…
Reference in New Issue
Block a user