Skip to content

Commit

Permalink
FIX launcher/java/JavaUtils.cpp to properly autodetect JVM paths on …
Browse files Browse the repository at this point in the history
…OpenBSD and FreeBSD

Signed-off-by: izder456 <izder456@disroot.org>
  • Loading branch information
Izder456 committed Jul 12, 2024
1 parent 5f345ce commit 0a543cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions launcher/java/JavaUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0a543cb

Please sign in to comment.