Permalink
Switch branches/tags
Nothing to show
Find file
77a9a39 Oct 5, 2017
@didrocks @3v1n0 @tjyrinki @kenvandine @josepht @mikix @seb128 @oSoMoN @jdstrand
260 lines (257 sloc) 7.09 KB
name: desktop-helpers
version: 1
summary: Various technology desktop helpers for snapcraft
description: |
Helpers for gtk2, gtk3, qt4 and qt5 or gnome-platform and glib minimal launchers.
It brings the necessary code and exports for binding and using those
desktop technologies in a relocatable fashion, enabling binding with
global desktop theme, icon theme, image caching, fonts, mimetype handlers
application global menu and gsettings integration.
It also brings basics ubuntu dependency packages.
.
Usage:
1. add "after: [desktop-<technology>]" to your launcher:
- gtk2, gtk3, qt4 and qt5 corresponds to their respective toolkit
main dependencies and default choices.
- gnome-platform is similar to gtk3 without the extra depends, it's
meant to be used with the gnome platform which already includes those.
- glib-only enables to compile mime types and gsettings infos. If you
added your own graphical drivers, it will link them as well.
2. prepend your command with "desktop-launch", like:
commands: "desktop-launch foo" if foo is in $PATH. You can as well
specify: "desktop-launch $SNAP/foo".
3. add needed plugs to your application:
- for graphical application:
plugs: [x11] or:
[unity7] for appmenu, input methods, a11y integration. And/or:
[desktop] for GNOME Shell/Plasma
[wayland] for Wayland compositors
See https://forum.snapcraft.io/t/the-desktop-interfaces/2042
for details
- if your application needs hw acceleration:
plugs: [opengl]
- if your application needs access to sound:
plugs: [pulseaudio]
- accessing to user's home directory:
plugs: [home]
- read/write to gsettings:
plugs: [gsettings]
- if using "desktop" and need a11y or other input methods:
plugs: [desktop-legacy]
- use of the shared platform snap content, first define the plug:
plugs:
gnome-3-26-1604:
interface: content
target: gnome-platform
default-provider: gnome-3-26-1604:gnome-3-26-1604
and then make your apps use it:
plugs: [gnome-3-26-1604]
Note that an empty "gnome-platform" directory will be created for you
in your snap.
confinement: strict
parts:
desktop:
plugin: nil
gtk2:
source: .
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk2"]
build-packages:
- libgtk2.0-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk2.0-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk2.0-bin
- unity-gtk2-module
- libappindicator1
- locales-all
gtk3:
source: .
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk3"]
build-packages:
- libgtk-3-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk-3-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk-3-bin
- unity-gtk3-module
- libappindicator3-1
- locales-all
- xdg-user-dirs
qt4:
source: .
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt4"]
build-packages:
- libqt4-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqtgui4
- libgdk-pixbuf2.0-0
- libqt4-svg # for loading icon themes which are svg
- appmenu-qt
- locales-all
- sni-qt
qt5:
source: .
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- appmenu-qt5
- locales-all
glib-only:
source: .
source-subdir: glib-only
plugin: make
build-packages:
- libglib2.0-dev
stage-packages:
- libglib2.0-bin
desktop-gtk2:
source: .
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk2"]
build-packages:
- libgtk2.0-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk2.0-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk2.0-bin
- unity-gtk2-module
- locales-all
- libappindicator1
- xdg-user-dirs
desktop-gtk3:
source: .
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk3"]
build-packages:
- libgtk-3-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk-3-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk-3-bin
- unity-gtk3-module
- libappindicator3-1
- locales-all
- xdg-user-dirs
desktop-qt4:
source: .
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt4"]
build-packages:
- libqt4-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqtgui4
- libgdk-pixbuf2.0-0
- libqt4-svg # for loading icon themes which are svg
- appmenu-qt
- locales-all
- sni-qt
- xdg-user-dirs
desktop-qt5:
source: .
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- appmenu-qt5
- locales-all
- xdg-user-dirs
desktop-glib-only:
source: .
source-subdir: glib-only
plugin: make
build-packages:
- libglib2.0-dev
stage-packages:
- libglib2.0-bin
desktop-gnome-platform:
source: .
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk3"]
build-packages:
- libgtk-3-dev
install: mkdir -p $SNAPCRAFT_PART_INSTALL/gnome-platform