diff --git a/snap/scripts/telegram-launch b/snap/scripts/telegram-launch new file mode 100755 index 000000000..f8dc3b182 --- /dev/null +++ b/snap/scripts/telegram-launch @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ ! -d $SNAP/kf5/usr ]; then + runtime="kde-frameworks-5-core18" + slot="kde-frameworks-5-core18:kde-frameworks-5-core18-slot" + + echo "You need to connect this snap to the $runtime snap." + echo "" + echo "You can do this with those commands:" + echo "snap install $runtime" + echo "snap refresh $runtime" + echo "snap connect $SNAP_NAME:kde-frameworks-5-plug $slot" + exit 1 +fi + +exec telegram-desktop "$@" \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9deca4ed5..ddd532c5c 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -15,7 +15,7 @@ architectures: apps: telegram-desktop: - command: telegram-desktop + command: telegram-launch common-id: org.telegram.desktop desktop: share/applications/telegramdesktop.desktop environment: @@ -131,6 +131,12 @@ parts: - range-v3 - xxhash + telegram-launcher: + plugin: dump + source: snap/scripts + organize: + telegram-launch: bin/telegram-launch + patches: plugin: dump source: Telegram/Patches