diff options
| author | Triang3l <triang3l@yandex.ru> | 2020-11-21 14:54:57 +0300 |
|---|---|---|
| committer | Triang3l <triang3l@yandex.ru> | 2020-11-21 16:22:48 +0300 |
| commit | 25606774e146365cbb4ccb8ac76273751a29edcc (patch) | |
| tree | 1c9d02977c791287c7245f2cbf1438d416ced3de | |
| parent | 4786e93c96e322c3bf06b674b9a8e1c5fe4b4056 (diff) | |
[Build] xenia-build Android host OS detection
| -rwxr-xr-x | xenia-build | 11 |
1 files changed, 11 insertions, 0 deletions
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) |
