From d8ee6031a5cef17ad945b144056719649702777f Mon Sep 17 00:00:00 2001 From: NicBOMB <19939315+NicBOMB@users.noreply.github.com> Date: Fri, 23 Aug 2024 09:50:49 -0700 Subject: [PATCH] Fix #1 replace shell script with environment variable for wayland compatibility also add builddir to gitignore per flatpak builder docs build command --- .gitignore | 1 + me.proton.Mail.yml | 21 ++------------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 1ff8887..a330569 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ### Flatpak ### .flatpak-builder build +builddir build-dir repo diff --git a/me.proton.Mail.yml b/me.proton.Mail.yml index 6cfdd0a..8a54b93 100644 --- a/me.proton.Mail.yml +++ b/me.proton.Mail.yml @@ -13,6 +13,7 @@ finish-args: - --socket=fallback-x11 - --talk-name=org.freedesktop.secrets - --env=XCURSOR_PATH=~/.icons:/app/share/icons:/icons:/run/host/user-share/icons:/run/host/share/icons + - --env=ELECTRON_OZONE_PLATFORM_HINT=auto modules: - shared-modules/libsecret/libsecret.json - name: proton-mail @@ -20,7 +21,6 @@ modules: build-commands: - bsdtar -Oxf ProtonMail.deb data.tar.xz | bsdtar -xf - - mv "usr/lib/proton-mail" ${FLATPAK_DEST}/proton-mail - - rm ${FLATPAK_DEST}/proton-mail/chrome-sandbox # To allow separate locales # https://searchfox.org/mozilla-central/rev/8a4f55bc09ffc5c25dcb4586c51ae4a9fee77b4c/taskcluster/docker/firefox-flatpak/runme.sh#131-133 @@ -59,24 +59,7 @@ modules: - type: script dest-filename: start-proton-mail.sh commands: - # Reference: https://github.com/flathub/im.riot.Riot/blob/491621f36256eca14609477482cdeeb800714ea5/element.sh - - | - set -oue pipefail - - export TMPDIR="${XDG_RUNTIME_DIR}/app/${FLATPAK_ID}" - - FLAGS='' - - if [[ $XDG_SESSION_TYPE == "wayland" && -e "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]] - then - FLAGS="$FLAGS --enable-wayland-ime --ozone-platform-hint=wayland --enable-features=WaylandWindowDecorations --gtk-version=4" - if [ -c /dev/nvidia0 ] - then - FLAGS="$FLAGS --disable-gpu-sandbox" - fi - fi - - exec zypak-wrapper "/app/proton-mail/Proton Mail Beta" $FLAGS "$@" + - exec zypak-wrapper "/app/proton-mail/Proton Mail Beta" "$@" - type: file path: me.proton.Mail.metainfo.xml