From 59c6f32a7591a9538e2077f33db0dc461d23a394 Mon Sep 17 00:00:00 2001 From: cidoku Date: Wed, 8 Oct 2025 23:39:19 -0300 Subject: [PATCH] improve quicksetup for windows x64 --- quicksetup.py | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/quicksetup.py b/quicksetup.py index e03adb6..27bb9a6 100644 --- a/quicksetup.py +++ b/quicksetup.py @@ -31,19 +31,29 @@ print "renaming pybass.py" if os.path.exists("pybass/__init__.py"): os.remove('pybass/__init__.py') os.rename('pybass/pybass.py', 'pybass/__init__.py') -BASSZIP = "bass24.zip" -BASSDLL = "bass.dll" -BASSOPUSZIP = "bassopus24.zip" -BASSOPUSDLL = "bassopus.dll" -BASSFLACZIP = "bassflac24.zip" -BASSFLACDLL = "bassflac.dll" - 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 = "" +BASSDLL = "" +BASSOPUSZIP = "" +BASSOPUSDLL = "" +BASSFLACZIP = "" +BASSFLACDLL = "" + +if arch not in ["x86", "x86_64", "AMD64"]: + arch = "x86_64" + print "Assuming that your system is x86_64..." + +if platform.system() == "Windows": + if arch in ["x86_64", "AMD64"]: + arch = "x64/" + BASSZIP = "bass24.zip" + BASSDLL = arch + "bass.dll" + BASSOPUSZIP = "bassopus24.zip" + BASSOPUSDLL = arch + "bassopus.dll" + BASSFLACZIP = "bassflac24.zip" + BASSFLACDLL = arch + "bassflac.dll" +elif platform.system() == "Linux": BASSZIP = "bass24-linux.zip" BASSDLL = "libs/" + arch + "/libbass.so" BASSOPUSZIP = "bassopus24-linux.zip" @@ -90,15 +100,21 @@ zip_ref = zipfile.ZipFile(BASSFLACZIP, 'r') zip_ref.extract(BASSFLACDLL) zip_ref.close() -if platform.system() == "Linux": +if platform.system() == "Windows" and arch == "x64/" + os.rename(BASSDLL, "bass.dll") + os.rename(BASSOPUSDLL, "bassopus.dll") + os.rename(BASSFLACDLL, "bassflac.dll") + os.rmdir("x64") +elif 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") + +os.remove(BASSZIP) +os.remove(BASSOPUSZIP) +os.remove(BASSFLACZIP) pip_install("apng", "six", "appdirs", "packaging")