2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-22 10:17:10 +00:00

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,12 +1864,8 @@ else()
set(bundle_identifier "com.tdesktop.Telegram") set(bundle_identifier "com.tdesktop.Telegram")
endif() endif()
set(bundle_entitlements "Telegram.entitlements") set(bundle_entitlements "Telegram.entitlements")
if (LINUX AND DESKTOP_APP_USE_PACKAGED)
set(output_name "telegram-desktop")
else()
set(output_name "Telegram") set(output_name "Telegram")
endif() endif()
endif()
if (CMAKE_GENERATOR STREQUAL Xcode) if (CMAKE_GENERATOR STREQUAL Xcode)
set(bundle_identifier_plist "$(PRODUCT_BUNDLE_IDENTIFIER)") set(bundle_identifier_plist "$(PRODUCT_BUNDLE_IDENTIFIER)")

View File

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

View File

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

View File

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

View File

@ -1,3 +1,3 @@
[D-BUS Service] [D-BUS Service]
Name=org.telegram.desktop 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" craftctl set version="$version"
override-build: | override-build: |
craftctl default craftctl default
mv "$CRAFT_PART_INSTALL"/usr/bin/{Telegram,telegram-desktop}
APP_ID=org.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" sed -i "s/^Icon=$APP_ID$/Icon=snap.telegram-desktop./g" "$CRAFT_PART_INSTALL/usr/share/applications/$APP_ID.desktop"