fix: use 7z to extract game file
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user