From 5932f838316f724e4e80d601a3bb5a75dc3cef29 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 29 Aug 2020 16:34:52 +0300 Subject: [PATCH] Rename "pixelorama" folder to "pixelorama_data" for non-XDG locations Workaround for #248 and #321. --- .github/workflows/dev-desktop-builds.yml | 18 +++++++++--------- {pixelorama => pixelorama_data}/.gdignore | 0 .../Brushes/Godot.png | Bin .../Brushes/Grass/%Grass1.png | Bin .../Brushes/Grass/%Grass2.png | Bin .../Brushes/Grass/%Grass3.png | Bin .../Brushes/Grass/%Grass4.png | Bin .../Brushes/Grass/%Grass5.png | Bin .../Brushes/Pixelorama.png | Bin .../Brushes/Snow.png | Bin .../Brushes/Star/%star1.png | Bin .../Brushes/Star/%star2.png | Bin .../Brushes/Star/%star3.png | Bin .../Brushes/Star/%star4.png | Bin .../Brushes/Star/%star5.png | Bin .../Brushes/Star/%star6.png | Bin .../Brushes/circle_blended.png | Bin .../Brushes/hline_3x3.png | Bin .../Brushes/pixelorama_eye.png | Bin .../Brushes/vline_3x3.png | Bin .../Palettes/Complementary.json | 0 .../Palettes/Default.json | 0 .../Palettes/Monochromatic.json | 0 .../Palettes/Shades.json | 0 .../Palettes/Triad.json | 0 .../Palettes/bubblegum16.json | 0 .../Patterns/Brick.png | Bin .../Patterns/Gravel.png | Bin .../Patterns/Ground_leaves.png | Bin .../Patterns/Light_Blue_Texture.png | Bin .../Patterns/Metro_tile.png | Bin .../Patterns/Purple_Texture.png | Bin .../Patterns/White_Marble.png | Bin .../Patterns/Wooden_planks_1.png | Bin .../Patterns/Yellow_Marble.png | Bin .../Patterns/small_stonebricks.png | Bin .../Patterns/wooden_planks_2.png | Bin src/XDGDataPaths.gd | 11 ++++++----- 38 files changed, 15 insertions(+), 14 deletions(-) rename {pixelorama => pixelorama_data}/.gdignore (100%) rename {pixelorama => pixelorama_data}/Brushes/Godot.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Grass/%Grass1.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Grass/%Grass2.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Grass/%Grass3.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Grass/%Grass4.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Grass/%Grass5.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Pixelorama.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Snow.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Star/%star1.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Star/%star2.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Star/%star3.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Star/%star4.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Star/%star5.png (100%) rename {pixelorama => pixelorama_data}/Brushes/Star/%star6.png (100%) rename {pixelorama => pixelorama_data}/Brushes/circle_blended.png (100%) rename {pixelorama => pixelorama_data}/Brushes/hline_3x3.png (100%) rename {pixelorama => pixelorama_data}/Brushes/pixelorama_eye.png (100%) rename {pixelorama => pixelorama_data}/Brushes/vline_3x3.png (100%) rename {pixelorama => pixelorama_data}/Palettes/Complementary.json (100%) rename {pixelorama => pixelorama_data}/Palettes/Default.json (100%) rename {pixelorama => pixelorama_data}/Palettes/Monochromatic.json (100%) rename {pixelorama => pixelorama_data}/Palettes/Shades.json (100%) rename {pixelorama => pixelorama_data}/Palettes/Triad.json (100%) rename {pixelorama => pixelorama_data}/Palettes/bubblegum16.json (100%) rename {pixelorama => pixelorama_data}/Patterns/Brick.png (100%) rename {pixelorama => pixelorama_data}/Patterns/Gravel.png (100%) rename {pixelorama => pixelorama_data}/Patterns/Ground_leaves.png (100%) rename {pixelorama => pixelorama_data}/Patterns/Light_Blue_Texture.png (100%) rename {pixelorama => pixelorama_data}/Patterns/Metro_tile.png (100%) rename {pixelorama => pixelorama_data}/Patterns/Purple_Texture.png (100%) rename {pixelorama => pixelorama_data}/Patterns/White_Marble.png (100%) rename {pixelorama => pixelorama_data}/Patterns/Wooden_planks_1.png (100%) rename {pixelorama => pixelorama_data}/Patterns/Yellow_Marble.png (100%) rename {pixelorama => pixelorama_data}/Patterns/small_stonebricks.png (100%) rename {pixelorama => pixelorama_data}/Patterns/wooden_planks_2.png (100%) diff --git a/.github/workflows/dev-desktop-builds.yml b/.github/workflows/dev-desktop-builds.yml index 5054fc005..809da424c 100644 --- a/.github/workflows/dev-desktop-builds.yml +++ b/.github/workflows/dev-desktop-builds.yml @@ -31,10 +31,10 @@ jobs: mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable - name: Windows Build 🔧 run: godot -v --export "Windows Desktop 64-bit" ./build/windows-64bit/$EXPORT_NAME.exe - - name: Copy pixelorama folder 📁 + - name: Copy pixelorama_data folder 📁 run: | - cp -R ./pixelorama ./build/windows-64bit - rm ./build/windows-64bit/pixelorama/.gdignore + cp -R ./pixelorama_data ./build/windows-64bit + rm ./build/windows-64bit/pixelorama_data/.gdignore - name: Upload Artifact 🚀 uses: actions/upload-artifact@v1 with: @@ -57,10 +57,10 @@ jobs: mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable - name: Linux Build 🔧 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: | - cp -R ./pixelorama ./build/linux-64bit - rm ./build/linux-64bit/pixelorama/.gdignore + cp -R ./pixelorama_data ./build/linux-64bit + rm ./build/linux-64bit/pixelorama_data/.gdignore - name: Upload Artifact 🚀 uses: actions/upload-artifact@v1 with: @@ -103,10 +103,10 @@ jobs: rm ./build/mac/Pixelorama.zip - 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 - - name: Copy pixelorama folder 📁 + - name: Copy pixelorama_data folder 📁 run: | - cp -R ./pixelorama ./build/mac - rm ./build/mac/pixelorama/.gdignore + cp -R ./pixelorama_data ./build/mac + rm ./build/mac/pixelorama_data/.gdignore - name: Create DMG archive 🔧 run: hdiutil create -size 70m -srcfolder ./build/mac -volname Pixelorama ./build/mac/Pixelorama.dmg - name: Upload Artifact 🚀 diff --git a/pixelorama/.gdignore b/pixelorama_data/.gdignore similarity index 100% rename from pixelorama/.gdignore rename to pixelorama_data/.gdignore diff --git a/pixelorama/Brushes/Godot.png b/pixelorama_data/Brushes/Godot.png similarity index 100% rename from pixelorama/Brushes/Godot.png rename to pixelorama_data/Brushes/Godot.png diff --git a/pixelorama/Brushes/Grass/%Grass1.png b/pixelorama_data/Brushes/Grass/%Grass1.png similarity index 100% rename from pixelorama/Brushes/Grass/%Grass1.png rename to pixelorama_data/Brushes/Grass/%Grass1.png diff --git a/pixelorama/Brushes/Grass/%Grass2.png b/pixelorama_data/Brushes/Grass/%Grass2.png similarity index 100% rename from pixelorama/Brushes/Grass/%Grass2.png rename to pixelorama_data/Brushes/Grass/%Grass2.png diff --git a/pixelorama/Brushes/Grass/%Grass3.png b/pixelorama_data/Brushes/Grass/%Grass3.png similarity index 100% rename from pixelorama/Brushes/Grass/%Grass3.png rename to pixelorama_data/Brushes/Grass/%Grass3.png diff --git a/pixelorama/Brushes/Grass/%Grass4.png b/pixelorama_data/Brushes/Grass/%Grass4.png similarity index 100% rename from pixelorama/Brushes/Grass/%Grass4.png rename to pixelorama_data/Brushes/Grass/%Grass4.png diff --git a/pixelorama/Brushes/Grass/%Grass5.png b/pixelorama_data/Brushes/Grass/%Grass5.png similarity index 100% rename from pixelorama/Brushes/Grass/%Grass5.png rename to pixelorama_data/Brushes/Grass/%Grass5.png diff --git a/pixelorama/Brushes/Pixelorama.png b/pixelorama_data/Brushes/Pixelorama.png similarity index 100% rename from pixelorama/Brushes/Pixelorama.png rename to pixelorama_data/Brushes/Pixelorama.png diff --git a/pixelorama/Brushes/Snow.png b/pixelorama_data/Brushes/Snow.png similarity index 100% rename from pixelorama/Brushes/Snow.png rename to pixelorama_data/Brushes/Snow.png diff --git a/pixelorama/Brushes/Star/%star1.png b/pixelorama_data/Brushes/Star/%star1.png similarity index 100% rename from pixelorama/Brushes/Star/%star1.png rename to pixelorama_data/Brushes/Star/%star1.png diff --git a/pixelorama/Brushes/Star/%star2.png b/pixelorama_data/Brushes/Star/%star2.png similarity index 100% rename from pixelorama/Brushes/Star/%star2.png rename to pixelorama_data/Brushes/Star/%star2.png diff --git a/pixelorama/Brushes/Star/%star3.png b/pixelorama_data/Brushes/Star/%star3.png similarity index 100% rename from pixelorama/Brushes/Star/%star3.png rename to pixelorama_data/Brushes/Star/%star3.png diff --git a/pixelorama/Brushes/Star/%star4.png b/pixelorama_data/Brushes/Star/%star4.png similarity index 100% rename from pixelorama/Brushes/Star/%star4.png rename to pixelorama_data/Brushes/Star/%star4.png diff --git a/pixelorama/Brushes/Star/%star5.png b/pixelorama_data/Brushes/Star/%star5.png similarity index 100% rename from pixelorama/Brushes/Star/%star5.png rename to pixelorama_data/Brushes/Star/%star5.png diff --git a/pixelorama/Brushes/Star/%star6.png b/pixelorama_data/Brushes/Star/%star6.png similarity index 100% rename from pixelorama/Brushes/Star/%star6.png rename to pixelorama_data/Brushes/Star/%star6.png diff --git a/pixelorama/Brushes/circle_blended.png b/pixelorama_data/Brushes/circle_blended.png similarity index 100% rename from pixelorama/Brushes/circle_blended.png rename to pixelorama_data/Brushes/circle_blended.png diff --git a/pixelorama/Brushes/hline_3x3.png b/pixelorama_data/Brushes/hline_3x3.png similarity index 100% rename from pixelorama/Brushes/hline_3x3.png rename to pixelorama_data/Brushes/hline_3x3.png diff --git a/pixelorama/Brushes/pixelorama_eye.png b/pixelorama_data/Brushes/pixelorama_eye.png similarity index 100% rename from pixelorama/Brushes/pixelorama_eye.png rename to pixelorama_data/Brushes/pixelorama_eye.png diff --git a/pixelorama/Brushes/vline_3x3.png b/pixelorama_data/Brushes/vline_3x3.png similarity index 100% rename from pixelorama/Brushes/vline_3x3.png rename to pixelorama_data/Brushes/vline_3x3.png diff --git a/pixelorama/Palettes/Complementary.json b/pixelorama_data/Palettes/Complementary.json similarity index 100% rename from pixelorama/Palettes/Complementary.json rename to pixelorama_data/Palettes/Complementary.json diff --git a/pixelorama/Palettes/Default.json b/pixelorama_data/Palettes/Default.json similarity index 100% rename from pixelorama/Palettes/Default.json rename to pixelorama_data/Palettes/Default.json diff --git a/pixelorama/Palettes/Monochromatic.json b/pixelorama_data/Palettes/Monochromatic.json similarity index 100% rename from pixelorama/Palettes/Monochromatic.json rename to pixelorama_data/Palettes/Monochromatic.json diff --git a/pixelorama/Palettes/Shades.json b/pixelorama_data/Palettes/Shades.json similarity index 100% rename from pixelorama/Palettes/Shades.json rename to pixelorama_data/Palettes/Shades.json diff --git a/pixelorama/Palettes/Triad.json b/pixelorama_data/Palettes/Triad.json similarity index 100% rename from pixelorama/Palettes/Triad.json rename to pixelorama_data/Palettes/Triad.json diff --git a/pixelorama/Palettes/bubblegum16.json b/pixelorama_data/Palettes/bubblegum16.json similarity index 100% rename from pixelorama/Palettes/bubblegum16.json rename to pixelorama_data/Palettes/bubblegum16.json diff --git a/pixelorama/Patterns/Brick.png b/pixelorama_data/Patterns/Brick.png similarity index 100% rename from pixelorama/Patterns/Brick.png rename to pixelorama_data/Patterns/Brick.png diff --git a/pixelorama/Patterns/Gravel.png b/pixelorama_data/Patterns/Gravel.png similarity index 100% rename from pixelorama/Patterns/Gravel.png rename to pixelorama_data/Patterns/Gravel.png diff --git a/pixelorama/Patterns/Ground_leaves.png b/pixelorama_data/Patterns/Ground_leaves.png similarity index 100% rename from pixelorama/Patterns/Ground_leaves.png rename to pixelorama_data/Patterns/Ground_leaves.png diff --git a/pixelorama/Patterns/Light_Blue_Texture.png b/pixelorama_data/Patterns/Light_Blue_Texture.png similarity index 100% rename from pixelorama/Patterns/Light_Blue_Texture.png rename to pixelorama_data/Patterns/Light_Blue_Texture.png diff --git a/pixelorama/Patterns/Metro_tile.png b/pixelorama_data/Patterns/Metro_tile.png similarity index 100% rename from pixelorama/Patterns/Metro_tile.png rename to pixelorama_data/Patterns/Metro_tile.png diff --git a/pixelorama/Patterns/Purple_Texture.png b/pixelorama_data/Patterns/Purple_Texture.png similarity index 100% rename from pixelorama/Patterns/Purple_Texture.png rename to pixelorama_data/Patterns/Purple_Texture.png diff --git a/pixelorama/Patterns/White_Marble.png b/pixelorama_data/Patterns/White_Marble.png similarity index 100% rename from pixelorama/Patterns/White_Marble.png rename to pixelorama_data/Patterns/White_Marble.png diff --git a/pixelorama/Patterns/Wooden_planks_1.png b/pixelorama_data/Patterns/Wooden_planks_1.png similarity index 100% rename from pixelorama/Patterns/Wooden_planks_1.png rename to pixelorama_data/Patterns/Wooden_planks_1.png diff --git a/pixelorama/Patterns/Yellow_Marble.png b/pixelorama_data/Patterns/Yellow_Marble.png similarity index 100% rename from pixelorama/Patterns/Yellow_Marble.png rename to pixelorama_data/Patterns/Yellow_Marble.png diff --git a/pixelorama/Patterns/small_stonebricks.png b/pixelorama_data/Patterns/small_stonebricks.png similarity index 100% rename from pixelorama/Patterns/small_stonebricks.png rename to pixelorama_data/Patterns/small_stonebricks.png diff --git a/pixelorama/Patterns/wooden_planks_2.png b/pixelorama_data/Patterns/wooden_planks_2.png similarity index 100% rename from pixelorama/Patterns/wooden_planks_2.png rename to pixelorama_data/Patterns/wooden_planks_2.png diff --git a/src/XDGDataPaths.gd b/src/XDGDataPaths.gd index 3642e39a2..4a5b97b17 100644 --- a/src/XDGDataPaths.gd +++ b/src/XDGDataPaths.gd @@ -12,7 +12,8 @@ var raw_xdg_data_dirs : Array const default_xdg_data_home_rel := ".local/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 brushes_data_subdirectory := "Brushes" @@ -35,7 +36,7 @@ func _init() -> void: default_xdg_data_home_rel ) xdg_data_home = raw_xdg_data_home.plus_file( - config_subdir_name + xdg_config_subdir_name ) # Create defaults @@ -43,7 +44,7 @@ func _init() -> void: raw_xdg_data_dirs = default_xdg_data_dirs for default_loc in raw_xdg_data_dirs: 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 @@ -52,7 +53,7 @@ func _init() -> void: # Checks the xdg data home var if OS.has_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. if OS.has_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 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)) else: