mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Get rid of TDESKTOP_LAUNCHER_BASENAME
This key was mainly used to let flatpak and snap provide right desktop file name. Now, we can compute it from the environment in runtime for both flatpak and snap. There's no more need in this option. Desktop filename override by downstreams is highly discouraged.
This commit is contained in:
@@ -403,6 +403,17 @@ namespace Platform {
|
||||
|
||||
void start() {
|
||||
QGuiApplication::setDesktopFileName([] {
|
||||
if (KSandbox::isFlatpak()) {
|
||||
return qEnvironmentVariable("FLATPAK_ID") + qsl(".desktop");
|
||||
}
|
||||
|
||||
if (KSandbox::isSnap()) {
|
||||
return qEnvironmentVariable("SNAP_INSTANCE_NAME")
|
||||
+ '_'
|
||||
+ cExeName()
|
||||
+ qsl(".desktop");
|
||||
}
|
||||
|
||||
if (!Core::UpdaterDisabled() && !cExeName().isEmpty()) {
|
||||
const auto appimagePath = qsl("file://%1%2").arg(
|
||||
cExeDir(),
|
||||
@@ -419,7 +430,7 @@ void start() {
|
||||
AppName.utf16().replace(' ', '_'));
|
||||
}
|
||||
|
||||
return qsl(QT_STRINGIFY(TDESKTOP_LAUNCHER_BASENAME) ".desktop");
|
||||
return qsl("telegramdesktop.desktop");
|
||||
}());
|
||||
|
||||
LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
|
||||
|
Reference in New Issue
Block a user