Dirty fix for macos/osx naming clusterfuck

This commit is contained in:
Fierelier 2021-03-28 05:38:26 +02:00
parent 5616c4668e
commit 7d8283bfb2

View File

@ -79,8 +79,14 @@ def main():
library["downloads"]["artifact"]["path"] = library["downloads"]["artifact"]["path"].replace("/",os.path.sep)
libraryList += p(libraryPath,library["downloads"]["artifact"]["path"]) + separator
if "classifiers" in library["downloads"]:
native = False
if "natives-" +lv["osName"] in library["downloads"]["classifiers"]:
native = library["downloads"]["classifiers"]["natives-" +lv["osName"]]
if lv["osName"] == "macos" and native == False and "natives-osx" in library["downloads"]["classifiers"]:
native = library["downloads"]["classifiers"]["natives-osx"]
if native != False:
native["path"] = native["path"].replace("/",os.path.sep)
if not os.path.isdir(nativesOutPath): os.makedirs(nativesOutPath)
subprocess.run(["7z","x",p(nativesPath,native["path"]),"-o" +nativesOutPath,"-aos"],check=True,stdout=subprocess.DEVNULL)