darwin fix
parent
68a82c9cdc
commit
a0241cd23a
|
@ -38,21 +38,30 @@ try:
|
||||||
if platform['system'] in ['linux_x86', 'windows']:
|
if platform['system'] in ['linux_x86', 'windows']:
|
||||||
import libtorrent
|
import libtorrent
|
||||||
elif platform['system'] in ['darwin']:
|
elif platform['system'] in ['darwin']:
|
||||||
from darwin import *
|
import imp
|
||||||
|
path_list = [dest_path]
|
||||||
|
log('path_list = ' + str(path_list))
|
||||||
|
fp, pathname, description = imp.find_module('libtorrent', path_list)
|
||||||
|
log('fp = ' + str(fp))
|
||||||
|
log('pathname = ' + str(pathname))
|
||||||
|
try:
|
||||||
|
libtorrent = imp.load_module('libtorrent', fp, pathname, description)
|
||||||
|
finally:
|
||||||
|
if fp: fp.close()
|
||||||
elif platform['system'] in ['linux_x86_64', 'linux_arm']:
|
elif platform['system'] in ['linux_x86_64', 'linux_arm']:
|
||||||
from ctypes import *
|
from ctypes import cdll
|
||||||
dll_path=os.path.join(dest_path, 'libtorrent-rasterbar.so.7')
|
dll_path=os.path.join(dest_path, 'libtorrent-rasterbar.so.7')
|
||||||
log('CDLL path = ' + dll_path)
|
log('CDLL path = ' + dll_path)
|
||||||
liblibtorrent=CDLL(dll_path)
|
liblibtorrent=cdll(dll_path)
|
||||||
log('CDLL = ' + str(liblibtorrent))
|
log('CDLL = ' + str(liblibtorrent))
|
||||||
import libtorrent
|
import libtorrent
|
||||||
elif platform['system'] in ['android_armv7', 'android_x86']:
|
elif platform['system'] in ['android_armv7', 'android_x86']:
|
||||||
import imp
|
import imp
|
||||||
from ctypes import *
|
from ctypes import cdll
|
||||||
|
|
||||||
dll_path=os.path.join(dest_path, 'liblibtorrent.so')
|
dll_path=os.path.join(dest_path, 'liblibtorrent.so')
|
||||||
log('CDLL path = ' + dll_path)
|
log('CDLL path = ' + dll_path)
|
||||||
liblibtorrent=CDLL(dll_path)
|
liblibtorrent=cdll(dll_path)
|
||||||
log('CDLL = ' + str(liblibtorrent))
|
log('CDLL = ' + str(liblibtorrent))
|
||||||
|
|
||||||
path_list = [dest_path]
|
path_list = [dest_path]
|
||||||
|
|
Loading…
Reference in New Issue