mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
feat: linux improvements
Co-authored-by: Dr4iv3rNope <Dr4iv3rNope@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@
|
||||
url = https://github.com/desktop-app/codegen.git
|
||||
[submodule "Telegram/lib_ui"]
|
||||
path = Telegram/lib_ui
|
||||
url = https://github.com/desktop-app/lib_ui.git
|
||||
url = https://github.com/AyuGram/lib_ui.git
|
||||
[submodule "Telegram/lib_lottie"]
|
||||
path = Telegram/lib_lottie
|
||||
url = https://github.com/desktop-app/lib_lottie.git
|
||||
|
||||
@@ -1747,8 +1747,8 @@ endif()
|
||||
|
||||
if (LINUX AND DESKTOP_APP_USE_PACKAGED)
|
||||
include(GNUInstallDirs)
|
||||
configure_file("../lib/xdg/org.telegram.desktop.metainfo.xml" "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.metainfo.xml" @ONLY)
|
||||
generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.metainfo.xml")
|
||||
configure_file("../lib/xdg/org.ayugram.desktop.metainfo.xml" "${CMAKE_CURRENT_BINARY_DIR}/org.ayugram.desktop.metainfo.xml" @ONLY)
|
||||
generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/org.ayugram.desktop.metainfo.xml")
|
||||
install(TARGETS Telegram RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
install(FILES "Resources/art/icon16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "telegram.png")
|
||||
install(FILES "Resources/art/icon32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "telegram.png")
|
||||
@@ -1757,6 +1757,6 @@ if (LINUX AND DESKTOP_APP_USE_PACKAGED)
|
||||
install(FILES "Resources/art/icon128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "telegram.png")
|
||||
install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "telegram.png")
|
||||
install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "telegram.png")
|
||||
install(FILES "../lib/xdg/org.telegram.desktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
install(FILES "../lib/xdg/org.ayugram.desktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.ayugram.desktop.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
endif()
|
||||
|
||||
@@ -54,6 +54,6 @@
|
||||
</qresource>
|
||||
<qresource prefix="/misc">
|
||||
<file alias="default_shortcuts-custom.json">../../default_shortcuts-custom.json</file>
|
||||
<file alias="org.telegram.desktop.desktop">../../../../lib/xdg/org.telegram.desktop.desktop</file>
|
||||
<file alias="org.ayugram.desktop.desktop">../../../../lib/xdg/org.ayugram.desktop.desktop</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -110,7 +110,7 @@ static void t_desktop_application_init(TDesktopApplication *application) {
|
||||
namespace Platform {
|
||||
namespace {
|
||||
|
||||
constexpr auto kDesktopFile = ":/misc/org.telegram.desktop.desktop"_cs;
|
||||
constexpr auto kDesktopFile = ":/misc/org.ayugram.desktop.desktop"_cs;
|
||||
|
||||
bool PortalAutostart(bool start, bool silent) {
|
||||
if (cExeName().isEmpty()) {
|
||||
@@ -485,7 +485,7 @@ bool GenerateDesktopFile(
|
||||
hashMd5Hex(exePath.constData(), exePath.size(), md5Hash);
|
||||
}
|
||||
|
||||
QFile::remove(u"%1org.telegram.desktop.%2.desktop"_q.arg(
|
||||
QFile::remove(u"%1org.ayugram.desktop.%2.desktop"_q.arg(
|
||||
targetPath,
|
||||
md5Hash));
|
||||
}
|
||||
@@ -686,11 +686,11 @@ void start() {
|
||||
md5Hash.data());
|
||||
}
|
||||
|
||||
return u"org.telegram.desktop._%1.desktop"_q.arg(
|
||||
return u"org.ayugram.desktop._%1.desktop"_q.arg(
|
||||
md5Hash.constData());
|
||||
}
|
||||
|
||||
return u"org.telegram.desktop.desktop"_q;
|
||||
return u"org.ayugram.desktop.desktop"_q;
|
||||
}());
|
||||
|
||||
LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
|
||||
|
||||
+1
-1
Submodule Telegram/lib_ui updated: 83cab52cd6...435b884b8b
+1
-1
Submodule cmake updated: a41fa6e140...1c07a71d6f
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=AyuGram Desktop
|
||||
Comment=Unofficial desktop version of Telegram messaging app
|
||||
TryExec=telegram-desktop
|
||||
Exec=telegram-desktop -- %u
|
||||
TryExec=ayugram-desktop
|
||||
Exec=DESKTOPINTEGRATION=1 ayugram-desktop -- %u
|
||||
Icon=telegram
|
||||
Terminal=false
|
||||
StartupWMClass=AyuGram
|
||||
@@ -16,6 +16,6 @@ X-GNOME-UsesNotifications=true
|
||||
X-GNOME-SingleWindow=true
|
||||
|
||||
[Desktop Action quit]
|
||||
Exec=telegram-desktop -quit
|
||||
Exec=ayugram-desktop -quit
|
||||
Name=Quit Telegram
|
||||
Icon=application-exit
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component type="desktop">
|
||||
<id>org.telegram.desktop</id>
|
||||
<id>org.ayugram.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0</project_license>
|
||||
<name>Telegram Desktop</name>
|
||||
<summary>Fast. Secure. Powerful.</summary>
|
||||
<name>AyuGram Desktop</name>
|
||||
<summary>Unofficial desktop version of Telegram messaging app</summary>
|
||||
<description>
|
||||
<p>Pure instant messaging — simple, fast, secure, and synced across all your devices. One of the world's top 10 most downloaded apps with over 500 million active users.</p>
|
||||
<p>FAST: Telegram is the fastest messaging app on the market, connecting people via a unique, distributed network of data centers around the globe.</p>
|
||||
@@ -83,8 +83,8 @@
|
||||
<content_attribute id="money-gambling">none</content_attribute>
|
||||
<content_attribute id="money-advertising">moderate</content_attribute>
|
||||
</content_rating>
|
||||
<launchable type="desktop-id">org.telegram.desktop.desktop</launchable>
|
||||
<launchable type="desktop-id">org.ayugram.desktop.desktop</launchable>
|
||||
<provides>
|
||||
<binary>telegram-desktop</binary>
|
||||
<binary>ayugram-desktop</binary>
|
||||
</provides>
|
||||
</component>
|
||||
+2
-2
@@ -19,7 +19,7 @@ apps:
|
||||
command-chain:
|
||||
- bin/desktop-launch
|
||||
common-id: org.telegram.desktop
|
||||
desktop: usr/share/applications/org.telegram.desktop.desktop
|
||||
desktop: usr/share/applications/org.ayugram.desktop.desktop
|
||||
autostart: telegram-desktop_telegram-desktop.desktop
|
||||
plugs:
|
||||
- alsa
|
||||
@@ -91,7 +91,7 @@ parts:
|
||||
plugin: cmake
|
||||
source: .
|
||||
source-type: git
|
||||
parse-info: [usr/share/metainfo/org.telegram.desktop.metainfo.xml]
|
||||
parse-info: [usr/share/metainfo/org.ayugram.desktop.metainfo.xml]
|
||||
build-environment:
|
||||
- LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
- LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
|
||||
|
||||
Reference in New Issue
Block a user