Use the correct separator for library list depending on OS

This commit is contained in:
Fierelier 2021-03-28 00:34:29 +01:00
parent 50e07861e3
commit 47f9336089

View File

@ -61,10 +61,13 @@ def main():
print("Extracting natives...") print("Extracting natives...")
clientJson = readJsonFile(p(versionPath,version + ".json")) clientJson = readJsonFile(p(versionPath,version + ".json"))
libraryList = "" libraryList = ""
separator = ";"
if osName != "windows": separator = ":"
for library in clientJson["libraries"]: for library in clientJson["libraries"]:
if "artifact" in library["downloads"]: if "artifact" in library["downloads"]:
library["downloads"]["artifact"]["path"] = library["downloads"]["artifact"]["path"].replace("/",os.path.sep) library["downloads"]["artifact"]["path"] = library["downloads"]["artifact"]["path"].replace("/",os.path.sep)
libraryList += p(libraryPath,library["downloads"]["artifact"]["path"]) + ";" libraryList += p(libraryPath,library["downloads"]["artifact"]["path"]) + separator
if "classifiers" in library["downloads"]: if "classifiers" in library["downloads"]:
if "natives-" +osName in library["downloads"]["classifiers"]: if "natives-" +osName in library["downloads"]["classifiers"]:
native = library["downloads"]["classifiers"]["natives-" +osName] native = library["downloads"]["classifiers"]["natives-" +osName]