-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathbuild_all.py
More file actions
executable file
·34 lines (28 loc) · 1022 Bytes
/
build_all.py
File metadata and controls
executable file
·34 lines (28 loc) · 1022 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
29
30
31
32
33
34
#!python3
import sys
import shutil
import os
import os.path
import subprocess
if os.path.exists ("build"):
print ("Removing build directory...")
shutil.rmtree ("build")
if os.path.exists ("dist"):
print ("Removing dist directory...")
shutil.rmtree ("dist")
try:
print ("Building resource zip...")
failure = subprocess.call (["python", "MakeZip.py", "resourcezip", "PyDoomResource.zip"])
if failure or not os.path.exists ("PyDoomResource.zip"):
raise RuntimeError ("Building the resource zip failed!")
print ("Building C extensions...")
failure = subprocess.call (["python", "setup_extensions.py", "build_ext", "--inplace"])
if failure:
raise RuntimeError ("Building the C extensions failed!")
print ("Building executable...")
failure = subprocess.call (["python", "setup_exe.py", "bdist"])
if failure:
raise RuntimeError ("Building the executable failed!")
except RuntimeError as err:
print (err)
input ("Press enter to continue.")