Add osVersion option

This commit is contained in:
Fierelier 2021-03-30 01:16:49 +02:00
parent c0ac09389f
commit df4484ba5a
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,9 @@ gamePath=$+sp$
# Override the OS name. Choose windows, linux or macos, if the detection doesn't work right. # Override the OS name. Choose windows, linux or macos, if the detection doesn't work right.
osName= osName=
# Override OS version
osVersion=
# Override JVM architecture (x86/amd64) # Override JVM architecture (x86/amd64)
jvmArch= jvmArch=

View File

@ -234,6 +234,9 @@ def main():
lv["osName"] = platform.system().lower() lv["osName"] = platform.system().lower()
if lv["osName"] == "darwin": lv["osName"] = "macos" if lv["osName"] == "darwin": lv["osName"] = "macos"
if lv["osVersion"] == "":
lv["osVersion"] = platform.version()
if lv["jvmArch"] == "": if lv["jvmArch"] == "":
if "64-Bit" in subprocess.check_output([lv["java"],"-version"]).decode("utf-8"): if "64-Bit" in subprocess.check_output([lv["java"],"-version"]).decode("utf-8"):
lv["jvmArch"] = "amd64" lv["jvmArch"] = "amd64"