Added some logs and fixed natives extraction
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
ea2adf909d
commit
5232b3cd89
@ -1078,6 +1078,12 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt
|
|||||||
process->appendStep(makeShared<Update>(pptr, Net::Mode::Offline));
|
process->appendStep(makeShared<Update>(pptr, Net::Mode::Offline));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check java
|
||||||
|
{
|
||||||
|
process->appendStep(makeShared<AutoInstallJava>(pptr));
|
||||||
|
process->appendStep(makeShared<CheckJava>(pptr));
|
||||||
|
}
|
||||||
|
|
||||||
// if there are any jar mods
|
// if there are any jar mods
|
||||||
{
|
{
|
||||||
process->appendStep(makeShared<ModMinecraftJar>(pptr));
|
process->appendStep(makeShared<ModMinecraftJar>(pptr));
|
||||||
@ -1102,11 +1108,6 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt
|
|||||||
{
|
{
|
||||||
process->appendStep(makeShared<ReconstructAssets>(pptr));
|
process->appendStep(makeShared<ReconstructAssets>(pptr));
|
||||||
}
|
}
|
||||||
// check java
|
|
||||||
{
|
|
||||||
process->appendStep(makeShared<AutoInstallJava>(pptr));
|
|
||||||
process->appendStep(makeShared<CheckJava>(pptr));
|
|
||||||
}
|
|
||||||
|
|
||||||
// verify that minimum Java requirements are met
|
// verify that minimum Java requirements are met
|
||||||
{
|
{
|
||||||
|
@ -68,12 +68,15 @@ void AutoInstallJava::executeTask()
|
|||||||
}
|
}
|
||||||
auto packProfile = m_instance->getPackProfile();
|
auto packProfile = m_instance->getPackProfile();
|
||||||
if (!APPLICATION->settings()->get("AutomaticJavaDownload").toBool()) {
|
if (!APPLICATION->settings()->get("AutomaticJavaDownload").toBool()) {
|
||||||
auto javas = APPLICATION->javalist().get();
|
auto javas = APPLICATION->javalist();
|
||||||
m_current_task = javas->getLoadTask();
|
m_current_task = javas->getLoadTask();
|
||||||
connect(m_current_task.get(), &Task::finished, this, [this, javas, packProfile] {
|
connect(m_current_task.get(), &Task::finished, this, [this, javas, packProfile] {
|
||||||
for (auto i = 0; i < javas->count(); i++) {
|
for (auto i = 0; i < javas->count(); i++) {
|
||||||
auto java = std::dynamic_pointer_cast<JavaInstall>(javas->at(i));
|
auto java = std::dynamic_pointer_cast<JavaInstall>(javas->at(i));
|
||||||
if (java && packProfile->getProfile()->getCompatibleJavaMajors().contains(java->id.major())) {
|
if (java && packProfile->getProfile()->getCompatibleJavaMajors().contains(java->id.major())) {
|
||||||
|
if (!java->is_64bit) {
|
||||||
|
emit logLine(tr("The automatic Java mechanism detected a x32 java."), MessageLevel::Info);
|
||||||
|
}
|
||||||
setJavaPath(java->path);
|
setJavaPath(java->path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
#include "MessageLevel.h"
|
||||||
#include "java/JavaInstall.h"
|
#include "java/JavaInstall.h"
|
||||||
#include "java/JavaInstallList.h"
|
#include "java/JavaInstallList.h"
|
||||||
#include "java/JavaVersion.h"
|
#include "java/JavaVersion.h"
|
||||||
@ -50,6 +51,16 @@ void VerifyJavaInstall::executeTask()
|
|||||||
auto settings = instance->settings();
|
auto settings = instance->settings();
|
||||||
auto storedVersion = settings->get("JavaVersion").toString();
|
auto storedVersion = settings->get("JavaVersion").toString();
|
||||||
auto ignoreCompatibility = settings->get("IgnoreJavaCompatibility").toBool();
|
auto ignoreCompatibility = settings->get("IgnoreJavaCompatibility").toBool();
|
||||||
|
auto javaArchitecture = settings->get("JavaArchitecture").toString();
|
||||||
|
auto maxMemAlloc = settings->get("MaxMemAlloc").toInt();
|
||||||
|
|
||||||
|
emit logLine(tr("Java architecture is x%1.").arg(javaArchitecture), MessageLevel::Info);
|
||||||
|
if (javaArchitecture == "32" && maxMemAlloc > 2048) {
|
||||||
|
emit logLine(tr("Max memory allocation exceeds the supported value.\n"
|
||||||
|
"The selected java is 32 bit and doesn't support more than 2GB of ram.\n"
|
||||||
|
"The instance may not start due to this."),
|
||||||
|
MessageLevel::Error);
|
||||||
|
}
|
||||||
|
|
||||||
auto compatibleMajors = packProfile->getProfile()->getCompatibleJavaMajors();
|
auto compatibleMajors = packProfile->getProfile()->getCompatibleJavaMajors();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user