1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Append Global.root_directory to XDG_DATA_DIRS

This lets Pixelorama to search for brushes, palettes & patterns in the "pixelorama" folder that may be on the root folder of the executable. Useful for non-package builds, like itch.io, and for the using Pixelorama inside the editor. It should not cause issues for packages but if it does, let me know.
This commit is contained in:
OverloadedOrama 2020-05-02 16:41:30 +03:00
parent 8005474446
commit b70fae36a3

View file

@ -27,7 +27,7 @@ func use_xdg_standard() -> bool:
return OS.get_name() == "X11"
func _init():
func _init() -> void:
if use_xdg_standard():
print("Detected system where we should use XDG basedir standard (currently Linux or BSD)")
var home := OS.get_environment("HOME")
@ -62,6 +62,7 @@ func _init():
xdg_data_dirs = []
for unapp_subdir in raw_xdg_data_dirs:
xdg_data_dirs.append(unapp_subdir.plus_file(config_subdir_name))
xdg_data_dirs.append(Global.root_directory.plus_file(config_subdir_name))
else:
raw_xdg_data_home = Global.root_directory