Update get.py to support Apple ARM64
This commit is contained in:
parent
165595b7f0
commit
91420a3840
1 changed files with 19 additions and 5 deletions
24
tools/get.py
24
tools/get.py
|
|
@ -177,20 +177,34 @@ def load_tools_list(filename, platform):
|
|||
for t in tools_info:
|
||||
tool_platform = [p for p in t['systems'] if p['host'] == platform]
|
||||
if len(tool_platform) == 0:
|
||||
continue
|
||||
# Fallback to x86 on Apple ARM
|
||||
if platform == 'arm64-apple-darwin':
|
||||
tool_platform = [p for p in t['systems'] if p['host'] == 'x86_64-apple-darwin']
|
||||
if len(tool_platform) == 0:
|
||||
continue
|
||||
# Fallback to 32bit on 64bit x86 Windows
|
||||
elif platform == 'x86_64-mingw32':
|
||||
tool_platform = [p for p in t['systems'] if p['host'] == 'i686-mingw32']
|
||||
if len(tool_platform) == 0:
|
||||
continue
|
||||
else:
|
||||
continue
|
||||
tools_to_download.append(tool_platform[0])
|
||||
return tools_to_download
|
||||
|
||||
def identify_platform():
|
||||
arduino_platform_names = {'Darwin' : {32 : 'i386-apple-darwin', 64 : 'x86_64-apple-darwin'},
|
||||
'Linux' : {32 : 'i686-pc-linux-gnu', 64 : 'x86_64-pc-linux-gnu'},
|
||||
'LinuxARM': {32 : 'arm-linux-gnueabihf', 64 : 'aarch64-linux-gnu'},
|
||||
'Windows' : {32 : 'i686-mingw32', 64 : 'i686-mingw32'}}
|
||||
arduino_platform_names = {'Darwin' : {32 : 'i386-apple-darwin', 64 : 'x86_64-apple-darwin'},
|
||||
'DarwinARM': {32 : 'arm64-apple-darwin', 64 : 'arm64-apple-darwin'},
|
||||
'Linux' : {32 : 'i686-pc-linux-gnu', 64 : 'x86_64-pc-linux-gnu'},
|
||||
'LinuxARM' : {32 : 'arm-linux-gnueabihf', 64 : 'aarch64-linux-gnu'},
|
||||
'Windows' : {32 : 'i686-mingw32', 64 : 'x86_64-mingw32'}}
|
||||
bits = 32
|
||||
if sys.maxsize > 2**32:
|
||||
bits = 64
|
||||
sys_name = platform.system()
|
||||
sys_platform = platform.platform()
|
||||
if 'Darwin' in sys_name and (sys_platform.find('arm') > 0 or sys_platform.find('arm64') > 0):
|
||||
sys_name = 'DarwinARM'
|
||||
if 'Linux' in sys_name and (sys_platform.find('arm') > 0 or sys_platform.find('aarch64') > 0):
|
||||
sys_name = 'LinuxARM'
|
||||
if 'CYGWIN_NT' in sys_name:
|
||||
|
|
|
|||
Loading…
Reference in a new issue