mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-04-01 00:08:02 +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:
|
apps:
|
||||||
telegram-desktop:
|
telegram-desktop:
|
||||||
command: bin/desktop-launch telegram-desktop
|
command: telegram-desktop
|
||||||
common-id: org.telegram.desktop
|
common-id: org.telegram.desktop
|
||||||
desktop: share/applications/telegramdesktop.desktop
|
desktop: share/applications/telegramdesktop.desktop
|
||||||
environment:
|
environment:
|
||||||
# Use GTK3 cursor theme, icon theme and open/save file dialogs.
|
QT_QPA_PLATFORMTHEME: xdgdesktopportal
|
||||||
QT_QPA_PLATFORMTHEME: gtk3
|
extensions:
|
||||||
# The blocker is https://github.com/ubuntu/snapcraft-desktop-helpers/issues/172
|
- kde-neon
|
||||||
DISABLE_WAYLAND: 1
|
|
||||||
plugs:
|
plugs:
|
||||||
- alsa
|
- alsa
|
||||||
- audio-playback
|
- audio-playback
|
||||||
@ -32,9 +31,11 @@ apps:
|
|||||||
- home
|
- home
|
||||||
- network
|
- network
|
||||||
- network-manager
|
- network-manager
|
||||||
|
- opengl
|
||||||
- pulseaudio
|
- pulseaudio
|
||||||
- removable-media
|
- removable-media
|
||||||
- unity7
|
- unity7
|
||||||
|
- wayland
|
||||||
- x11
|
- x11
|
||||||
|
|
||||||
plugs:
|
plugs:
|
||||||
@ -57,6 +58,8 @@ plugs:
|
|||||||
layout:
|
layout:
|
||||||
/usr/share/alsa:
|
/usr/share/alsa:
|
||||||
bind: $SNAP/usr/share/alsa
|
bind: $SNAP/usr/share/alsa
|
||||||
|
/usr/share/X11:
|
||||||
|
bind: $SNAP/usr/share/X11
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
telegram:
|
telegram:
|
||||||
@ -64,13 +67,15 @@ parts:
|
|||||||
source: .
|
source: .
|
||||||
source-type: git
|
source-type: git
|
||||||
parse-info: [share/metainfo/telegramdesktop.appdata.xml]
|
parse-info: [share/metainfo/telegramdesktop.appdata.xml]
|
||||||
|
build-snaps:
|
||||||
|
- kde-frameworks-5-core18-sdk
|
||||||
|
- kde-frameworks-5-core18
|
||||||
build-packages:
|
build-packages:
|
||||||
- gcc-8
|
- gcc-8
|
||||||
- g++-8
|
- g++-8
|
||||||
- qtbase5-private-dev
|
|
||||||
- libmapbox-variant-dev
|
- libmapbox-variant-dev
|
||||||
- libasound2-dev
|
- libasound2-dev
|
||||||
- libdbusmenu-qt5-dev
|
- libglvnd-dev
|
||||||
- libhunspell-dev
|
- libhunspell-dev
|
||||||
- liblz4-dev
|
- liblz4-dev
|
||||||
- liblzma-dev
|
- liblzma-dev
|
||||||
@ -80,9 +85,7 @@ parts:
|
|||||||
- libssl-dev
|
- libssl-dev
|
||||||
- zlib1g-dev
|
- zlib1g-dev
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- qt5-image-formats-plugins
|
|
||||||
- libasound2
|
- libasound2
|
||||||
- libdbusmenu-qt5-2
|
|
||||||
- libhunspell-1.6-0
|
- libhunspell-1.6-0
|
||||||
- liblz4-1
|
- liblz4-1
|
||||||
- liblzma5
|
- liblzma5
|
||||||
@ -121,8 +124,8 @@ parts:
|
|||||||
sed -i 's|^Icon=.*|Icon=/share/icons/hicolor/512x512/apps/telegram.png|g' lib/xdg/telegramdesktop.desktop
|
sed -i 's|^Icon=.*|Icon=/share/icons/hicolor/512x512/apps/telegram.png|g' lib/xdg/telegramdesktop.desktop
|
||||||
after:
|
after:
|
||||||
- cmake
|
- cmake
|
||||||
- desktop-qt5
|
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
|
- libdbusmenu-qt
|
||||||
- openal
|
- openal
|
||||||
- range-v3
|
- range-v3
|
||||||
- xxhash
|
- xxhash
|
||||||
@ -132,35 +135,32 @@ parts:
|
|||||||
source: Telegram/Patches
|
source: Telegram/Patches
|
||||||
prime: [-./*]
|
prime: [-./*]
|
||||||
|
|
||||||
desktop-qt5:
|
qtconf:
|
||||||
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:
|
|
||||||
plugin: nil
|
plugin: nil
|
||||||
stage-packages:
|
override-build: |
|
||||||
- qt5-gtk-platformtheme
|
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:
|
cmake:
|
||||||
source: "https://gitlab.kitware.com/cmake/cmake.git"
|
source: "https://gitlab.kitware.com/cmake/cmake.git"
|
||||||
@ -212,6 +212,20 @@ parts:
|
|||||||
after:
|
after:
|
||||||
- nasm
|
- 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:
|
ffmpeg:
|
||||||
source: https://github.com/FFmpeg/FFmpeg.git
|
source: https://github.com/FFmpeg/FFmpeg.git
|
||||||
source-depth: 1
|
source-depth: 1
|
||||||
@ -338,6 +352,20 @@ parts:
|
|||||||
- nasm
|
- nasm
|
||||||
- dav1d
|
- 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:
|
openal:
|
||||||
source: https://github.com/kcat/openal-soft.git
|
source: https://github.com/kcat/openal-soft.git
|
||||||
source-depth: 1
|
source-depth: 1
|
||||||
@ -371,6 +399,50 @@ parts:
|
|||||||
- -DRANGE_V3_DOCS=OFF
|
- -DRANGE_V3_DOCS=OFF
|
||||||
prime: [-./*]
|
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:
|
xxhash:
|
||||||
source: https://github.com/Cyan4973/xxHash.git
|
source: https://github.com/Cyan4973/xxHash.git
|
||||||
source-depth: 1
|
source-depth: 1
|
||||||
|
Loading…
Reference in New Issue
Block a user