Fix opening Tape and Puzzle inside AppImage.
This commit is contained in:
parent
815f8bf7b8
commit
443f35c0d2
|
@ -79,6 +79,10 @@
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
#include "../vmisc/appimage.h"
|
||||||
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
using namespace Qt::Literals::StringLiterals;
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
|
@ -101,12 +105,16 @@ auto AppFilePath(const QString &appName) -> QString
|
||||||
const QString executableSuffix;
|
const QString executableSuffix;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
return AppImageRoot() + BINDIR + '/'_L1 + appName;
|
||||||
|
#else
|
||||||
QFileInfo canonicalFile(
|
QFileInfo canonicalFile(
|
||||||
QStringLiteral("%1/%2").arg(QCoreApplication::applicationDirPath(), appName + executableSuffix));
|
QStringLiteral("%1/%2").arg(QCoreApplication::applicationDirPath(), appName + executableSuffix));
|
||||||
if (canonicalFile.exists())
|
if (canonicalFile.exists())
|
||||||
{
|
{
|
||||||
return canonicalFile.absoluteFilePath();
|
return canonicalFile.absoluteFilePath();
|
||||||
}
|
}
|
||||||
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
#if defined(Q_OS_MACOS) && defined(QBS_BUILD) && defined(MULTI_BUNDLE)
|
#if defined(Q_OS_MACOS) && defined(QBS_BUILD) && defined(MULTI_BUNDLE)
|
||||||
QFileInfo multiBundleFile(
|
QFileInfo multiBundleFile(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user