[Build] xenia-build Android host OS detection
This commit is contained in:
parent
4786e93c96
commit
25606774e1
11
xenia-build
11
xenia-build
|
@ -22,6 +22,17 @@ __author__ = 'ben.vanik@gmail.com (Ben Vanik)'
|
|||
self_path = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
# Detect if building on Android via Termux.
|
||||
host_os_is_android = False
|
||||
if sys.platform == 'linux':
|
||||
try:
|
||||
host_os_is_android = subprocess.Popen(
|
||||
['uname', '-o'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL,
|
||||
universal_newlines=True).communicate()[0] == 'Android\n'
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
# Add self to the root search path.
|
||||
sys.path.insert(0, self_path)
|
||||
|
|
Loading…
Reference in New Issue