Unify packaged/non-packaged binary name

This commit is contained in:
Ilya Fedin 2025-05-30 15:23:18 +00:00 committed by John Preston
parent 15c817dd15
commit 56ff5808a3
6 changed files with 8 additions and 11 deletions

View file

@ -1864,11 +1864,7 @@ else()
set(bundle_identifier "com.tdesktop.Telegram")
endif()
set(bundle_entitlements "Telegram.entitlements")
if (LINUX AND DESKTOP_APP_USE_PACKAGED)
set(output_name "telegram-desktop")
else()
set(output_name "Telegram")
endif()
set(output_name "Telegram")
endif()
if (CMAKE_GENERATOR STREQUAL Xcode)

View file

@ -769,7 +769,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
}
void NewVersionLaunched(int oldVersion) {
if (oldVersion <= 4001001 && cAutoStart()) {
if (oldVersion <= 5014003 && cAutoStart()) {
AutostartToggle(true);
}
}

View file

@ -1,8 +1,8 @@
[Desktop Entry]
Name=Telegram
Comment=New era of messaging
TryExec=telegram-desktop
Exec=telegram-desktop -- %u
TryExec=Telegram
Exec=Telegram -- %u
Icon=org.telegram.desktop
Terminal=false
StartupWMClass=TelegramDesktop
@ -17,6 +17,6 @@ X-GNOME-UsesNotifications=true
X-GNOME-SingleWindow=true
[Desktop Action quit]
Exec=telegram-desktop -quit
Exec=Telegram -quit
Name=Quit Telegram
Icon=application-exit

View file

@ -106,7 +106,7 @@
</content_rating>
<launchable type="desktop-id">org.telegram.desktop.desktop</launchable>
<provides>
<binary>telegram-desktop</binary>
<binary>Telegram</binary>
<dbus type="session">org.telegram.desktop</dbus>
<mediatype>x-scheme-handler/tg</mediatype>
<mediatype>x-scheme-handler/tonsite</mediatype>

View file

@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.telegram.desktop
Exec=@CMAKE_INSTALL_FULL_BINDIR@/telegram-desktop
Exec=@CMAKE_INSTALL_FULL_BINDIR@/Telegram

View file

@ -146,6 +146,7 @@ parts:
craftctl set version="$version"
override-build: |
craftctl default
mv "$CRAFT_PART_INSTALL"/usr/bin/{Telegram,telegram-desktop}
APP_ID=org.telegram.desktop
sed -i "s/^Icon=$APP_ID$/Icon=snap.telegram-desktop./g" "$CRAFT_PART_INSTALL/usr/share/applications/$APP_ID.desktop"