2022-10-10 20:59:43 -05:00
|
|
|
extends Node
|
|
|
|
|
2022-10-13 09:51:32 -05:00
|
|
|
var os_name = ""
|
|
|
|
var suffix = ""
|
2022-10-10 20:59:43 -05:00
|
|
|
|
2022-10-27 11:31:30 -05:00
|
|
|
func get_version():
|
|
|
|
var version
|
2022-10-10 20:59:43 -05:00
|
|
|
|
2022-10-27 11:31:30 -05:00
|
|
|
var store = Store.get_store()
|
2022-10-10 20:59:43 -05:00
|
|
|
|
2022-10-27 11:31:30 -05:00
|
|
|
if store.has("current_version"):
|
|
|
|
version = store["current_version"]
|
|
|
|
else:
|
|
|
|
version = null
|
2022-10-10 20:59:43 -05:00
|
|
|
|
2022-10-27 11:31:30 -05:00
|
|
|
return version
|
2022-10-10 20:59:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
func _ready():
|
2022-10-29 13:18:16 -05:00
|
|
|
# Make sure {config}/UltraFlare/current exists
|
|
|
|
var current_dir = Directory.new()
|
|
|
|
|
|
|
|
if not current_dir.dir_exists(OS.get_config_dir()+"/UltraFlare/current"):
|
|
|
|
current_dir.make_dir_recursive(OS.get_config_dir()+"/UltraFlare/current")
|
|
|
|
|
2022-10-13 09:51:32 -05:00
|
|
|
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
|
|
|
|