aarch64 ucs4 by aisman

pull/1/head
DiMartinoXBMC 2016-05-19 18:53:38 +03:00
parent bdca701e42
commit 40a95170ce
14 changed files with 84 additions and 16 deletions

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<addon id='script.module.libtorrent' version='1.1.0' name='python-libtorrent' provider-name='DiMartino, srg70, RussakHH, aisman, inpos'>
<addon id='script.module.libtorrent' version='1.1.0d' name='python-libtorrent' provider-name='DiMartino, srg70, RussakHH, aisman, inpos'>
<requires>
<import addon='xbmc.python' version='2.1.0'/>
</requires>

View File

@ -1,6 +1,7 @@
1.1.0:
Lastest library is default
Added 1.1.0 for Unix x86, Unix amd64, Unix ARM v6,7,8-64
Added 1.1.0 for Unix x86, Unix amd64, Unix ARM v6,7
Added 1.1.0 for aarch64 (UCS2, UCS4) by aisman
1.0.9:
1.0.9 is default

View File

@ -0,0 +1,24 @@
#-*- coding: utf-8 -*-
'''
python-libtorrent for Kodi (script.module.libtorrent)
Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'''

View File

@ -0,0 +1,24 @@
#-*- coding: utf-8 -*-
'''
python-libtorrent for Kodi (script.module.libtorrent)
Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'''

View File

@ -49,7 +49,7 @@ def get_libname(platform):
libname=[]
if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6',
'linux_armv7', 'linux_x86_64', 'ios_arm',
'linux_mipsel_ucs2', 'linux_mipsel_ucs4', 'linux_aarch64']:
'linux_mipsel_ucs2', 'linux_mipsel_ucs4', 'linux_aarch64_ucs2', 'linux_aarch64_ucs4']:
libname=['libtorrent.so']
elif platform['system'] == 'windows':
libname=['libtorrent.pyd']
@ -107,7 +107,10 @@ def get_platform():
ret["arch"] = "mipsel_ucs4"
elif system == 12:
ret["os"] = "linux"
ret["arch"] = "linux_aarch64"
ret["arch"] = "linux_aarch64_ucs2"
elif system == 13:
ret["os"] = "linux"
ret["arch"] = "linux_aarch64_ucs4"
else:
ret = {
@ -132,8 +135,11 @@ def get_platform():
ret["arch"] = 'mipsel_ucs4'
else:
ret["arch"] = 'mipsel_ucs2'
if os.uname()[4]=="aarch64":
ret["arch"] = "aarch64"
elif "aarch64" in uname:
if sys.maxunicode > 65536:
ret["arch"] = 'aarch64_ucs4'
else:
ret["arch"] = 'aarch64_ucs2'
elif xbmc.getCondVisibility("system.platform.windows"):
ret["os"] = "windows"
elif xbmc.getCondVisibility("system.platform.osx"):
@ -161,8 +167,8 @@ def get_system(ret):
ret["system"] = 'linux_x86'
ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.',
'You should install it by "sudo apt-get install python-libtorrent"']
elif ret["os"] == "linux" and ret["arch"] == "aarch64":
ret["system"] = 'linux_aarch64'
elif ret["os"] == "linux" and "aarch64" in ret["arch"]:
ret["system"] = 'linux_' + ret["arch"]
ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.',
'You should install it by "sudo apt-get install python-libtorrent"']
elif ret["os"] == "linux" and ("arm" or "mips" in ret["arch"]):

View File

@ -89,10 +89,15 @@ if __settings__.getSetting('plugin_name')!=__plugin__:
log('platform: ' + str(platform))
if platform['system'] not in ['windows']:
log('os: '+str(os.uname()))
if sys.maxunicode > 65536:
log('ucs4')
else:
log('ucs2')
try:
if platform['system'] in ['linux_x86', 'windows', 'linux_armv6', 'linux_armv7',
'linux_x86_64', 'linux_mipsel_ucs2', 'linux_mipsel_ucs4', 'linux_aarch64']:
'linux_x86_64', 'linux_mipsel_ucs2', 'linux_mipsel_ucs4',
'linux_aarch64_ucs2', 'linux_aarch64_ucs4']:
import libtorrent
elif platform['system'] in ['darwin', 'ios_arm']:
import imp

View File

@ -49,7 +49,7 @@ def get_libname(platform):
libname=[]
if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6',
'linux_armv7', 'linux_x86_64', 'ios_arm',
'linux_mipsel_ucs2', 'linux_mipsel_ucs4', 'linux_aarch64']:
'linux_mipsel_ucs2', 'linux_mipsel_ucs4', 'linux_aarch64_ucs2', 'linux_aarch64_ucs4']:
libname=['libtorrent.so']
elif platform['system'] == 'windows':
libname=['libtorrent.pyd']
@ -107,7 +107,10 @@ def get_platform():
ret["arch"] = "mipsel_ucs4"
elif system == 12:
ret["os"] = "linux"
ret["arch"] = "linux_aarch64"
ret["arch"] = "linux_aarch64_ucs2"
elif system == 13:
ret["os"] = "linux"
ret["arch"] = "linux_aarch64_ucs4"
else:
ret = {
@ -132,8 +135,11 @@ def get_platform():
ret["arch"] = 'mipsel_ucs4'
else:
ret["arch"] = 'mipsel_ucs2'
if os.uname()[4]=="aarch64":
ret["arch"] = "aarch64"
elif "aarch64" in uname:
if sys.maxunicode > 65536:
ret["arch"] = 'aarch64_ucs4'
else:
ret["arch"] = 'aarch64_ucs2'
elif xbmc.getCondVisibility("system.platform.windows"):
ret["os"] = "windows"
elif xbmc.getCondVisibility("system.platform.osx"):
@ -161,8 +167,8 @@ def get_system(ret):
ret["system"] = 'linux_x86'
ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.',
'You should install it by "sudo apt-get install python-libtorrent"']
elif ret["os"] == "linux" and ret["arch"] == "aarch64":
ret["system"] = 'linux_aarch64'
elif ret["os"] == "linux" and "aarch64" in ret["arch"]:
ret["system"] = 'linux_' + ret["arch"]
ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.',
'You should install it by "sudo apt-get install python-libtorrent"']
elif ret["os"] == "linux" and ("arm" or "mips" in ret["arch"]):

View File

@ -21,7 +21,8 @@
<string id="1109">iOS</string>
<string id="1110">Linux MIPSEL (UCS2)</string>
<string id="1111">Linux MIPSEL (UCS4)</string>
<string id="1112">Linux ARM v8 64 (AARCH64)</string>
<string id="1112">Linux ARM v8 AARCH64 (UCS2)</string>
<string id="1113">Linux ARM v8 AARCH64 (UCS4)</string>
<string id="1150">0.16.19</string>
<string id="1151">1.0.6</string>