mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-03 16:51:30 +00:00
Merge branch 'MultiMC:develop' into develop
This commit is contained in:
@@ -68,4 +68,5 @@ VersionFilterData::VersionFilterData()
|
||||
|
||||
java8BeginsDate = timeFromS3Time("2017-03-30T09:32:19+00:00");
|
||||
java16BeginsDate = timeFromS3Time("2021-05-12T11:19:15+00:00");
|
||||
java17BeginsDate = timeFromS3Time("2021-11-16T17:04:48+00:00");
|
||||
}
|
||||
|
@@ -25,5 +25,7 @@ struct VersionFilterData
|
||||
QDateTime java8BeginsDate;
|
||||
// release data of first version to require Java 16 (21w19a)
|
||||
QDateTime java16BeginsDate;
|
||||
// release data of first version to require Java 17 (1.18 Pre Release 2)
|
||||
QDateTime java17BeginsDate;
|
||||
};
|
||||
extern VersionFilterData g_VersionFilterData;
|
||||
|
@@ -69,14 +69,17 @@ void AccountList::addAccount(const MinecraftAccountPtr account)
|
||||
// override/replace existing account with the same profileId
|
||||
auto existingAccount = findAccountByProfileId(profileId);
|
||||
if(existingAccount != -1) {
|
||||
MinecraftAccountPtr existingAccountPtr = m_accounts[existingAccount];
|
||||
m_accounts[existingAccount] = account;
|
||||
if(m_activeAccount == existingAccountPtr) {
|
||||
m_activeAccount = account;
|
||||
}
|
||||
emit dataChanged(index(existingAccount), index(existingAccount, columnCount(QModelIndex()) - 1));
|
||||
onListChanged();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if we don't have this porfileId yet, add the account to the end
|
||||
int row = m_accounts.count();
|
||||
beginInsertRows(QModelIndex(), row, row);
|
||||
|
@@ -89,7 +89,7 @@ void AuthRequest::onUploadProgress(qint64 uploaded, qint64 total) {
|
||||
emit uploadProgress(uploaded, total);
|
||||
}
|
||||
|
||||
void AuthRequest::setup(const QNetworkRequest &req, QNetworkAccessManager::Operation operation, const QByteArray &verb) {
|
||||
void AuthRequest::setup(const QNetworkRequest &req, QNetworkAccessManager::Operation operation) {
|
||||
request_ = req;
|
||||
operation_ = operation;
|
||||
url_ = req.url();
|
||||
@@ -97,10 +97,6 @@ void AuthRequest::setup(const QNetworkRequest &req, QNetworkAccessManager::Opera
|
||||
QUrl url = url_;
|
||||
request_.setUrl(url);
|
||||
|
||||
if (!verb.isEmpty()) {
|
||||
request_.setRawHeader(Katabasis::HTTP_HTTP_HEADER, verb);
|
||||
}
|
||||
|
||||
status_ = Requesting;
|
||||
error_ = QNetworkReply::NoError;
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ protected slots:
|
||||
void onUploadProgress(qint64 uploaded, qint64 total);
|
||||
|
||||
protected:
|
||||
void setup(const QNetworkRequest &request, QNetworkAccessManager::Operation operation, const QByteArray &verb = QByteArray());
|
||||
void setup(const QNetworkRequest &request, QNetworkAccessManager::Operation operation);
|
||||
|
||||
enum Status {
|
||||
Idle, Requesting, ReRequesting
|
||||
|
@@ -11,8 +11,17 @@ void VerifyJavaInstall::executeTask() {
|
||||
auto javaVersion = m_inst->getJavaVersion();
|
||||
auto minecraftComponent = m_inst->getPackProfile()->getComponent("net.minecraft");
|
||||
|
||||
// Java 17 requirement
|
||||
if (minecraftComponent->getReleaseDateTime() >= g_VersionFilterData.java17BeginsDate) {
|
||||
if (javaVersion.major() < 17) {
|
||||
emit logLine("Minecraft 1.18 Pre Release 2 and above require the use of Java 17",
|
||||
MessageLevel::Fatal);
|
||||
emitFailed(tr("Minecraft 1.18 Pre Release 2 and above require the use of Java 17"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Java 16 requirement
|
||||
if (minecraftComponent->getReleaseDateTime() >= g_VersionFilterData.java16BeginsDate) {
|
||||
else if (minecraftComponent->getReleaseDateTime() >= g_VersionFilterData.java16BeginsDate) {
|
||||
if (javaVersion.major() < 16) {
|
||||
emit logLine("Minecraft 21w19a and above require the use of Java 16",
|
||||
MessageLevel::Fatal);
|
||||
|
Reference in New Issue
Block a user