mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix(launcher): set correct bin path for self-contained appimages
Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
parent
603da29f28
commit
b1b4b5d38a
1 changed files with 18 additions and 0 deletions
|
|
@ -371,7 +371,25 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
QString origcwdPath = QDir::currentPath();
|
QString origcwdPath = QDir::currentPath();
|
||||||
|
#if defined(Q_OS_LINUX)
|
||||||
|
const QString binFilePath = applicationFilePath();
|
||||||
|
const bool isAppImage = binFilePath.startsWith("/tmp/.mount_");
|
||||||
|
// Yes, this can technically trigger the logic below if someone makes an AppImage with an actual launcher exe named "ld-linux"
|
||||||
|
// Please don't :)
|
||||||
|
const bool executedFromLinker = QFileInfo(binFilePath).fileName().startsWith("ld-linux");
|
||||||
|
|
||||||
|
// NOTE(@getchoo): In order for `go-appimage` to generate self-contained AppImages, it executes apps from a bundled linker at
|
||||||
|
// <root>/lib64
|
||||||
|
// This is not the path to our actual binary, which we want
|
||||||
|
QString binPath;
|
||||||
|
if (isAppImage && executedFromLinker) {
|
||||||
|
binPath = FS::PathCombine(applicationDirPath(), "../usr/bin");
|
||||||
|
} else {
|
||||||
|
binPath = applicationDirPath();
|
||||||
|
}
|
||||||
|
#else
|
||||||
QString binPath = applicationDirPath();
|
QString binPath = applicationDirPath();
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
// Root path is used for updates and portable data
|
// Root path is used for updates and portable data
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue