-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.py
More file actions
28 lines (22 loc) · 979 Bytes
/
build.py
File metadata and controls
28 lines (22 loc) · 979 Bytes
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
27
28
#!/usr/bin/env python3
import os
os.environ["PATH"] += os.pathsep + "./util"
if (os.path.isfile("./bin/videopages.bin") == False):
os.makedirs("./bin", exist_ok=True)
print("Encoding video:")
os.system("encode.py ./video/frames.bin.gz ./bin/videopages.bin")
else:
print("Video already encoded, skipping encode. Delete ./bin/videopages.bin to force reencode")
print("Encoding audio")
os.system("audio.py ./music/badapple.mmp ./music/track1.asm ./music/track2.asm ./music/track3.asm ./music/track4.asm")
print("Assembling:")
os.system("spasm badapple.asm ./bin/codepages.bin")
print("Joining code and video")
videopages_bin = open("./bin/videopages.bin", "rb")
codepages_bin = open("./bin/codepages.bin", "rb")
badapple_bin = open("./bin/badapple.bin", "wb")
badapple_bin.write(codepages_bin.read())
badapple_bin.write(videopages_bin.read())
badapple_bin.close()
print("Packaging application")
os.system("rabbitsign -f -p -o badapple.8xk ./bin/badapple.bin")