From cad464eb99999a5036418b75a195cc3e27ed27da Mon Sep 17 00:00:00 2001 From: Marquis Kurt Date: Sat, 25 Sep 2021 06:42:31 -0400 Subject: [PATCH] (Port) Port Pixelorama to Ubuntu Touch (#517) * Add support for creating Ubuntu Touch click packages. The clickable directory contains the files necessary to create a click package designed for Ubuntu Touch, a community-driven Linux distro for mobile phones as an alternative to iOS and Android. A new CI script has been added to create the packages, which is copied over from one of my other projects. Please change this to suit your needs. A new custom feature "clickable" has been added to the project settings to allow customizations for the Ubuntu Touch platform. Signed-off-by: Marquis Kurt * Make clickable CI follow more closely to desktop builds * Remove sudo from clickable install step * Install software-properties-common * Comment out docker startups in click install * Change export name for Click version * Change name and export mode to pack only * Change means of copying data to clickable dir * Install sudo to docker * Add -g to docker add user * Remove docker user creation * Remove other chpasswd stuff * Split CI into two jobs * Make build-ubports.sh runnable * Use HiPDI GUI theme on Clickable * Move clickable folder to Misc, add release CI targets * Add mobile to clickable settings * Add pixelorama_data to install data * Create pixelorama_data subdir in click itself * Change default save dir for clickable * Update AppArmor policy * Update clickable version to test AppArmor * Revert changes and use user data dir * Add README pertaining to Ubuntu Touch * Remove GODOT_MAC_VERSION from UT port workflow Co-authored-by: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> --- .github/workflows/dev-clickable-builds.yml | 75 +++++++++++++++++++++ .github/workflows/release.yml | 66 ++++++++++++++++++ .gitignore | 5 +- Misc/Clickable/.gdignore | 0 Misc/Clickable/README.md | 34 ++++++++++ Misc/Clickable/build-ubports.sh | 75 +++++++++++++++++++++ Misc/Clickable/click/icon.png | Bin 0 -> 1068 bytes Misc/Clickable/click/manifest.json | 15 +++++ Misc/Clickable/click/pixelorama.apparmor | 9 +++ Misc/Clickable/click/pixelorama.desktop | 8 +++ Misc/Clickable/clickable.json | 31 +++++++++ export_presets.cfg | 54 ++++++++++++++- project.godot | 54 ++++++++------- src/Main.gd | 10 +++ 14 files changed, 408 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/dev-clickable-builds.yml create mode 100644 Misc/Clickable/.gdignore create mode 100644 Misc/Clickable/README.md create mode 100755 Misc/Clickable/build-ubports.sh create mode 100644 Misc/Clickable/click/icon.png create mode 100644 Misc/Clickable/click/manifest.json create mode 100644 Misc/Clickable/click/pixelorama.apparmor create mode 100644 Misc/Clickable/click/pixelorama.desktop create mode 100644 Misc/Clickable/clickable.json diff --git a/.github/workflows/dev-clickable-builds.yml b/.github/workflows/dev-clickable-builds.yml new file mode 100644 index 000000000..d4b7ebb7d --- /dev/null +++ b/.github/workflows/dev-clickable-builds.yml @@ -0,0 +1,75 @@ +name: "dev-clickable-builds" +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + paths-ignore: + - "Translations/*" + - "installer/*.pot" + - "installer/po/*" + +env: + GODOT_VERSION: 3.3 + EXPORT_NAME: Pixelorama + +jobs: + build_pck: + name: Create Pixelorama pack data + runs-on: ubuntu-latest + container: + image: docker://barichello/godot-ci:3.3 + steps: + - name: Clone source + uses: actions/checkout@v2 + with: + submodules: true + - name: Linux Build 🔧 + run: godot -v --export-pack "Clickable (Package Only)" ./Misc/Clickable/Pixelorama.pck + - name: Copy Pixelorama data files + run: | + cp -R ./pixelorama_data ./Misc/Clickable + - name: Upload data files for click package + uses: actions/upload-artifact@v2 + with: + name: pixelorama_click_data + path: Misc/Clickable/ + retention-days: 14 + build_click: + name: Create click package + needs: build_pck + runs-on: ubuntu-latest + strategy: + matrix: + architectures: + - armhf + - arm64 + steps: + - name: Clone source + uses: actions/checkout@v2 + - name: Install clickable dependencies + run: | + sudo add-apt-repository ppa:bhdouglass/clickable + sudo apt update + sudo apt install -y containerd docker.io runc clickable + sudo systemctl unmask docker.service + sudo systemctl start docker.service + - name: Remove existing click folder + run: rm -r ./Misc/Clickable + - name: Download click data + uses: actions/download-artifact@v2 + with: + name: pixelorama_click_data + path: ./Misc/Clickable + - name: Run Clickable + run: | + cd Misc/Clickable + chmod +x build-ubports.sh + clickable build + env: + CLICKABLE_ARCH: ${{ matrix.architectures }} + - name: Upload click package artifact + uses: actions/upload-artifact@v2 + with: + name: pixelorama_click_packages + path: Misc/Clickable/build/**.click diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d110ed252..b66973e34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,6 +138,72 @@ jobs: butler push ./build/linux-64bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-64 --userversion ${{env.TAG}} butler push ./build/linux-32bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-32 --userversion ${{env.TAG}} + build_pck: + name: Create Pixelorama pack data for Clickable + runs-on: ubuntu-latest + container: + image: docker://barichello/godot-ci:3.3 + steps: + - name: Clone source + uses: actions/checkout@v2 + with: + submodules: true + - name: Linux Build 🔧 + run: godot -v --export-pack "Clickable (Package Only)" ./Misc/Clickable/Pixelorama.pck + - name: Copy Pixelorama data files + run: | + cp -R ./pixelorama_data ./Misc/Clickable + - name: Upload data files for click package + uses: actions/upload-artifact@v2 + with: + name: pixelorama_click_data + path: Misc/Clickable/ + retention-days: 14 + export-clickable: + name: Create click package + needs: build_pck + runs-on: ubuntu-latest + strategy: + matrix: + architectures: + - armhf + - arm64 + steps: + - name: Clone source + uses: actions/checkout@v2 + - name: Install clickable dependencies + run: | + sudo add-apt-repository ppa:bhdouglass/clickable + sudo apt update + sudo apt install -y containerd docker.io runc clickable + sudo systemctl unmask docker.service + sudo systemctl start docker.service + - name: Remove existing click folder + run: rm -r ./Misc/Clickable + - name: Download click data + uses: actions/download-artifact@v2 + with: + name: pixelorama_click_data + path: ./Misc/Clickable + - name: Run Clickable + run: | + cd Misc/Clickable + chmod +x build-ubports.sh + clickable build + env: + CLICKABLE_ARCH: ${{ matrix.architectures }} + - name: Upload Clickable Release Asset 🚀 + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: Misc/Clickable/build/**.click + asset_name: ${{env.EXPORT_NAME}}[CLickable]${{ matrix.architectures }}.tar.gz + tag: ${{ env.TAG }} + overwrite: true + - name: Upload Release Assets to itch.io 🎮 + run: | + butler push Misc/Clickable/build/**.click ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:ubuntu-touch-${{ matrix.architectures }} --userversion ${{env.TAG}} + export-mac: name: Mac Export 🍎 runs-on: macos-latest diff --git a/.gitignore b/.gitignore index 70afc5c96..db79d0147 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,7 @@ mono_crash.*.json *~ #Visual Studio Code ignores -.vscode/ \ No newline at end of file +.vscode/ + +#macOS ignores +.DS_Store \ No newline at end of file diff --git a/Misc/Clickable/.gdignore b/Misc/Clickable/.gdignore new file mode 100644 index 000000000..e69de29bb diff --git a/Misc/Clickable/README.md b/Misc/Clickable/README.md new file mode 100644 index 000000000..e0b8fcf12 --- /dev/null +++ b/Misc/Clickable/README.md @@ -0,0 +1,34 @@ +# Building Ubuntu Touch click packages + +# Ubuntu Touch Click Packages + +The following subdirectory contains the necessary development files to create a click package of the app for [Ubuntu Touch](https://ubuntu-touch.io). Special thanks to @abmyii and the UBPorts team for making this possible. + +## Build instructions + +1. Start by exporting the pack file with the preset "Clickable (package only)". +2. Copy the resulting .pck file from the `dist/linux` directory (or wherever you specified the Linux export) into the `Misc/Clickable` directory and rename it to `Pixelorama.pck`. +3. Copy the `pixelorama_data` directory from the root into `Misc/Clickable`. +4. In the terminal, run the following: + +``` +$ cd Misc/Clickable +$ clickable build +``` + +The resulting click file should be present in the `build` directory inside of `Misc/Clickable`, which can be installed on an Ubuntu Touch device by copying the file over. + +### Multiple architectures + +Note: To build for different architectures, pass in the `CLICKABLE_ARCH `environment variable. + +For example, to build for armhf and arm64: +``` +$ CLICKABLE_ARCH=armhf clickable build +$ CLICKABLE_ARCH=arm64 clickable build +``` +> Note: It is recommended that you provide packages for at least the `armhf` and `arm64` architectures. + +### Important gotcha: File loading and saving + +Due to AppArmor policy restrictions, you are not able to save to anywhere outside of the user data directroy. \ No newline at end of file diff --git a/Misc/Clickable/build-ubports.sh b/Misc/Clickable/build-ubports.sh new file mode 100755 index 000000000..17f80b5b1 --- /dev/null +++ b/Misc/Clickable/build-ubports.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +BUILD_DIR=$PWD +CACHE_DIR=$PWD/../.godot-ubports + +# The latest build can always be obtained from this URL +URL_LATEST=https://gitlab.com/abmyii/ubports-godot/-/jobs/artifacts/ut-port-stable/download?job=xenial_${ARCH}_binary + +# Determine the ID of the latest successful pipeline +function getNewestVersion() { + wget -qO - https://gitlab.com/api/v4/projects/23065313/pipelines?status=success | tr ',' '\n' | grep id | head -n 1 | cut -d ':' -f 2 > newest +} + +# Download a build +function download() { + # Accept job ID as single argument + if [ $# = 1 ]; then + # Check if the most recently downloaded build for this architecture is from the same pipeline + if [ -f $1.* ]; then + echo "Already downloaded artifacts from from job $1. Using cached files." + else + # Download requested build and update version indicator + wget https://gitlab.com/api/v4/projects/23065313/jobs/$1/artifacts -O temp.zip + DOWNLOADED=`unzip -Z -1 temp.zip` + DOWNLOADED=${DOWNLOADED##*.} + rm -f *.$DOWNLOADED + touch "$1.$DOWNLOADED" + echo "Downloaded build for $DOWNLOADED from job $JOB." + unzip -o temp.zip + rm temp.zip + fi + # If no argument given, download latest build + else + echo "Removing references to other builds..." + rm -f *.${ARCH} + echo "Downloading latest build..." + wget $URL_LATEST -O temp.zip + unzip -o temp.zip + rm temp.zip + fi +} + +# Store everything in a separate cache directory +mkdir -p "$CACHE_DIR" +cd "$CACHE_DIR" + +# If single argument given, download from that pipeline +if [ $# = 1 ]; then + wget -qO - https://gitlab.com/api/v4/projects/23065313/pipelines/$1/jobs | tr ',' '\n' | grep -E -e "^\W+id" | sed -e 's/[^0-9]//g' | while read JOB; do + echo "Downloading artifacts from job $JOB in pipeline $1..." + download $JOB + done +# If nothing has been downloaded before, download newest build +elif [ ! -f "local-version.${ARCH}" ]; then + echo "No local copy found." + getNewestVersion + download + mv newest local-version.${ARCH} +# Otherwise, check if there's a newer version available +else + getNewestVersion + diff newest local-version.${ARCH} > /dev/null + if [ $? = 0 ]; then + echo "No newer version to download. Using cached build." + rm newest + else + echo "Newer version available." + download + mv newest local-version.${ARCH} + fi +fi + +# Copy Godot executable to build directory +cd "$BUILD_DIR" +cp "$CACHE_DIR"/godot.ubports.${ARCH} godot diff --git a/Misc/Clickable/click/icon.png b/Misc/Clickable/click/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0164c591acf7ac362eea3bbf66c1d9f3130cbd3a GIT binary patch literal 1068 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=GWAJY5_^ zD(1YsrkFP+P{QruzY?BhVo{!2ZdWJw)>1bl>< z%6N(*j;Wvfob%xC8QYzwFK#$nRXt-LucP|31HZ_r<@N{r<-n|GvKa?~8vX_O!7S;uo;hpBgUD{(bW2;`8tS^}h4py=#x` z-TI1Zqh0oItG3JE{m$HAz(^~!;p!L0((viqFRKeYV`oTYq8VEKl6l$Q|DTF}wQLEO z&v*a+zwU?0F8j0m42M`~hNgiMkzLZImuG?T`1w^{N&T(Imp{Jv_chO+=2m~++T#u_;($HfEvxvHXr$dy0Su0mihDNZ|xV}UyKej7-)rV)c-xHJ", + "name": "pixelorama.orama-interactive", + "title": "Pixelorama", + "version": "0.9-beta" +} \ No newline at end of file diff --git a/Misc/Clickable/click/pixelorama.apparmor b/Misc/Clickable/click/pixelorama.apparmor new file mode 100644 index 000000000..447db67eb --- /dev/null +++ b/Misc/Clickable/click/pixelorama.apparmor @@ -0,0 +1,9 @@ +{ + "policy_groups": [ + "audio", + "keep-display-on", + "content_exchange", + "content_exchange_source" + ], + "policy_version": 16.04 +} diff --git a/Misc/Clickable/click/pixelorama.desktop b/Misc/Clickable/click/pixelorama.desktop new file mode 100644 index 000000000..8e5229109 --- /dev/null +++ b/Misc/Clickable/click/pixelorama.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Pixelorama +Comment=A free & open-source 2D sprite editor, made with the Godot Engine! +Exec=godot --main-pack Pixelorama.pck --maximized +Icon=icon.png +Terminal=false +Type=Application +X-Ubuntu-Touch=true diff --git a/Misc/Clickable/clickable.json b/Misc/Clickable/clickable.json new file mode 100644 index 000000000..d71dbd8c3 --- /dev/null +++ b/Misc/Clickable/clickable.json @@ -0,0 +1,31 @@ +{ + "clickable_minimum_required": "6.17.1", + "kill": "pixelorama", + "builder": "custom", + "build": "${ROOT}/build-ubports.sh", + "build_dir": "${ROOT}/build", + "dependencies_host": [ + "wget", + "libgles2" + ], + "dependencies_target": [ + "libvpx3", + "libsdl2-2.0-0", + "libasound2", + "libglib2.0-0", + "libpng16-16", + "libfreetype6" + ], + "install_data": { + "${BUILD_DIR}/godot": "${INSTALL_DIR}", + "${ROOT}/click/*": "${INSTALL_DIR}", + "${ROOT}/pixelorama_data/*": "${INSTALL_DIR}/pixelorama_data", + "${ROOT}/*.pck": "${INSTALL_DIR}" + }, + "install_lib": [ + "/usr/lib/${ARCH_TRIPLET}/libvpx.so.3*", + "/usr/lib/${ARCH_TRIPLET}/libsndio.so.6.1", + "/usr/lib/${ARCH_TRIPLET}/libvorbis.so.0*", + "/usr/lib/${ARCH_TRIPLET}/libSDL2-2.0.so*" + ] +} \ No newline at end of file diff --git a/export_presets.cfg b/export_presets.cfg index 4b055c10f..adc23a1d2 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -23,7 +23,6 @@ texture_format/etc=false texture_format/etc2=false texture_format/no_bptc_fallbacks=true codesign/enable=false -codesign/identity_type=0 codesign/identity="" codesign/password="" codesign/timestamp=true @@ -93,6 +92,33 @@ application/copyright="Orama Interactive and contributors 2019-present" display/high_res=false privacy/camera_usage_description="" privacy/microphone_usage_description="" +codesign/enable=true +codesign/identity="" +codesign/timestamp=true +codesign/hardened_runtime=true +codesign/replace_existing_signature=true +codesign/entitlements/custom_file="" +codesign/entitlements/allow_jit_code_execution=false +codesign/entitlements/allow_unsigned_executable_memory=false +codesign/entitlements/allow_dyld_environment_variables=false +codesign/entitlements/disable_library_validation=false +codesign/entitlements/audio_input=false +codesign/entitlements/camera=false +codesign/entitlements/location=false +codesign/entitlements/address_book=false +codesign/entitlements/calendars=false +codesign/entitlements/photos_library=false +codesign/entitlements/apple_events=false +codesign/entitlements/app_sandbox/enabled=false +codesign/entitlements/app_sandbox/network_server=false +codesign/entitlements/app_sandbox/network_client=false +codesign/entitlements/app_sandbox/device_usb=false +codesign/entitlements/app_sandbox/device_bluetooth=false +codesign/entitlements/app_sandbox/files_downloads=0 +codesign/entitlements/app_sandbox/files_pictures=0 +codesign/entitlements/app_sandbox/files_music=0 +codesign/entitlements/app_sandbox/files_movies=0 +codesign/custom_options=PoolStringArray( ) texture_format/s3tc=true texture_format/etc=false texture_format/etc2=false @@ -147,7 +173,6 @@ texture_format/etc=false texture_format/etc2=false texture_format/no_bptc_fallbacks=true codesign/enable=false -codesign/identity_type=0 codesign/identity="" codesign/password="" codesign/timestamp=true @@ -188,3 +213,28 @@ texture_format/s3tc=true texture_format/etc=false texture_format/etc2=false texture_format/no_bptc_fallbacks=true + +[preset.6] + +name="Clickable (Package Only)" +platform="Linux/X11" +runnable=false +custom_features="clickable,mobile" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +script_export_mode=1 +script_encryption_key="" + +[preset.6.options] + +custom_template/debug="" +custom_template/release="" +binary_format/64_bits=false +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true diff --git a/project.godot b/project.godot index b599d80b3..c8f9f4786 100644 --- a/project.godot +++ b/project.godot @@ -182,6 +182,10 @@ window/per_pixel_transparency/enabled.HTML5=false window/per_pixel_transparency/allowed.OSX=false window/per_pixel_transparency/enabled.OSX=false +[gui] + +theme/use_hidpi.clickable=true + [importer_defaults] texture={ @@ -278,12 +282,12 @@ right_rectangle_select_tool={ } copy={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":67,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":67,"unicode":0,"echo":false,"script":null) ] } paste={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":86,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":86,"unicode":0,"echo":false,"script":null) ] } left_shading_tool={ @@ -324,7 +328,7 @@ ctrl={ } redo_secondary={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":false,"command":true,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":true,"command":true,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) ] } delete={ @@ -339,62 +343,62 @@ space={ } new_file={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":78,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":78,"unicode":0,"echo":false,"script":null) ] } open_file={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":79,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":79,"unicode":0,"echo":false,"script":null) ] } save_file={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) ] } save_file_as={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":false,"command":true,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":true,"command":true,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) ] } export_file={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null) ] } export_file_as={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":false,"command":true,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":true,"command":true,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null) ] } quit={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null) ] } undo={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) ] } redo={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":89,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":89,"unicode":0,"echo":false,"script":null) ] } show_grid={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":71,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":71,"unicode":0,"echo":false,"script":null) ] } show_rulers={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null) ] } show_guides={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null) ] } left_zoom_tool={ @@ -414,22 +418,22 @@ switch_colors={ } go_to_first_frame={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777229,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":16777229,"unicode":0,"echo":false,"script":null) ] } go_to_last_frame={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null) ] } go_to_previous_frame={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) ] } go_to_next_frame={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) ] } play_backwards={ @@ -454,7 +458,7 @@ open_docs={ } cut={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":88,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":88,"unicode":0,"echo":false,"script":null) ] } mirror_view={ @@ -474,12 +478,12 @@ right_pan_tool={ } show_pixel_grid={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":72,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":72,"unicode":0,"echo":false,"script":null) ] } clear_selection={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) ] } left_rectangletool_tool={ @@ -514,12 +518,12 @@ right_move_tool={ } select_all={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) ] } invert_selection={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":73,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":73,"unicode":0,"echo":false,"script":null) ] } left_color_select_tool={ @@ -600,7 +604,7 @@ right_polygon_select_tool={ } new_brush={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":66,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":true,"command":true,"pressed":false,"scancode":66,"unicode":0,"echo":false,"script":null) ] } diff --git a/src/Main.gd b/src/Main.gd index bb62b85a0..8197d6504 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -48,6 +48,16 @@ func _ready() -> void: Global.open_sprites_dialog.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DESKTOP) Global.save_sprites_dialog.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DESKTOP) + # FIXME: OS.get_system_dir does not grab the correct directory for Ubuntu Touch. + # Additionally, AppArmor policies prevent the app from writing to the /home + # directory. Until the proper AppArmor policies are determined to write to these + # files accordingly, use the user data folder where cache.ini is stored. + # Ubuntu Touch users can access these files in the File Manager at the directory + # ~/.local/pixelorama.orama-interactive/godot/app_userdata/Pixelorama. + if OS.has_feature("clickable"): + Global.open_sprites_dialog.current_dir = OS.get_user_data_dir() + Global.save_sprites_dialog.current_dir = OS.get_user_data_dir() + var zstd_checkbox := CheckBox.new() zstd_checkbox.name = "ZSTDCompression" zstd_checkbox.pressed = true