Skip to content

Commit

Permalink
Merge pull request PrismLauncher#2947 from Trial97/fix_initial_setup
Browse files Browse the repository at this point in the history
do not require java if auto-download is enabled
  • Loading branch information
TheKodeToad authored Oct 21, 2024
2 parents ea703ba + fcadbbb commit b049e92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions launcher/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,9 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
bool Application::createSetupWizard()
{
bool javaRequired = [&]() {
if (BuildConfig.JAVA_DOWNLOADER_ENABLED && m_settings->get("AutomaticJavaDownload").toBool()) {
return false;
}
bool ignoreJavaWizard = m_settings->get("IgnoreJavaWizard").toBool();
if (ignoreJavaWizard) {
return false;
Expand All @@ -1083,10 +1086,7 @@ bool Application::createSetupWizard()
}
QString currentJavaPath = settings()->get("JavaPath").toString();
QString actualPath = FS::ResolveExecutable(currentJavaPath);
if (actualPath.isNull()) {
return true;
}
return false;
return actualPath.isNull();
}();
bool askjava = BuildConfig.JAVA_DOWNLOADER_ENABLED && !javaRequired && !m_settings->get("AutomaticJavaDownload").toBool() &&
!m_settings->get("AutomaticJavaSwitch").toBool() && !m_settings->get("UserAskedAboutAutomaticJavaDownload").toBool();
Expand Down

0 comments on commit b049e92

Please sign in to comment.