forked from wateret/mengde
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplay.py
More file actions
executable file
·31 lines (23 loc) · 749 Bytes
/
Copy pathplay.py
File metadata and controls
executable file
·31 lines (23 loc) · 749 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
#!/usr/bin/env python
import os
import sys
import subprocess
import platform
import argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("buildtype", default="Debug", help="build type",
choices=["Debug", "Release"], nargs="?")
return parser.parse_args()
def main():
options = parse_args()
# Fetch system info
system, node, release, version, machine, processor = platform.uname()
build_dir = os.path.join("build", "%s.%s.%s" % (system, machine, options.buildtype))
os.chdir(build_dir)
install_folder = "mengde"
os.chdir(install_folder)
game_path = os.path.join(".", "game")
subprocess.call([game_path])
if __name__ == "__main__":
main()