-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
166 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: | ||
push: | ||
workflow_dispatch: | ||
name: CI | ||
jobs: | ||
flatpak: | ||
name: 'Flatpak' | ||
runs-on: ubuntu-latest | ||
container: | ||
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08 | ||
options: --privileged | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Restore cache | ||
id: cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: .flatpak-builder | ||
key: ayugram-flatpak-${{ github.sha }} | ||
restore-keys: ayugram-flatpak- | ||
|
||
- uses: flatpak/flatpak-github-actions/[email protected] | ||
with: | ||
bundle: ayugram.flatpak | ||
manifest-path: io.github.ayugram.TDesktop.yml | ||
cache: false | ||
|
||
- name: Save cache | ||
id: cache-save | ||
uses: actions/cache/save@v3 | ||
if: always() | ||
with: | ||
path: .flatpak-builder | ||
key: ${{ steps.cache.outputs.cache-primary-key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.flatpak-builder/ | ||
.vscode/ | ||
repo/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt | ||
index 6a71c866d..2a59aa485 100644 | ||
--- a/Telegram/CMakeLists.txt | ||
+++ b/Telegram/CMakeLists.txt | ||
@@ -1913,9 +1913,9 @@ endif() | ||
|
||
if (LINUX AND DESKTOP_APP_USE_PACKAGED) | ||
include(GNUInstallDirs) | ||
- configure_file("../lib/xdg/ayugram.desktop.service" "${CMAKE_CURRENT_BINARY_DIR}/ayugram.desktop.service" @ONLY) | ||
- configure_file("../lib/xdg/ayugram.desktop.metainfo.xml" "${CMAKE_CURRENT_BINARY_DIR}/ayugram.desktop.metainfo.xml" @ONLY) | ||
- generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/ayugram.desktop.metainfo.xml") | ||
+ configure_file("../lib/xdg/io.github.ayugram.TDesktop.service" "${CMAKE_CURRENT_BINARY_DIR}/io.github.ayugram.TDesktop.service" @ONLY) | ||
+ configure_file("../lib/xdg/io.github.ayugram.TDesktop.metainfo.xml" "${CMAKE_CURRENT_BINARY_DIR}/io.github.ayugram.TDesktop.metainfo.xml" @ONLY) | ||
+ generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/io.github.ayugram.TDesktop.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 "ayugram.png") | ||
install(FILES "Resources/art/icon32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "ayugram.png") | ||
@@ -1925,7 +1925,7 @@ if (LINUX AND DESKTOP_APP_USE_PACKAGED) | ||
install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "ayugram.png") | ||
install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "ayugram.png") | ||
install(FILES "Resources/icons/tray_monochrome.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "telegram-symbolic.svg") | ||
- install(FILES "../lib/xdg/ayugram.desktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") | ||
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayugram.desktop.service" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services") | ||
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayugram.desktop.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo") | ||
+ install(FILES "../lib/xdg/io.github.ayugram.TDesktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") | ||
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/io.github.ayugram.TDesktop.service" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services") | ||
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/io.github.ayugram.TDesktop.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo") | ||
endif() | ||
diff --git a/Telegram/Resources/qrc/telegram/telegram.qrc b/Telegram/Resources/qrc/telegram/telegram.qrc | ||
index ce814218c..c9b8c9c5c 100644 | ||
--- a/Telegram/Resources/qrc/telegram/telegram.qrc | ||
+++ b/Telegram/Resources/qrc/telegram/telegram.qrc | ||
@@ -55,6 +55,6 @@ | ||
</qresource> | ||
<qresource prefix="/misc"> | ||
<file alias="default_shortcuts-custom.json">../../default_shortcuts-custom.json</file> | ||
- <file alias="ayugram.desktop.desktop">../../../../lib/xdg/ayugram.desktop.desktop</file> | ||
+ <file alias="io.github.ayugram.TDesktop.desktop">../../../../lib/xdg/io.github.ayugram.TDesktop.desktop</file> | ||
</qresource> | ||
</RCC> | ||
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp | ||
index f7d5169ee..793402bd2 100644 | ||
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp | ||
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp | ||
@@ -198,7 +198,7 @@ bool GenerateDesktopFile( | ||
DEBUG_LOG(("App Info: placing .desktop file to %1").arg(targetPath)); | ||
if (!QDir(targetPath).exists()) QDir().mkpath(targetPath); | ||
|
||
- const auto sourceFile = u":/misc/ayugram.desktop.desktop"_q; | ||
+ const auto sourceFile = u":/misc/io.github.ayugram.TDesktop.desktop"_q; | ||
const auto targetFile = targetPath | ||
+ QGuiApplication::desktopFileName() | ||
+ u".desktop"_q; | ||
@@ -328,7 +328,7 @@ bool GenerateDesktopFile( | ||
hashMd5Hex(exePath.constData(), exePath.size(), md5Hash); | ||
} | ||
|
||
- QFile::remove(u"%1ayugram.desktop.%2.desktop"_q.arg( | ||
+ QFile::remove(u"%1io.github.ayugram.TDesktop.%2.desktop"_q.arg( | ||
targetPath, | ||
md5Hash)); | ||
} | ||
@@ -623,10 +623,10 @@ void start() { | ||
md5Hash.data()); | ||
} | ||
|
||
- return u"ayugram.desktop._%1"_q.arg(md5Hash.constData()); | ||
+ return u"io.github.ayugram.TDesktop._%1"_q.arg(md5Hash.constData()); | ||
} | ||
|
||
- return u"ayugram.desktop"_q; | ||
+ return u"io.github.ayugram.TDesktop"_q; | ||
}()); | ||
|
||
LOG(("App ID: %1").arg(QGuiApplication::desktopFileName())); | ||
diff --git a/lib/xdg/ayugram.desktop.desktop b/lib/xdg/io.github.ayugram.TDesktop.desktop | ||
similarity index 100% | ||
rename from lib/xdg/ayugram.desktop.desktop | ||
rename to lib/xdg/io.github.ayugram.TDesktop.desktop | ||
diff --git a/lib/xdg/ayugram.desktop.metainfo.xml b/lib/xdg/io.github.ayugram.TDesktop.metainfo.xml | ||
similarity index 96% | ||
rename from lib/xdg/ayugram.desktop.metainfo.xml | ||
rename to lib/xdg/io.github.ayugram.TDesktop.metainfo.xml | ||
index 1def1027e..0ac288cec 100644 | ||
--- a/lib/xdg/ayugram.desktop.metainfo.xml | ||
+++ b/lib/xdg/io.github.ayugram.TDesktop.metainfo.xml | ||
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<component type="desktop"> | ||
- <id>ayugram.desktop</id> | ||
+ <id>io.github.ayugram.TDesktop</id> | ||
<metadata_license>CC0-1.0</metadata_license> | ||
<project_license>GPL-3.0</project_license> | ||
<name>AyuGram Desktop</name> | ||
@@ -73,7 +73,7 @@ | ||
<content_attribute id="money-gambling">none</content_attribute> | ||
<content_attribute id="money-advertising">moderate</content_attribute> | ||
</content_rating> | ||
- <launchable type="desktop-id">ayugram.desktop.desktop</launchable> | ||
+ <launchable type="desktop-id">io.github.ayugram.TDesktop.desktop</launchable> | ||
<provides> | ||
<binary>ayugram-desktop</binary> | ||
</provides> | ||
diff --git a/lib/xdg/ayugram.desktop.service b/lib/xdg/io.github.ayugram.TDesktop.service | ||
similarity index 67% | ||
rename from lib/xdg/ayugram.desktop.service | ||
rename to lib/xdg/io.github.ayugram.TDesktop.service | ||
index 853c53544..bcd56d806 100644 | ||
--- a/lib/xdg/ayugram.desktop.service | ||
+++ b/lib/xdg/io.github.ayugram.TDesktop.service | ||
@@ -1,3 +1,3 @@ | ||
[D-BUS Service] | ||
-Name=ayugram.desktop | ||
+Name=io.github.ayugram.TDesktop | ||
Exec=@CMAKE_INSTALL_FULL_BINDIR@/ayugram-desktop |