mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 09:08:42 +00:00
Prepare for rework of instance launch/update
Added missing licenses Added a Java functionality checker (detects 32/64bit java) Refactor of *Update - no longer based on BaseUpdate, but Task directly Fixed runner script to not derp up on 32bit linux. Could add more detection and error reporting there. Resources are now split into graphics and generated. Generated resources are placed in the build tree and included from there. Used the Java checker in the main settings dialog (TODO: instance settings). Partial support for ${arch}-using libraries - both 32 and 64 variants of ${arch} are downloaded.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "logic/JavaUtils.h"
|
||||
#include "logic/NagUtils.h"
|
||||
#include "logic/lists/JavaVersionList.h"
|
||||
#include <logic/JavaChecker.h>
|
||||
|
||||
#include <settingsobject.h>
|
||||
#include <pathutils.h>
|
||||
@@ -98,12 +99,6 @@ void SettingsDialog::on_lwjglDirBrowseBtn_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_compatModeCheckBox_clicked(bool checked)
|
||||
{
|
||||
Q_UNUSED(checked);
|
||||
updateCheckboxStuff();
|
||||
}
|
||||
|
||||
void SettingsDialog::on_maximizedCheckBox_clicked(bool checked)
|
||||
{
|
||||
Q_UNUSED(checked);
|
||||
@@ -235,7 +230,7 @@ void SettingsDialog::loadSettings(SettingsObject *s)
|
||||
ui->postExitCmdTextBox->setText(s->get("PostExitCommand").toString());
|
||||
}
|
||||
|
||||
void SettingsDialog::on_pushButton_clicked()
|
||||
void SettingsDialog::on_javaDetectBtn_clicked()
|
||||
{
|
||||
JavaVersionPtr java;
|
||||
|
||||
@@ -250,7 +245,7 @@ void SettingsDialog::on_pushButton_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_btnBrowse_clicked()
|
||||
void SettingsDialog::on_javaBrowseBtn_clicked()
|
||||
{
|
||||
QString dir = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
|
||||
if (!dir.isNull())
|
||||
@@ -258,3 +253,32 @@ void SettingsDialog::on_btnBrowse_clicked()
|
||||
ui->javaPathTextBox->setText(dir);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_javaTestBtn_clicked()
|
||||
{
|
||||
checker.reset(new JavaChecker());
|
||||
connect(checker.get(), SIGNAL(checkFinished(JavaCheckResult)), this,
|
||||
SLOT(checkFinished(JavaCheckResult)));
|
||||
checker->performCheck(ui->javaPathTextBox->text());
|
||||
}
|
||||
|
||||
void SettingsDialog::checkFinished(JavaCheckResult result)
|
||||
{
|
||||
if (result.valid)
|
||||
{
|
||||
QString text;
|
||||
text += "Java test succeeded!\n";
|
||||
if (result.is_64bit)
|
||||
text += "Using 64bit java.\n";
|
||||
text += "\n";
|
||||
text += "Platform reported: " + result.realPlatform;
|
||||
QMessageBox::information(this, tr("Java test success"), text);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(
|
||||
this, tr("Java test failure"),
|
||||
tr("The specified java binary didn't work. You should use the auto-detect feature, "
|
||||
"or set the path to the java executable."));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user