2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +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

@@ -200,6 +200,8 @@ QString CurrentExecutablePath(int argc, char *argv[]) {
}
QString SingleInstanceLocalServerName(const QString &hash) {
const auto isSnap = !qgetenv("SNAP").isEmpty();
const auto runtimeDir = QStandardPaths::writableLocation(
QStandardPaths::RuntimeLocation);
@@ -208,6 +210,8 @@ QString SingleInstanceLocalServerName(const QString &hash) {
+ qsl("/app/")
+ QString::fromUtf8(qgetenv("FLATPAK_ID"))
+ '/' + hash;
} else if (QFileInfo::exists(runtimeDir) && isSnap) {
return runtimeDir + '/' + hash;
} else if (QFileInfo::exists(runtimeDir)) {
return runtimeDir + '/' + hash + '-' + cGUIDStr();
} else { // non-systemd distros