This commit is contained in:
IQuant 2024-11-26 15:50:33 +03:00
parent 5628b78ae2
commit 0f846f34aa
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,21 @@
cargo_manifest = tomllib.load(open("noita-proxy/Cargo.toml", "rb"))
version = cargo_manifest["package"]["version"]
os.makedirs("target", exist_ok=True)
with ZipFile("target/noita-proxy-win.zip", "w") as release:
release.write("noita-proxy/target/x86_64-pc-windows-gnu/release/noita-proxy.exe", arcname="noita_proxy.exe", compress_type=COMPRESS_TYPE, compresslevel=COMPRESS_LEVEL)
release.write("redist/steam_api64.dll", arcname="steam_api64.dll", compress_type=COMPRESS_TYPE, compresslevel=COMPRESS_LEVEL)
print("Writing linux release...")
with ZipFile("target/noita-proxy-linux.zip", "w") as release:
release.write("noita-proxy/target/release/noita-proxy", arcname="noita_proxy.x86_64", compress_type=COMPRESS_TYPE, compresslevel=COMPRESS_LEVEL)
release.write("redist/libsteam_api.so", arcname="libsteam_api.so", compress_type=COMPRESS_TYPE, compresslevel=COMPRESS_LEVEL)
print("Writing mod release...")
shutil.make_archive("target/quant.ew", "zip", "quant.ew")
with ZipFile("target/quant.ew.zip", "a") as release:
release.writestr("files/version.lua", f'return "{version}"')