1.0.6 test

pull/1/head
DiMartinoXBMC 2015-08-02 16:04:40 +03:00
parent c945498681
commit 4045c02bb4
4 changed files with 22 additions and 10 deletions

View File

@ -26,7 +26,15 @@ else:
'python_libtorrent') 'python_libtorrent')
log('dirname:' +str(dirname)) log('dirname:' +str(dirname))
dest_path = os.path.join(dirname, platform['system'])
default_version=0 #0.16.19
set_version=__settings__.getSetting('set_version')
if getSettingAsBool('custom_version'):
platform['version'] = __language__(1150+int(set_version))
else:
platform['version'] = __language__(1150+default_version)
dest_path = os.path.join(dirname, platform['system'], platform['version'])
sys.path.insert(0, dest_path) sys.path.insert(0, dest_path)
lm=LibraryManager(dest_path) lm=LibraryManager(dest_path)

View File

@ -14,7 +14,9 @@ class Public:
self.root=os.path.dirname(__file__) self.root=os.path.dirname(__file__)
for dir in os.listdir(self.root): for dir in os.listdir(self.root):
if os.path.isdir(os.path.join(self.root,dir)): if os.path.isdir(os.path.join(self.root,dir)):
self.platforms.append({'system':dir}) for subdir in os.listdir(os.path.join(self.root,dir)):
if os.path.isdir(os.path.join(self.root,dir,subdir)):
self.platforms.append({'system':dir, 'version':subdir})
self._generate_size_file() self._generate_size_file()
def _generate_size_file( self ): def _generate_size_file( self ):
@ -22,28 +24,29 @@ class Public:
for libname in get_libname(platform): for libname in get_libname(platform):
self.libname=libname self.libname=libname
self.platform=platform self.platform=platform
self.libdir = os.path.join(self.root, self.platform['system']) self.libdir = os.path.join(self.root, self.platform['system'], self.platform['version'])
self.libpath = os.path.join(self.libdir, self.libname) self.libpath = os.path.join(self.libdir, self.libname)
self.sizepath=self.libpath+'.size.txt' self.sizepath=self.libpath+'.size.txt'
self.zipname=self.libname+'.zip' self.zipname=self.libname+'.zip'
self.zippath=os.path.join(self.libdir, self.zipname) zippath=os.path.join(self.libdir, self.zipname)
system=platform['system']+'/'+platform['version']+'/'
if os.path.exists(self.libpath): if os.path.exists(self.libpath):
if not os.path.exists(self.sizepath): if not os.path.exists(self.sizepath):
print platform['system']+'/'+self.libname+' NO SIZE' print system+self.libname+' NO SIZE'
self._makezip() self._makezip()
elif not os.path.exists(self.zippath): elif not os.path.exists(zippath):
print platform['system']+'/'+self.libname+' NO ZIP' print system+self.libname+' NO ZIP'
self._makezip() self._makezip()
else: else:
size=str(os.path.getsize(self.libpath)) size=str(os.path.getsize(self.libpath))
size_old=open( self.sizepath, "r" ).read() size_old=open( self.sizepath, "r" ).read()
if size_old!=size: if size_old!=size:
print platform['system']+'/'+self.libname+' NOT EQUAL' print system+self.libname+' NOT EQUAL'
self._makezip() self._makezip()
else: else:
print platform['system']+'/'+self.libname+' NO ACTION' print system+self.libname+' NO ACTION'
else: else:
print platform['system']+'/'+self.libname+' NO LIB' print system+self.libname+' NO LIB'
def _makezip(self): def _makezip(self):
open( self.sizepath, "w" ).write( str(os.path.getsize(self.libpath)) ) open( self.sizepath, "w" ).write( str(os.path.getsize(self.libpath)) )

View File

@ -0,0 +1 @@
2281472