2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-18 14:00:09 +00:00

Use packaged build in the snap package

This commit is contained in:
Ilya Fedin
2020-01-25 09:44:58 +04:00
committed by John Preston
parent f0de8131ec
commit 9536a3c98e
10 changed files with 286 additions and 849 deletions

View File

@@ -29,6 +29,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Platform {
namespace {
constexpr auto kLauncherBasename = str_const(MACRO_TO_STRING(TDESKTOP_LAUNCHER_BASENAME) ".desktop");
bool noQtTrayIcon = false, tryAppIndicator = false;
bool useGtkBase = false, useAppIndicator = false, useStatusIcon = false, trayIconChecked = false, useUnityCount = false;
@@ -557,7 +559,7 @@ void MainWindow::psFirstShow() {
auto snapName = QString::fromLatin1(qgetenv("SNAP_NAME"));
if(snapName.isEmpty()) {
std::vector<QString> possibleDesktopFiles = {
MACRO_TO_STRING(TDESKTOP_LAUNCHER_BASENAME) ".desktop",
str_const_toString(kLauncherBasename),
"Telegram.desktop"
};
@@ -573,8 +575,12 @@ void MainWindow::psFirstShow() {
LOG(("Could not get Unity Launcher entry!"));
}
} else {
LOG(("SNAP Environment detected, setting Launcher entry to %1-telegramdesktop.desktop!").arg(snapName));
_desktopFile = snapName + "_telegramdesktop.desktop";
LOG(("SNAP Environment detected, setting Launcher entry to %1_%2.desktop!")
.arg(snapName)
.arg(str_const_toString(kLauncherBasename)));
_desktopFile = snapName
+ '_'
+ str_const_toString(kLauncherBasename);
useUnityCount=true;
}
_dbusPath = "/com/canonical/unity/launcherentry/" + QString::number(djbStringHash("application://" + _desktopFile));