mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Fix GApplication with some binary paths
This commit is contained in:
parent
4ade80905f
commit
9ee4ad95d0
1 changed files with 14 additions and 1 deletions
|
@ -514,6 +514,19 @@ bool GenerateDesktopFile(
|
||||||
targetPath,
|
targetPath,
|
||||||
md5Hash,
|
md5Hash,
|
||||||
AppName.utf16().replace(' ', '_')));
|
AppName.utf16().replace(' ', '_')));
|
||||||
|
|
||||||
|
const auto d = QFile::encodeName(QDir(cWorkingDir()).absolutePath());
|
||||||
|
hashMd5Hex(d.constData(), d.size(), md5Hash);
|
||||||
|
|
||||||
|
if (!Core::Sandbox::Instance().customWorkingDir()) {
|
||||||
|
const auto exePath = QFile::encodeName(
|
||||||
|
cExeDir() + cExeName());
|
||||||
|
hashMd5Hex(exePath.constData(), exePath.size(), md5Hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
QFile::remove(qsl("%1org.telegram.desktop.%2.desktop").arg(
|
||||||
|
targetPath,
|
||||||
|
md5Hash));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -707,7 +720,7 @@ void start() {
|
||||||
md5Hash.data());
|
md5Hash.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
return qsl("org.telegram.desktop.%1.desktop").arg(md5Hash);
|
return qsl("org.telegram.desktop._%1.desktop").arg(md5Hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
return qsl("org.telegram.desktop.desktop");
|
return qsl("org.telegram.desktop.desktop");
|
||||||
|
|
Loading…
Add table
Reference in a new issue