mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-20 23:27:23 +00:00
Handle launcher basename compile-time for snap
Just like for flatpak
This commit is contained in:
parent
3aa1b1e9ae
commit
10012d6b31
@ -949,17 +949,6 @@ QString SingleInstanceLocalServerName(const QString &hash) {
|
|||||||
|
|
||||||
QString GetLauncherBasename() {
|
QString GetLauncherBasename() {
|
||||||
static const auto Result = [&] {
|
static const auto Result = [&] {
|
||||||
if (InSnap() && !cExeName().isEmpty()) {
|
|
||||||
const auto snapNameKey =
|
|
||||||
qEnvironmentVariableIsSet("SNAP_INSTANCE_NAME")
|
|
||||||
? "SNAP_INSTANCE_NAME"
|
|
||||||
: "SNAP_NAME";
|
|
||||||
|
|
||||||
return qsl("%1_%2")
|
|
||||||
.arg(QString::fromLatin1(qgetenv(snapNameKey)))
|
|
||||||
.arg(cExeName());
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((IsStaticBinary() || InAppImage()) && !cExeName().isEmpty()) {
|
if ((IsStaticBinary() || InAppImage()) && !cExeName().isEmpty()) {
|
||||||
const auto appimagePath = qsl("file://%1%2")
|
const auto appimagePath = qsl("file://%1%2")
|
||||||
.arg(cExeDir())
|
.arg(cExeDir())
|
||||||
|
@ -16,7 +16,7 @@ apps:
|
|||||||
telegram-desktop:
|
telegram-desktop:
|
||||||
command: bin/desktop-launch telegram-desktop
|
command: bin/desktop-launch telegram-desktop
|
||||||
common-id: org.telegram.desktop
|
common-id: org.telegram.desktop
|
||||||
desktop: usr/share/applications/telegramdesktop.desktop
|
desktop: usr/share/applications/telegram-desktop_telegram-desktop.desktop
|
||||||
environment:
|
environment:
|
||||||
# Use GTK3 cursor theme, icon theme and open/save file dialogs.
|
# Use GTK3 cursor theme, icon theme and open/save file dialogs.
|
||||||
QT_QPA_PLATFORMTHEME: gtk3
|
QT_QPA_PLATFORMTHEME: gtk3
|
||||||
@ -65,7 +65,7 @@ parts:
|
|||||||
plugin: cmake
|
plugin: cmake
|
||||||
source: .
|
source: .
|
||||||
source-type: git
|
source-type: git
|
||||||
parse-info: [usr/share/metainfo/telegramdesktop.appdata.xml]
|
parse-info: [usr/share/metainfo/telegram-desktop_telegram-desktop.appdata.xml]
|
||||||
build-environment:
|
build-environment:
|
||||||
- LD_LIBRARY_PATH: $SNAPCRAFT_STAGE/usr/lib
|
- LD_LIBRARY_PATH: $SNAPCRAFT_STAGE/usr/lib
|
||||||
- tg_owt_DIR: $SNAPCRAFT_STAGE/tg_owt
|
- tg_owt_DIR: $SNAPCRAFT_STAGE/tg_owt
|
||||||
@ -105,6 +105,7 @@ parts:
|
|||||||
- -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
|
- -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
|
||||||
- -DDESKTOP_APP_USE_PACKAGED_LAZY=ON
|
- -DDESKTOP_APP_USE_PACKAGED_LAZY=ON
|
||||||
- -DDESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS=$SNAPCRAFT_STAGE/usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5/QtWaylandClient/5.12.8
|
- -DDESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS=$SNAPCRAFT_STAGE/usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5/QtWaylandClient/5.12.8
|
||||||
|
- -DTDESKTOP_LAUNCHER_BASENAME=telegram-desktop_telegram-desktop
|
||||||
override-pull: |
|
override-pull: |
|
||||||
snapcraftctl pull
|
snapcraftctl pull
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user