-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathrelease_builds.py
26 lines (20 loc) · 901 Bytes
/
release_builds.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/python3
from sys import argv
from pathlib import Path
from shlex import quote
import os, subprocess, zlib
def flips(params):
subprocess.call(["/mnt/c/Hacking/Tools/Flips/flips-linux"] + params)
def create_bps(name):
flips(["--create", "--bps", "/mnt/c/Hacking/Pokemon 3rd generation/Pokemon - Emerald Version (U).gba", "CrystalDust.gba", "alphas/CrystalDust_" + name + ".bps"])
def apply_bps(name):
flips(["--apply", "--bps", "alphas/CrystalDust_" + name + ".bps", "/mnt/c/Hacking/Pokemon 3rd generation/Pokemon - Emerald Version (U).gba", "alphas/CrystalDust_" + name + ".gba"])
def build_and_encrypt(name):
subprocess.call(["make", "tidy"])
subprocess.call(["make", "-j8", "modern"])
create_bps(name)
apply_bps(name)
if __name__ == '__main__':
os.makedirs("alphas", exist_ok=True)
build_and_encrypt(argv[1])
subprocess.call(["make", "tidy"])