aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Fieroni2016-10-06 14:51:16 +0300
committerRémi Verschelde2016-10-17 20:48:05 +0200
commitb4edaa892dc4be612faeccf1cee0856b8a047aaf (patch)
treeb445578b80eaf0f1ab80873486afdaf9d25497d3
parent81bc2716195bcb9ea4e505b73dd0b34288bc55fc (diff)
downloadgodot-b4edaa892dc4be612faeccf1cee0856b8a047aaf.tar.gz
godot-b4edaa892dc4be612faeccf1cee0856b8a047aaf.tar.zst
godot-b4edaa892dc4be612faeccf1cee0856b8a047aaf.zip
Correct OS architecture detection
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg> (cherry picked from commit f87e32696de6126f05d0b839a2a3689dd16fe73f)
-rw-r--r--platform/android/detect.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 7e482047c..30a4defee 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -124,19 +124,20 @@ def configure(env):
gcc_path=env["ANDROID_NDK_ROOT"]+"/toolchains/"+env["NDK_TARGET"]+"/prebuilt/";
- if (sys.platform.find("linux")==0):
- if (platform.architecture()[0]=='64bit' or os.path.isdir(gcc_path+"linux-x86_64/bin")): # check was not working
+ if (sys.platform.startswith("linux")):
+ if (platform.machine().endswith('64')):
gcc_path=gcc_path+"/linux-x86_64/bin"
else:
gcc_path=gcc_path+"/linux-x86/bin"
- elif (sys.platform=="darwin"):
- gcc_path=gcc_path+"/darwin-x86_64/bin" #this may be wrong
+ elif (sys.platform.startswith("darwin")):
+ gcc_path=gcc_path+"/darwin-x86_64/bin"
env['SHLINKFLAGS'][1] = '-shared'
env['SHLIBSUFFIX'] = '.so'
- elif (os.name=="nt"):
- gcc_path=gcc_path+"/windows-x86_64/bin" #this may be wrong
-
-
+ elif (os.platform.startswith('win')):
+ if (platform.machine().endswith('64')):
+ gcc_path=gcc_path+"/windows-x86_64/bin"
+ else:
+ gcc_path=gcc_path+"/windows-x86/bin"
env['ENV']['PATH'] = gcc_path+":"+env['ENV']['PATH']
if env['android_arch']=='x86':