diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-03-24 14:47:22 +0100 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-03-24 16:10:39 +0100 |
commit | 82c35f27464e3fd0d0aaa4f9e495e895f8534799 (patch) | |
tree | e162e482fb47d149629f91a0d27b6f99f4c62c7a /launcher/ui/pages/global | |
parent | c7fdfb811669a863606dc0a26186c0ab827db9c6 (diff) | |
download | PrismLauncher-82c35f27464e3fd0d0aaa4f9e495e895f8534799.tar.gz PrismLauncher-82c35f27464e3fd0d0aaa4f9e495e895f8534799.tar.bz2 PrismLauncher-82c35f27464e3fd0d0aaa4f9e495e895f8534799.zip |
feat: block launch if Java is incompatible
Keep track of compatible Java versions from meta. Launch-step
VerifyJavaInstall will check if current instance's Java version is
compatible.
Also add override option both globally and per-instance in-case the user
doesn't care about the requirement.
Diffstat (limited to 'launcher/ui/pages/global')
-rw-r--r-- | launcher/ui/pages/global/JavaPage.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/pages/global/JavaPage.ui | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/launcher/ui/pages/global/JavaPage.cpp b/launcher/ui/pages/global/JavaPage.cpp index 3eb4bd59..d1c61287 100644 --- a/launcher/ui/pages/global/JavaPage.cpp +++ b/launcher/ui/pages/global/JavaPage.cpp @@ -95,6 +95,7 @@ void JavaPage::applySettings() // Java Settings s->set("JavaPath", ui->javaPathTextBox->text()); s->set("JvmArgs", ui->jvmArgsTextBox->text()); + s->set("IgnoreJavaCompatibility", ui->skipCompatibilityCheckbox->isChecked()); JavaCommon::checkJVMArgs(s->get("JvmArgs").toString(), this->parentWidget()); } void JavaPage::loadSettings() @@ -118,6 +119,7 @@ void JavaPage::loadSettings() // Java Settings ui->javaPathTextBox->setText(s->get("JavaPath").toString()); ui->jvmArgsTextBox->setText(s->get("JvmArgs").toString()); + ui->skipCompatibilityCheckbox->setChecked(s->get("IgnoreJavaCompatibility").toBool()); } void JavaPage::on_javaDetectBtn_clicked() diff --git a/launcher/ui/pages/global/JavaPage.ui b/launcher/ui/pages/global/JavaPage.ui index b67e9994..d27b200f 100644 --- a/launcher/ui/pages/global/JavaPage.ui +++ b/launcher/ui/pages/global/JavaPage.ui @@ -222,6 +222,22 @@ </property> </widget> </item> + <item row="4" column="1"> + <widget class="QCheckBox" name="skipCompatibilityCheckbox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>If enabled, the launcher will not check if an instance is compatible with the selected Java version.</string> + </property> + <property name="text"> + <string>Skip Java compatibility checks</string> + </property> + </widget> + </item> </layout> </widget> </item> |