Skip to content

Commit

Permalink
Add required gsettings schema to fix issue #58
Browse files Browse the repository at this point in the history
Add gnome-settings-daemon-common which includes the antialiasing key
from the org.gnome.settings-daemon.plugins.xsettings schema and compile
this during the build and finally ensure we add this path to XDG_DATA_DIRS
so it can be found at runtime to fix crash when running pgtk on newer
Ubuntu releases under Wayland.

Signed-off-by: Alex Murray <[email protected]>
  • Loading branch information
alexmurray committed Nov 24, 2023
1 parent 67c1c04 commit bb8ec99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup-env
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ if [ -f "$SNAP/usr/lib/$ARCH/libgtk-3-0/gtk-query-immodules-3.0" ]; then
"$SNAP/usr/lib/$ARCH/libgtk-3-0/gtk-query-immodules-3.0" "$SNAP/usr/lib/$ARCH/gtk-3.0/3.0.0/immodules/"im-*.so > "$GTK_IM_MODULE_FILE"
fi

# Set XDG_DATA_DIRS so that we prefer the snap's and then the
# the hosts gsettings schemas
export XDG_DATA_DIRS="$SNAP/usr/share:$XDG_DATA_DIRS"

# native comp needs to find as etc and this comes from within the snap
# itself
export PATH="$PATH:/snap/emacs/current/usr/bin"
Expand Down
2 changes: 2 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ parts:
stage-packages:
- gcc-10 # for tree-sitter
- g++-10 # for tree-sitter
- gnome-settings-daemon-common # for antialiasing gsetting
- gvfs
- ibus-gtk3
- libasound2
Expand Down Expand Up @@ -246,6 +247,7 @@ parts:
override-prime: |
set -eu
snapcraftctl prime
glib-compile-schemas $SNAPCRAFT_PRIME/usr/share/glib-2.0/schemas/
# Fix-up application icon lookup
sed -i -e 's|^Icon=.*|Icon=usr/share/icons/hicolor/scalable/apps/emacs.svg|g' usr/share/applications/emacs*.desktop
# also fixup emacsclient.desktop file since snapd replaces the Exec= line
Expand Down

0 comments on commit bb8ec99

Please sign in to comment.