mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-04-30 06:34:27 +02:00
javautils: add a filter for detecting Java paths on AOSC OS
Signed-off-by: Kaiyang Wu <origincode@aosc.io>
This commit is contained in:
parent
a43ebefc97
commit
3d82bc37af
@ -440,9 +440,15 @@ QList<QString> JavaUtils::FindJavaPaths()
|
||||
QString fileName = info.fileName();
|
||||
return fileName.startsWith("openjdk-") || fileName.startsWith("openj9-");
|
||||
};
|
||||
// AOSC OS's locations for openjdk
|
||||
auto aoscFilter = [](const QFileInfo& info) {
|
||||
QString fileName = info.fileName();
|
||||
return fileName == "java" || fileName.startsWith("java-");
|
||||
};
|
||||
scanJavaDir("/usr/lib64", gentooFilter);
|
||||
scanJavaDir("/usr/lib", gentooFilter);
|
||||
scanJavaDir("/opt", gentooFilter);
|
||||
scanJavaDir("/usr/lib", aoscFilter);
|
||||
// javas stored in Prism Launcher's folder
|
||||
scanJavaDirs("java");
|
||||
// manually installed JDKs in /opt
|
||||
|
Loading…
x
Reference in New Issue
Block a user