fix bass download for linux
This commit is contained in:
parent
9d07b7a431
commit
f49b5b08ae
@ -37,62 +37,68 @@ BASSOPUSZIP = "bassopus24.zip"
|
||||
BASSOPUSDLL = "bassopus.dll"
|
||||
BASSFLACZIP = "bassflac24.zip"
|
||||
BASSFLACDLL = "bassflac.dll"
|
||||
if platform.system() == "Darwin":
|
||||
BASSZIP = "bass24-osx.zip"
|
||||
BASSDLL = "libbass.dylib"
|
||||
BASSOPUSZIP = "bassopus24-osx.zip"
|
||||
BASSOPUSDLL = "libbassopus.dylib"
|
||||
BASSFLACZIP = "bassflac24-osx.zip"
|
||||
BASSFLACDLL = "libbassflac.dylib"
|
||||
elif platform.system() == "Linux":
|
||||
|
||||
arch = platform.uname()[4]
|
||||
|
||||
if platform.system() == "Linux":
|
||||
if arch not in ["x86", "x86_64"]:
|
||||
arch = "x86_64"
|
||||
print "Assuming that your system is x86_64..."
|
||||
BASSZIP = "bass24-linux.zip"
|
||||
BASSDLL = "libbass.so"
|
||||
BASSDLL = "libs/" + arch + "/libbass.so"
|
||||
BASSOPUSZIP = "bassopus24-linux.zip"
|
||||
BASSOPUSDLL = "libbassopus.so"
|
||||
BASSOPUSDLL = "libs/" + arch + "/libbassopus.so"
|
||||
BASSFLACZIP = "bassflac24-linux.zip"
|
||||
BASSFLACDLL = "libbassflac.so"
|
||||
BASSFLACDLL = "libs/" + arch + "/libbassflac.so"
|
||||
|
||||
print "downloading", BASSZIP
|
||||
filedata = urllib2.urlopen('http://us.un4seen.com/files/'+BASSZIP)
|
||||
filedata = urllib2.urlopen('http://us.un4seen.com/files/' + BASSZIP)
|
||||
datatowrite = filedata.read()
|
||||
|
||||
with open(BASSZIP, 'wb') as f:
|
||||
f.write(datatowrite)
|
||||
f.close()
|
||||
|
||||
print "extracting "+BASSDLL+" from "+BASSZIP
|
||||
print "extracting " + BASSDLL + " from " + BASSZIP
|
||||
zip_ref = zipfile.ZipFile(BASSZIP, 'r')
|
||||
zip_ref.extract(BASSDLL)
|
||||
zip_ref.close()
|
||||
|
||||
print "downloading", BASSOPUSZIP
|
||||
filedata = urllib2.urlopen('http://us.un4seen.com/files/'+BASSOPUSZIP)
|
||||
filedata = urllib2.urlopen('http://us.un4seen.com/files/' + BASSOPUSZIP)
|
||||
datatowrite = filedata.read()
|
||||
|
||||
with open(BASSOPUSZIP, 'wb') as f:
|
||||
f.write(datatowrite)
|
||||
f.close()
|
||||
|
||||
print "extracting "+BASSOPUSDLL+" from "+BASSOPUSZIP
|
||||
print "extracting " + BASSOPUSDLL + " from " + BASSOPUSZIP
|
||||
zip_ref = zipfile.ZipFile(BASSOPUSZIP, 'r')
|
||||
zip_ref.extract(BASSOPUSDLL)
|
||||
zip_ref.close()
|
||||
|
||||
print "downloading", BASSFLACZIP
|
||||
filedata = urllib2.urlopen('http://us.un4seen.com/files/'+BASSFLACZIP)
|
||||
filedata = urllib2.urlopen('http://us.un4seen.com/files/' + BASSFLACZIP)
|
||||
datatowrite = filedata.read()
|
||||
|
||||
with open(BASSFLACZIP, 'wb') as f:
|
||||
f.write(datatowrite)
|
||||
f.close()
|
||||
|
||||
print "extracting "+BASSFLACDLL+" from "+BASSFLACZIP
|
||||
print "extracting " + BASSFLACDLL + " from " + BASSFLACZIP
|
||||
zip_ref = zipfile.ZipFile(BASSFLACZIP, 'r')
|
||||
zip_ref.extract(BASSFLACDLL)
|
||||
zip_ref.close()
|
||||
|
||||
print "downloading", BASSMIDIZIP
|
||||
filedata = urllib2.urlopen('http://us.un4seen.com/files/'+BASSMIDIZIP)
|
||||
datatowrite = filedata.read()
|
||||
if platform.system() == "Linux":
|
||||
os.rename(BASSDLL, "libbass.so")
|
||||
os.rename(BASSOPUSDLL, "libbassopus.so")
|
||||
os.rename(BASSFLACDLL, "libbassflac.so")
|
||||
os.remove(BASSZIP)
|
||||
os.remove(BASSOPUSZIP)
|
||||
os.remove(BASSFLACZIP)
|
||||
os.rmdir("libs/" + arch)
|
||||
os.rmdir("libs")
|
||||
|
||||
pip_install("apng", "six", "appdirs", "packaging")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user