Fix opening Tape and Puzzle inside AppImage.

This commit is contained in:
Roman Telezhynskyi 2024-02-13 19:56:28 +02:00
parent 815f8bf7b8
commit 443f35c0d2

View file

@ -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(