2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Handle launcher basename compile-time for snap

Just like for flatpak
This commit is contained in:
Ilya Fedin
2020-10-01 02:42:58 +04:00
committed by John Preston
parent 3aa1b1e9ae
commit 10012d6b31
2 changed files with 3 additions and 13 deletions

View File

@@ -949,17 +949,6 @@ QString SingleInstanceLocalServerName(const QString &hash) {
QString GetLauncherBasename() {
static const auto Result = [&] {
if (InSnap() && !cExeName().isEmpty()) {
const auto snapNameKey =
qEnvironmentVariableIsSet("SNAP_INSTANCE_NAME")
? "SNAP_INSTANCE_NAME"
: "SNAP_NAME";
return qsl("%1_%2")
.arg(QString::fromLatin1(qgetenv(snapNameKey)))
.arg(cExeName());
}
if ((IsStaticBinary() || InAppImage()) && !cExeName().isEmpty()) {
const auto appimagePath = qsl("file://%1%2")
.arg(cExeDir())