1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Make default palettes available for clean installs on MacOS (#1008)

* resolved issue where pixelorama_data folder is to registered on MacOS builds

* Reverted changes to workflows and added Mac Resource directory to search path for palettes

* format Global.gd with gdtoolkit
This commit is contained in:
Ivan Kruger 2024-04-30 13:21:19 +02:00 committed by GitHub
parent 489344866b
commit 8e9ba696f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -659,6 +659,10 @@ func _init() -> void:
loaded_locales.sort() # Make sure locales are always sorted loaded_locales.sort() # Make sure locales are always sorted
if OS.has_feature("template"): if OS.has_feature("template"):
root_directory = OS.get_executable_path().get_base_dir() root_directory = OS.get_executable_path().get_base_dir()
if OS.get_name() == "macOS":
data_directories.append(
root_directory.path_join("../Resources").path_join(CONFIG_SUBDIR_NAME)
)
data_directories.append(root_directory.path_join(CONFIG_SUBDIR_NAME)) data_directories.append(root_directory.path_join(CONFIG_SUBDIR_NAME))
if OS.get_name() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD"]: if OS.get_name() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD"]:
# Checks the list of files var, and processes them. # Checks the list of files var, and processes them.

View file

@ -381,7 +381,7 @@ func _get_palette_files(path: String) -> PackedStringArray:
var dir := DirAccess.open(path) var dir := DirAccess.open(path)
var results: PackedStringArray = [] var results: PackedStringArray = []
if not is_instance_valid(dir) or not dir.dir_exists(path): if !dir:
return [] return []
dir.list_dir_begin() dir.list_dir_begin()