Launcher/Versions.gd

31 lines
509 B
GDScript3
Raw Normal View History

2022-10-10 20:59:43 -05:00
extends Node
var os_name = ""
var suffix = ""
2022-10-10 20:59:43 -05:00
var exec_path = OS.get_config_dir()+"/current/UltraFlare-"+os_name+"-x86_64"+suffix
var executable = File.new()
func get_version():
var version
2022-10-10 20:59:43 -05:00
var store = Store.get_store()
2022-10-10 20:59:43 -05:00
if store.has("current_version"):
version = store["current_version"]
else:
version = null
2022-10-10 20:59:43 -05:00
return version
2022-10-10 20:59:43 -05:00
func _ready():
if OS.get_name() == "X11":
os_name = "linux"
elif OS.get_name() == "Windows":
os_name = "windows"
if os_name == "windows":
suffix = ".exe"
2022-10-10 20:59:43 -05:00