]> Repositories - rushbound.git/blob - addons/godot_super-wakatime/decompressor.gd
Sketch character, iPod and typeface
[rushbound.git] / addons / godot_super-wakatime / decompressor.gd
1 var Utils = preload("res://addons/godot_super-wakatime/utils.gd").new()
2
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 ""
7                 
8         if current_decompressor == null:
9                 if platform == "windows":
10                         current_decompressor = "%s/%s%s" % [plugin_path, build, ext]
11                 else:
12                         current_decompressor = "%s%s" % [build, ext]
13         else:
14                 current_decompressor = "%s%s" % [build, ext]
15                 
16         return current_decompressor
17         
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));
21