Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /randovania_randovania /tools /build_flatpak.py
| from __future__ import annotations | |
| import argparse | |
| import os | |
| import shutil | |
| import subprocess | |
| from pathlib import Path | |
| _here = Path(__file__).parent | |
| _production_id = "io.github.randovania.Randovania" | |
| def main(): | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--repository", type=Path, required=True) | |
| parser.add_argument("executable_tar", help="Path to the PyInstaller linux executable", type=Path) | |
| args = parser.parse_args() | |
| executable_tar: Path = args.executable_tar | |
| repository: Path = args.repository | |
| flatpak_id = _production_id | |
| if flatpak_id != _production_id: | |
| _here.joinpath(f"flatpak/{flatpak_id}.yml").write_text( | |
| _here.joinpath(f"flatpak/{_production_id}.yml") | |
| .read_text() | |
| .replace( | |
| _production_id, | |
| flatpak_id, | |
| ) | |
| ) | |
| shutil.move( | |
| executable_tar, | |
| os.fspath(_here.joinpath("flatpak/randovania-linux.tar.gz")), | |
| ) | |
| subprocess.run( | |
| [ | |
| "flatpak-builder", | |
| f"--repo={os.fspath(repository.absolute())}", | |
| "./flatpak-build-dir", | |
| os.fspath(_here.joinpath(f"flatpak/{flatpak_id}.yml")), | |
| ], | |
| check=True, | |
| ) | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 1.28 kB
- Xet hash:
- 8d3b5b425b89e050e3a35f67c58b1d8a3389b5dd609590d338e5296375e4e335
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.