Skip to content

Commit

Permalink
Fix #1
Browse files Browse the repository at this point in the history
replace shell script with environment variable for wayland compatibility

also add builddir to gitignore per flatpak builder docs build command
  • Loading branch information
NicBOMB committed Aug 23, 2024
1 parent 77230e9 commit 5ba6106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
### Flatpak ###
.flatpak-builder
build
builddir
build-dir
repo

Expand Down
21 changes: 2 additions & 19 deletions me.proton.Mail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ 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
buildsystem: simple
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
Expand Down Expand Up @@ -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-pass/Proton Mail Beta" "$@"

- type: file
path: me.proton.Mail.metainfo.xml

0 comments on commit 5ba6106

Please sign in to comment.