Merge pull request #2635 from Izder456/develop

FIX launcher/java/JavaUtils.cpp to properly autodetect JVM paths on …
This commit is contained in:
Alexandru Ionut Tripon 2024-07-13 11:16:35 +03:00 committed by GitHub
commit 2df5d4012c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -394,7 +394,7 @@ QList<QString> JavaUtils::FindJavaPaths()
return javas;
}
#elif defined(Q_OS_LINUX)
#elif defined(Q_OS_LINUX) || defined(Q_OS_OPENBSD) || defined(Q_OS_FREEBSD)
QList<QString> JavaUtils::FindJavaPaths()
{
QList<QString> javas;
@ -419,6 +419,7 @@ QList<QString> JavaUtils::FindJavaPaths()
scanJavaDir(snap + dirPath);
}
};
#if defined(Q_OS_LINUX)
// oracle RPMs
scanJavaDirs("/usr/java");
// general locations used by distro packaging
@ -437,7 +438,10 @@ QList<QString> JavaUtils::FindJavaPaths()
scanJavaDirs("/opt/ibm"); // IBM Semeru Certified Edition
// flatpak
scanJavaDirs("/app/jdk");
#elif defined(Q_OS_OPENBSD) || defined(Q_OS_FREEBSD)
// ports install to /usr/local on OpenBSD & FreeBSD
scanJavaDirs("/usr/local");
#endif
auto home = qEnvironmentVariable("HOME");
// javas downloaded by IntelliJ