From 25606774e146365cbb4ccb8ac76273751a29edcc Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sat, 21 Nov 2020 14:54:57 +0300 Subject: [PATCH] [Build] xenia-build Android host OS detection --- xenia-build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xenia-build b/xenia-build index 89a14c651..4e5ebb889 100755 --- a/xenia-build +++ b/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)