MCPcopy Create free account
hub / github.com/PrismLauncher/PrismLauncher / getPrismJavaBundle

Function getPrismJavaBundle

launcher/java/JavaUtils.cpp:566–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564#endif
565
566QStringList getPrismJavaBundle()
567{
568 QList<QString> javas;
569
570 auto scanDir = [&javas](QString prefix) {
571 javas.append(FS::PathCombine(prefix, "jre", "bin", JavaUtils::javaExecutable));
572 javas.append(FS::PathCombine(prefix, "bin", JavaUtils::javaExecutable));
573 javas.append(FS::PathCombine(prefix, JavaUtils::javaExecutable));
574 };
575 auto scanJavaDir = [scanDir](const QString& dirPath) {
576 QDir dir(dirPath);
577 if (!dir.exists())
578 return;
579 auto entries = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
580 for (auto& entry : entries) {
581 scanDir(entry.canonicalFilePath());
582 }
583 };
584
585 scanJavaDir(APPLICATION->javaPath());
586
587 return javas;
588}

Callers 2

FindJavaPathsMethod · 0.85
executeTaskMethod · 0.85

Calls 5

PathCombineFunction · 0.85
appendMethod · 0.80
canonicalFilePathMethod · 0.80
existsMethod · 0.45
javaPathMethod · 0.45

Tested by

no test coverage detected