1 var Utils = preload("res://addons/godot_super-wakatime/utils.gd").new()
3 func decompressor_cli(current_decompressor, platform: String, plugin_path: String) -> String:
4 """Get path to the decompressor cli"""
5 var build = Utils.get_ouch_build(platform)
6 var ext: String = ".exe" if platform == "windows" else ""
8 if current_decompressor == null:
9 if platform == "windows":
10 current_decompressor = "%s/%s%s" % [plugin_path, build, ext]
12 current_decompressor = "%s%s" % [build, ext]
14 current_decompressor = "%s%s" % [build, ext]
16 return current_decompressor
18 func lib_exists(current_decompressor, platform: String, plugin_path: String) -> bool:
19 """Return if ouch already exists"""
20 return FileAccess.file_exists(decompressor_cli(current_decompressor, platform, plugin_path));