()
| 63 | |
| 64 | |
| 65 | def find_7zip() -> Path: |
| 66 | for candidate in ( |
| 67 | Path(r"C:\Program Files\7-Zip\7z.exe"), |
| 68 | Path(r"C:\Program Files (x86)\7-Zip\7z.exe"), |
| 69 | ): |
| 70 | if candidate.exists(): |
| 71 | return candidate |
| 72 | on_path = shutil.which("7z") or shutil.which("7z.exe") |
| 73 | if on_path: |
| 74 | return Path(on_path) |
| 75 | sys.exit("7-Zip not found. Install from https://www.7-zip.org/.") |
| 76 | |
| 77 | |
| 78 | def sha256_file(path: Path) -> str: |