Rename "pixelorama" folder to "pixelorama_data" for non-XDG locations
Workaround for #248 and #321.
18
.github/workflows/dev-desktop-builds.yml
vendored
|
@ -31,10 +31,10 @@ jobs:
|
||||||
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
|
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
|
||||||
- name: Windows Build 🔧
|
- name: Windows Build 🔧
|
||||||
run: godot -v --export "Windows Desktop 64-bit" ./build/windows-64bit/$EXPORT_NAME.exe
|
run: godot -v --export "Windows Desktop 64-bit" ./build/windows-64bit/$EXPORT_NAME.exe
|
||||||
- name: Copy pixelorama folder 📁
|
- name: Copy pixelorama_data folder 📁
|
||||||
run: |
|
run: |
|
||||||
cp -R ./pixelorama ./build/windows-64bit
|
cp -R ./pixelorama_data ./build/windows-64bit
|
||||||
rm ./build/windows-64bit/pixelorama/.gdignore
|
rm ./build/windows-64bit/pixelorama_data/.gdignore
|
||||||
- name: Upload Artifact 🚀
|
- name: Upload Artifact 🚀
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
|
@ -57,10 +57,10 @@ jobs:
|
||||||
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
|
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
|
||||||
- name: Linux Build 🔧
|
- name: Linux Build 🔧
|
||||||
run: godot -v --export "Linux/X11 64-bit" ./build/linux-64bit/$EXPORT_NAME.x86_64
|
run: godot -v --export "Linux/X11 64-bit" ./build/linux-64bit/$EXPORT_NAME.x86_64
|
||||||
- name: Copy pixelorama folder 📁
|
- name: Copy pixelorama_data folder 📁
|
||||||
run: |
|
run: |
|
||||||
cp -R ./pixelorama ./build/linux-64bit
|
cp -R ./pixelorama_data ./build/linux-64bit
|
||||||
rm ./build/linux-64bit/pixelorama/.gdignore
|
rm ./build/linux-64bit/pixelorama_data/.gdignore
|
||||||
- name: Upload Artifact 🚀
|
- name: Upload Artifact 🚀
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
|
@ -103,10 +103,10 @@ jobs:
|
||||||
rm ./build/mac/Pixelorama.zip
|
rm ./build/mac/Pixelorama.zip
|
||||||
- name: Fix application icon 🖼
|
- name: Fix application icon 🖼
|
||||||
run: sips -s format icns ./build/mac/Pixelorama.app/Contents/Resources/icon.icns --out ./build/mac/Pixelorama.app/Contents/Resources/icon.icns
|
run: sips -s format icns ./build/mac/Pixelorama.app/Contents/Resources/icon.icns --out ./build/mac/Pixelorama.app/Contents/Resources/icon.icns
|
||||||
- name: Copy pixelorama folder 📁
|
- name: Copy pixelorama_data folder 📁
|
||||||
run: |
|
run: |
|
||||||
cp -R ./pixelorama ./build/mac
|
cp -R ./pixelorama_data ./build/mac
|
||||||
rm ./build/mac/pixelorama/.gdignore
|
rm ./build/mac/pixelorama_data/.gdignore
|
||||||
- name: Create DMG archive 🔧
|
- name: Create DMG archive 🔧
|
||||||
run: hdiutil create -size 70m -srcfolder ./build/mac -volname Pixelorama ./build/mac/Pixelorama.dmg
|
run: hdiutil create -size 70m -srcfolder ./build/mac -volname Pixelorama ./build/mac/Pixelorama.dmg
|
||||||
- name: Upload Artifact 🚀
|
- name: Upload Artifact 🚀
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 67 B After Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 67 B After Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 651 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
|
@ -12,7 +12,8 @@ var raw_xdg_data_dirs : Array
|
||||||
const default_xdg_data_home_rel := ".local/share"
|
const default_xdg_data_home_rel := ".local/share"
|
||||||
const default_xdg_data_dirs := ["/usr/local/share", "/usr/share"]
|
const default_xdg_data_dirs := ["/usr/local/share", "/usr/share"]
|
||||||
|
|
||||||
const config_subdir_name := "pixelorama"
|
const config_subdir_name := "pixelorama_data"
|
||||||
|
const xdg_config_subdir_name := "pixelorama"
|
||||||
|
|
||||||
const palettes_data_subdirectory := "Palettes"
|
const palettes_data_subdirectory := "Palettes"
|
||||||
const brushes_data_subdirectory := "Brushes"
|
const brushes_data_subdirectory := "Brushes"
|
||||||
|
@ -35,7 +36,7 @@ func _init() -> void:
|
||||||
default_xdg_data_home_rel
|
default_xdg_data_home_rel
|
||||||
)
|
)
|
||||||
xdg_data_home = raw_xdg_data_home.plus_file(
|
xdg_data_home = raw_xdg_data_home.plus_file(
|
||||||
config_subdir_name
|
xdg_config_subdir_name
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create defaults
|
# Create defaults
|
||||||
|
@ -43,7 +44,7 @@ func _init() -> void:
|
||||||
raw_xdg_data_dirs = default_xdg_data_dirs
|
raw_xdg_data_dirs = default_xdg_data_dirs
|
||||||
for default_loc in raw_xdg_data_dirs:
|
for default_loc in raw_xdg_data_dirs:
|
||||||
xdg_data_dirs.append(
|
xdg_data_dirs.append(
|
||||||
default_loc.plus_file(config_subdir_name)
|
default_loc.plus_file(xdg_config_subdir_name)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Now check the XDG environment variables and if
|
# Now check the XDG environment variables and if
|
||||||
|
@ -52,7 +53,7 @@ func _init() -> void:
|
||||||
# Checks the xdg data home var
|
# Checks the xdg data home var
|
||||||
if OS.has_environment("XDG_DATA_HOME"):
|
if OS.has_environment("XDG_DATA_HOME"):
|
||||||
raw_xdg_data_home = OS.get_environment("XDG_DATA_HOME")
|
raw_xdg_data_home = OS.get_environment("XDG_DATA_HOME")
|
||||||
xdg_data_home = raw_xdg_data_home.plus_file(config_subdir_name)
|
xdg_data_home = raw_xdg_data_home.plus_file(xdg_config_subdir_name)
|
||||||
# Checks the list of files var, and processes them.
|
# Checks the list of files var, and processes them.
|
||||||
if OS.has_environment("XDG_DATA_DIRS"):
|
if OS.has_environment("XDG_DATA_DIRS"):
|
||||||
var raw_env_var := OS.get_environment("XDG_DATA_DIRS")
|
var raw_env_var := OS.get_environment("XDG_DATA_DIRS")
|
||||||
|
@ -61,7 +62,7 @@ func _init() -> void:
|
||||||
raw_xdg_data_dirs = unappended_subdirs
|
raw_xdg_data_dirs = unappended_subdirs
|
||||||
xdg_data_dirs = []
|
xdg_data_dirs = []
|
||||||
for unapp_subdir in raw_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(unapp_subdir.plus_file(xdg_config_subdir_name))
|
||||||
xdg_data_dirs.append(Global.root_directory.plus_file(config_subdir_name))
|
xdg_data_dirs.append(Global.root_directory.plus_file(config_subdir_name))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|