mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use Core::UpdaterDisabled where a check is for installed or not
This commit is contained in:
parent
fbacb6c0a4
commit
152f1ef17f
2 changed files with 7 additions and 9 deletions
|
@ -252,7 +252,7 @@ bool GenerateDesktopFile(
|
||||||
|
|
||||||
QFile target(targetFile);
|
QFile target(targetFile);
|
||||||
if (target.open(QIODevice::WriteOnly)) {
|
if (target.open(QIODevice::WriteOnly)) {
|
||||||
if (IsStaticBinary() || InAppImage()) {
|
if (!Core::UpdaterDisabled()) {
|
||||||
fileText = fileText.replace(
|
fileText = fileText.replace(
|
||||||
QRegularExpression(
|
QRegularExpression(
|
||||||
qsl("^TryExec=.*$"),
|
qsl("^TryExec=.*$"),
|
||||||
|
@ -719,7 +719,7 @@ bool IsGtkIntegrationForced() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsQtPluginsBundled() {
|
bool AreQtPluginsBundled() {
|
||||||
#ifdef DESKTOP_APP_USE_PACKAGED_LAZY
|
#ifdef DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
return true;
|
return true;
|
||||||
#else // DESKTOP_APP_USE_PACKAGED_LAZY
|
#else // DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
|
@ -834,7 +834,7 @@ QString SingleInstanceLocalServerName(const QString &hash) {
|
||||||
|
|
||||||
QString GetLauncherBasename() {
|
QString GetLauncherBasename() {
|
||||||
static const auto Result = [&] {
|
static const auto Result = [&] {
|
||||||
if ((IsStaticBinary() || InAppImage()) && !cExeName().isEmpty()) {
|
if (!Core::UpdaterDisabled() && !cExeName().isEmpty()) {
|
||||||
const auto appimagePath = qsl("file://%1%2")
|
const auto appimagePath = qsl("file://%1%2")
|
||||||
.arg(cExeDir())
|
.arg(cExeDir())
|
||||||
.arg(cExeName())
|
.arg(cExeName())
|
||||||
|
@ -1244,13 +1244,11 @@ void start() {
|
||||||
"this may lead to font issues.");
|
"this may lead to font issues.");
|
||||||
#endif // DESKTOP_APP_USE_PACKAGED_FONTS
|
#endif // DESKTOP_APP_USE_PACKAGED_FONTS
|
||||||
|
|
||||||
if (IsQtPluginsBundled()) {
|
if (AreQtPluginsBundled()) {
|
||||||
qputenv("QT_WAYLAND_DECORATION", "material");
|
qputenv("QT_WAYLAND_DECORATION", "material");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((IsStaticBinary()
|
if (AreQtPluginsBundled()
|
||||||
|| InAppImage()
|
|
||||||
|| IsQtPluginsBundled())
|
|
||||||
// it is handled by Qt for flatpak and snap
|
// it is handled by Qt for flatpak and snap
|
||||||
&& !InFlatpak()
|
&& !InFlatpak()
|
||||||
&& !InSnap()) {
|
&& !InSnap()) {
|
||||||
|
@ -1319,7 +1317,7 @@ void RegisterCustomScheme(bool force) {
|
||||||
GError *error = nullptr;
|
GError *error = nullptr;
|
||||||
|
|
||||||
const auto neededCommandlineBuilder = qsl("%1 --")
|
const auto neededCommandlineBuilder = qsl("%1 --")
|
||||||
.arg((IsStaticBinary() || InAppImage())
|
.arg(!Core::UpdaterDisabled()
|
||||||
? cExeDir() + cExeName()
|
? cExeDir() + cExeName()
|
||||||
: cExeName());
|
: cExeName());
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ bool InAppImage();
|
||||||
bool IsStaticBinary();
|
bool IsStaticBinary();
|
||||||
bool UseGtkIntegration();
|
bool UseGtkIntegration();
|
||||||
bool IsGtkIntegrationForced();
|
bool IsGtkIntegrationForced();
|
||||||
bool IsQtPluginsBundled();
|
bool AreQtPluginsBundled();
|
||||||
|
|
||||||
bool IsXDGDesktopPortalPresent();
|
bool IsXDGDesktopPortalPresent();
|
||||||
bool UseXDGDesktopPortal();
|
bool UseXDGDesktopPortal();
|
||||||
|
|
Loading…
Add table
Reference in a new issue