From 443f35c0d26c31b8d27d7d66ef7abf580ce22913 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 13 Feb 2024 19:56:28 +0200 Subject: [PATCH] Fix opening Tape and Puzzle inside AppImage. --- src/app/valentina/core/vapplication.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 621473ade..52e36ba1f 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -79,6 +79,10 @@ #include "../vmisc/compatibility.h" #endif +#if defined(APPIMAGE) && defined(Q_OS_LINUX) +#include "../vmisc/appimage.h" +#endif // defined(APPIMAGE) && defined(Q_OS_LINUX) + using namespace Qt::Literals::StringLiterals; QT_WARNING_PUSH @@ -101,12 +105,16 @@ auto AppFilePath(const QString &appName) -> QString const QString executableSuffix; #endif +#if defined(APPIMAGE) && defined(Q_OS_LINUX) + return AppImageRoot() + BINDIR + '/'_L1 + appName; +#else QFileInfo canonicalFile( QStringLiteral("%1/%2").arg(QCoreApplication::applicationDirPath(), appName + executableSuffix)); if (canonicalFile.exists()) { return canonicalFile.absoluteFilePath(); } +#endif // defined(APPIMAGE) && defined(Q_OS_LINUX) #if defined(Q_OS_MACOS) && defined(QBS_BUILD) && defined(MULTI_BUNDLE) QFileInfo multiBundleFile(