extends Node

var os_name = ""
var suffix = ""

func get_version():
	var version
	
	var store = Store.get_store()
	
	if store.has("current_version"):
		version = store["current_version"]
	else:
		version = null
	
	return version


func _ready():
	# 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")
	
	if OS.get_name() == "X11":
		os_name = "linux"
	elif OS.get_name() == "Windows":
		os_name = "windows"

	if os_name == "windows":
		suffix = ".exe"

