mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
Semi-automated releases
This commit is contained in:
parent
94427f33e7
commit
02f441d9cb
5 changed files with 42 additions and 2 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
target
|
2
noita-proxy/Cargo.lock
generated
2
noita-proxy/Cargo.lock
generated
|
@ -1244,7 +1244,7 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
|||
|
||||
[[package]]
|
||||
name = "noita-proxy"
|
||||
version = "0.1.0"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"bitcode",
|
||||
"clipboard",
|
||||
|
|
|
@ -3,7 +3,7 @@ members = ["tangled"]
|
|||
|
||||
[package]
|
||||
name = "noita-proxy"
|
||||
version = "0.1.0"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
39
prepare_release.py
Normal file
39
prepare_release.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
import subprocess
|
||||
from zipfile import ZipFile, ZIP_DEFLATED as COMPRESS_TYPE
|
||||
import shutil
|
||||
import os
|
||||
|
||||
COMPRESS_LEVEL = 9
|
||||
|
||||
print("Compiling Noita Proxy...")
|
||||
|
||||
os.chdir("noita-proxy")
|
||||
|
||||
subprocess.run(["cargo", "build", "--release"])
|
||||
subprocess.run(["cargo", "build", "--release", "--target", "x86_64-pc-windows-gnu"])
|
||||
|
||||
os.chdir("..")
|
||||
|
||||
os.makedirs("target", exist_ok=True)
|
||||
os.makedirs("target/tmp", exist_ok=True)
|
||||
|
||||
print("Extracting steam dylib...")
|
||||
|
||||
with ZipFile("redist/steam_dylib.zip", "r") as steam_dylib_zip:
|
||||
steam_dylib_zip.extractall("target/tmp")
|
||||
|
||||
print("Writing win release...")
|
||||
|
||||
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("target/tmp/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("target/tmp/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")
|
BIN
redist/steam_dylib.zip
Normal file
BIN
redist/steam_dylib.zip
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue