mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Use kde-neon extension for better desktop integration
This commit is contained in:
parent
65cc9bcd87
commit
b04f0e0d3d
@ -15,14 +15,13 @@ architectures:
|
||||
|
||||
apps:
|
||||
telegram-desktop:
|
||||
command: bin/desktop-launch telegram-desktop
|
||||
command: telegram-desktop
|
||||
common-id: org.telegram.desktop
|
||||
desktop: share/applications/telegramdesktop.desktop
|
||||
environment:
|
||||
# Use GTK3 cursor theme, icon theme and open/save file dialogs.
|
||||
QT_QPA_PLATFORMTHEME: gtk3
|
||||
# The blocker is https://github.com/ubuntu/snapcraft-desktop-helpers/issues/172
|
||||
DISABLE_WAYLAND: 1
|
||||
QT_QPA_PLATFORMTHEME: xdgdesktopportal
|
||||
extensions:
|
||||
- kde-neon
|
||||
plugs:
|
||||
- alsa
|
||||
- audio-playback
|
||||
@ -32,9 +31,11 @@ apps:
|
||||
- home
|
||||
- network
|
||||
- network-manager
|
||||
- opengl
|
||||
- pulseaudio
|
||||
- removable-media
|
||||
- unity7
|
||||
- wayland
|
||||
- x11
|
||||
|
||||
plugs:
|
||||
@ -57,6 +58,8 @@ plugs:
|
||||
layout:
|
||||
/usr/share/alsa:
|
||||
bind: $SNAP/usr/share/alsa
|
||||
/usr/share/X11:
|
||||
bind: $SNAP/usr/share/X11
|
||||
|
||||
parts:
|
||||
telegram:
|
||||
@ -64,13 +67,15 @@ parts:
|
||||
source: .
|
||||
source-type: git
|
||||
parse-info: [share/metainfo/telegramdesktop.appdata.xml]
|
||||
build-snaps:
|
||||
- kde-frameworks-5-core18-sdk
|
||||
- kde-frameworks-5-core18
|
||||
build-packages:
|
||||
- gcc-8
|
||||
- g++-8
|
||||
- qtbase5-private-dev
|
||||
- libmapbox-variant-dev
|
||||
- libasound2-dev
|
||||
- libdbusmenu-qt5-dev
|
||||
- libglvnd-dev
|
||||
- libhunspell-dev
|
||||
- liblz4-dev
|
||||
- liblzma-dev
|
||||
@ -80,9 +85,7 @@ parts:
|
||||
- libssl-dev
|
||||
- zlib1g-dev
|
||||
stage-packages:
|
||||
- qt5-image-formats-plugins
|
||||
- libasound2
|
||||
- libdbusmenu-qt5-2
|
||||
- libhunspell-1.6-0
|
||||
- liblz4-1
|
||||
- liblzma5
|
||||
@ -121,8 +124,8 @@ parts:
|
||||
sed -i 's|^Icon=.*|Icon=/share/icons/hicolor/512x512/apps/telegram.png|g' lib/xdg/telegramdesktop.desktop
|
||||
after:
|
||||
- cmake
|
||||
- desktop-qt5
|
||||
- ffmpeg
|
||||
- libdbusmenu-qt
|
||||
- openal
|
||||
- range-v3
|
||||
- xxhash
|
||||
@ -132,35 +135,32 @@ parts:
|
||||
source: Telegram/Patches
|
||||
prime: [-./*]
|
||||
|
||||
desktop-qt5:
|
||||
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
|
||||
source-subdir: qt
|
||||
plugin: make
|
||||
make-parameters: ["FLAVOR=qt5"]
|
||||
build-packages:
|
||||
- build-essential
|
||||
- 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
|
||||
- try: [appmenu-qt5] # not available on core18
|
||||
- locales-all
|
||||
- xdg-user-dirs
|
||||
- fcitx-frontend-qt5
|
||||
|
||||
qt5-gtk-platform:
|
||||
qtconf:
|
||||
plugin: nil
|
||||
stage-packages:
|
||||
- qt5-gtk-platformtheme
|
||||
override-build: |
|
||||
KF5_DIR=/snap/kde-frameworks-5-core18-sdk/current
|
||||
|
||||
cat << EOF > "$SNAPCRAFT_STAGE/qt.conf"
|
||||
[Paths]
|
||||
Prefix=$KF5_DIR/usr
|
||||
ArchData=lib/$SNAPCRAFT_ARCH_TRIPLET/qt5
|
||||
Binaries=lib/qt5/bin
|
||||
Data=share/qt5
|
||||
Documentation=share/qt5/doc
|
||||
Examples=lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/examples
|
||||
Headers=include/$SNAPCRAFT_ARCH_TRIPLET/qt5
|
||||
HostBinaries=lib/qt5/bin
|
||||
HostData=lib/$SNAPCRAFT_ARCH_TRIPLET/qt5
|
||||
HostLibraries=lib/$SNAPCRAFT_ARCH_TRIPLET
|
||||
Imports=lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/imports
|
||||
Libraries=lib/$SNAPCRAFT_ARCH_TRIPLET
|
||||
LibraryExecutables=lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/libexec
|
||||
Plugins=lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins
|
||||
Qml2Imports=lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml
|
||||
Settings=/etc/xdg
|
||||
Translations=share/qt5/translations
|
||||
EOF
|
||||
prime: [-./*]
|
||||
|
||||
cmake:
|
||||
source: "https://gitlab.kitware.com/cmake/cmake.git"
|
||||
@ -212,6 +212,20 @@ parts:
|
||||
after:
|
||||
- nasm
|
||||
|
||||
fcitx-qt5:
|
||||
source: https://github.com/fcitx/fcitx-qt5.git
|
||||
source-depth: 1
|
||||
source-tag: 1.2.4
|
||||
plugin: cmake
|
||||
build-snaps:
|
||||
- kde-frameworks-5-core18-sdk
|
||||
- kde-frameworks-5-core18
|
||||
build-packages:
|
||||
- libglvnd-dev
|
||||
configflags:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DENABLE_LIBRARY=OFF
|
||||
|
||||
ffmpeg:
|
||||
source: https://github.com/FFmpeg/FFmpeg.git
|
||||
source-depth: 1
|
||||
@ -338,6 +352,20 @@ parts:
|
||||
- nasm
|
||||
- dav1d
|
||||
|
||||
libdbusmenu-qt:
|
||||
source: https://github.com/unity8-team/libdbusmenu-qt.git
|
||||
source-depth: 1
|
||||
source-tag: 0.9.3+16.04.20160218-0ubuntu1
|
||||
plugin: cmake
|
||||
build-snaps:
|
||||
- kde-frameworks-5-core18-sdk
|
||||
- kde-frameworks-5-core18
|
||||
build-packages:
|
||||
- libglvnd-dev
|
||||
configflags:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DWITH_DOC=OFF
|
||||
|
||||
openal:
|
||||
source: https://github.com/kcat/openal-soft.git
|
||||
source-depth: 1
|
||||
@ -371,6 +399,50 @@ parts:
|
||||
- -DRANGE_V3_DOCS=OFF
|
||||
prime: [-./*]
|
||||
|
||||
qgnomeplatform:
|
||||
source: https://github.com/FedoraQt/QGnomePlatform.git
|
||||
source-depth: 1
|
||||
source-tag: 0.6.0
|
||||
plugin: dump
|
||||
build-snaps:
|
||||
- kde-frameworks-5-core18-sdk
|
||||
- kde-frameworks-5-core18
|
||||
build-packages:
|
||||
- libglvnd-dev
|
||||
- libgtk-3-dev
|
||||
stage-packages:
|
||||
- libgtk-3-0
|
||||
override-build: |
|
||||
KF5_DIR=/snap/kde-frameworks-5-core18-sdk/current
|
||||
|
||||
$KF5_DIR/usr/lib/qt5/bin/qmake -qtconf "$SNAPCRAFT_STAGE/qt.conf"
|
||||
make sub-theme-all
|
||||
install -D "$SNAPCRAFT_PART_BUILD/theme/libqgnomeplatform.so" "$SNAPCRAFT_PART_INSTALL/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platformthemes/libqgnomeplatform.so"
|
||||
after:
|
||||
- qtconf
|
||||
|
||||
qtimageformats:
|
||||
source: https://github.com/qt/qtimageformats.git
|
||||
source-depth: 1
|
||||
source-tag: v5.12.3
|
||||
plugin: dump
|
||||
build-snaps:
|
||||
- kde-frameworks-5-core18-sdk
|
||||
- kde-frameworks-5-core18
|
||||
build-packages:
|
||||
- libglvnd-dev
|
||||
override-build: |
|
||||
KF5_DIR=/snap/kde-frameworks-5-core18-sdk/current
|
||||
|
||||
$KF5_DIR/usr/lib/qt5/bin/qmake -qtconf "$SNAPCRAFT_STAGE/qt.conf"
|
||||
make
|
||||
make INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL" install
|
||||
|
||||
mv "$SNAPCRAFT_PART_INSTALL/$KF5_DIR/usr" "$SNAPCRAFT_PART_INSTALL/usr"
|
||||
rmdir "$SNAPCRAFT_PART_INSTALL/$KF5_DIR"
|
||||
after:
|
||||
- qtconf
|
||||
|
||||
xxhash:
|
||||
source: https://github.com/Cyan4973/xxHash.git
|
||||
source-depth: 1
|
||||
|
Loading…
Reference in New Issue
Block a user