fix: use 7z to extract game file
This commit is contained in:
parent
f54c2f432b
commit
1830081cb0
2
setup.py
2
setup.py
@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
|
||||
|
||||
setup(
|
||||
name='worthless',
|
||||
version='2.2.3',
|
||||
version='2.2.4',
|
||||
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
|
||||
url='https://git.froggi.es/tretrauit/worthless-launcher',
|
||||
license='MIT License',
|
||||
|
@ -413,8 +413,13 @@ class Installer:
|
||||
archive = Path(archive).resolve()
|
||||
if not archive.exists():
|
||||
raise FileNotFoundError(f"'{archive}' not found")
|
||||
with zipfile.ZipFile(archive, 'r') as f:
|
||||
await asyncio.to_thread(f.extractall, path=self._gamedir)
|
||||
print(f'-o"{str(self._gamedir)}"')
|
||||
proc = await asyncio.create_subprocess_shell(f"7z x {str(archive)} -o'{str(self._gamedir)}'")
|
||||
await proc.wait()
|
||||
if proc.returncode != 0:
|
||||
raise RuntimeError("Extracting failed")
|
||||
# with zipfile.ZipFile(archive, 'r') as f:
|
||||
# await asyncio.to_thread(f.extractall, path=self._gamedir)
|
||||
|
||||
async def apply_voiceover(self, voiceover_archive: str | Path):
|
||||
# Since Voiceover packages are unclear about diff package or full package
|
||||
|
Loading…
Reference in New Issue
Block a user