Fix issues with intel drivers. Forced java re-detection on Windows.
This commit is contained in:
parent
c31dbf13cb
commit
f0d850e1ee
@ -484,6 +484,7 @@ void MultiMC::initGlobalSettings()
|
|||||||
// Java Settings
|
// Java Settings
|
||||||
m_settings->registerSetting("JavaPath", "");
|
m_settings->registerSetting("JavaPath", "");
|
||||||
m_settings->registerSetting("LastHostname", "");
|
m_settings->registerSetting("LastHostname", "");
|
||||||
|
m_settings->registerSetting("JavaDetectionHack", "");
|
||||||
m_settings->registerSetting("JvmArgs", "");
|
m_settings->registerSetting("JvmArgs", "");
|
||||||
|
|
||||||
// Custom Commands
|
// Custom Commands
|
||||||
|
@ -110,7 +110,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||||||
MultiMCPlatform::fixWM_CLASS(this);
|
MultiMCPlatform::fixWM_CLASS(this);
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
QString winTitle = QString("MultiMC 5 - Version %1").arg(BuildConfig.printableVersionString());
|
QString winTitle =
|
||||||
|
QString("MultiMC 5 - Version %1").arg(BuildConfig.printableVersionString());
|
||||||
if (!BuildConfig.BUILD_PLATFORM.isEmpty())
|
if (!BuildConfig.BUILD_PLATFORM.isEmpty())
|
||||||
winTitle += " on " + BuildConfig.BUILD_PLATFORM;
|
winTitle += " on " + BuildConfig.BUILD_PLATFORM;
|
||||||
setWindowTitle(winTitle);
|
setWindowTitle(winTitle);
|
||||||
@ -120,7 +121,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||||||
|
|
||||||
// Global shortcuts
|
// Global shortcuts
|
||||||
{
|
{
|
||||||
//FIXME: This is kinda weird. and bad. We need some kind of managed shutdown.
|
// FIXME: This is kinda weird. and bad. We need some kind of managed shutdown.
|
||||||
auto q = new QShortcut(QKeySequence::Quit, this);
|
auto q = new QShortcut(QKeySequence::Quit, this);
|
||||||
connect(q, SIGNAL(activated()), qApp, SLOT(quit()));
|
connect(q, SIGNAL(activated()), qApp, SLOT(quit()));
|
||||||
}
|
}
|
||||||
@ -259,7 +260,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||||||
|
|
||||||
auto accounts = MMC->accounts();
|
auto accounts = MMC->accounts();
|
||||||
|
|
||||||
QList<CacheDownloadPtr> skin_dls;
|
QList<CacheDownloadPtr> skin_dls;
|
||||||
for (int i = 0; i < accounts->count(); i++)
|
for (int i = 0; i < accounts->count(); i++)
|
||||||
{
|
{
|
||||||
auto account = accounts->at(i);
|
auto account = accounts->at(i);
|
||||||
@ -270,21 +271,21 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||||||
auto meta = MMC->metacache()->resolveEntry("skins", profile.name + ".png");
|
auto meta = MMC->metacache()->resolveEntry("skins", profile.name + ".png");
|
||||||
auto action = CacheDownload::make(
|
auto action = CacheDownload::make(
|
||||||
QUrl("http://" + URLConstants::SKINS_BASE + profile.name + ".png"), meta);
|
QUrl("http://" + URLConstants::SKINS_BASE + profile.name + ".png"), meta);
|
||||||
skin_dls.append(action);
|
skin_dls.append(action);
|
||||||
meta->stale = true;
|
meta->stale = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!skin_dls.isEmpty())
|
if (!skin_dls.isEmpty())
|
||||||
{
|
{
|
||||||
auto job = new NetJob("Startup player skins download");
|
auto job = new NetJob("Startup player skins download");
|
||||||
connect(job, SIGNAL(succeeded()), SLOT(skinJobFinished()));
|
connect(job, SIGNAL(succeeded()), SLOT(skinJobFinished()));
|
||||||
connect(job, SIGNAL(failed()), SLOT(skinJobFinished()));
|
connect(job, SIGNAL(failed()), SLOT(skinJobFinished()));
|
||||||
for(auto action: skin_dls)
|
for (auto action : skin_dls)
|
||||||
job->addNetAction(action);
|
job->addNetAction(action);
|
||||||
skin_download_job.reset(job);
|
skin_download_job.reset(job);
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
// run the things that load and download other things... FIXME: this is NOT the place
|
// run the things that load and download other things... FIXME: this is NOT the place
|
||||||
// FIXME: invisible actions in the background = NOPE.
|
// FIXME: invisible actions in the background = NOPE.
|
||||||
@ -335,11 +336,10 @@ MainWindow::~MainWindow()
|
|||||||
|
|
||||||
void MainWindow::skinJobFinished()
|
void MainWindow::skinJobFinished()
|
||||||
{
|
{
|
||||||
activeAccountChanged();
|
activeAccountChanged();
|
||||||
skin_download_job.reset();
|
skin_download_job.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::showInstanceContextMenu(const QPoint &pos)
|
void MainWindow::showInstanceContextMenu(const QPoint &pos)
|
||||||
{
|
{
|
||||||
QList<QAction *> actions;
|
QList<QAction *> actions;
|
||||||
@ -361,9 +361,10 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
|
|||||||
QAction *actionCopyInstance = new QAction(tr("Copy instance"), this);
|
QAction *actionCopyInstance = new QAction(tr("Copy instance"), this);
|
||||||
actionCopyInstance->setToolTip(ui->actionCopyInstance->toolTip());
|
actionCopyInstance->setToolTip(ui->actionCopyInstance->toolTip());
|
||||||
|
|
||||||
|
connect(actionRename, SIGNAL(triggered(bool)),
|
||||||
connect(actionRename, SIGNAL(triggered(bool)), SLOT(on_actionRenameInstance_triggered()));
|
SLOT(on_actionRenameInstance_triggered()));
|
||||||
connect(actionCopyInstance, SIGNAL(triggered(bool)), SLOT(on_actionCopyInstance_triggered()));
|
connect(actionCopyInstance, SIGNAL(triggered(bool)),
|
||||||
|
SLOT(on_actionCopyInstance_triggered()));
|
||||||
|
|
||||||
actions.replace(1, actionRename);
|
actions.replace(1, actionRename);
|
||||||
actions.prepend(actionSep);
|
actions.prepend(actionSep);
|
||||||
@ -378,7 +379,8 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
|
|||||||
QAction *actionCreateInstance = new QAction(tr("Create instance"), this);
|
QAction *actionCreateInstance = new QAction(tr("Create instance"), this);
|
||||||
actionCreateInstance->setToolTip(ui->actionAddInstance->toolTip());
|
actionCreateInstance->setToolTip(ui->actionAddInstance->toolTip());
|
||||||
|
|
||||||
connect(actionCreateInstance, SIGNAL(triggered(bool)), SLOT(on_actionAddInstance_triggered()));
|
connect(actionCreateInstance, SIGNAL(triggered(bool)),
|
||||||
|
SLOT(on_actionAddInstance_triggered()));
|
||||||
|
|
||||||
actions.prepend(actionSep);
|
actions.prepend(actionSep);
|
||||||
actions.prepend(actionVoid);
|
actions.prepend(actionVoid);
|
||||||
@ -386,7 +388,7 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
|
|||||||
}
|
}
|
||||||
QMenu myMenu;
|
QMenu myMenu;
|
||||||
myMenu.addActions(actions);
|
myMenu.addActions(actions);
|
||||||
if(onInstance)
|
if (onInstance)
|
||||||
myMenu.setEnabled(m_selectedInstance->canLaunch());
|
myMenu.setEnabled(m_selectedInstance->canLaunch());
|
||||||
myMenu.exec(view->mapToGlobal(pos));
|
myMenu.exec(view->mapToGlobal(pos));
|
||||||
}
|
}
|
||||||
@ -399,7 +401,8 @@ void MainWindow::updateToolsMenu()
|
|||||||
}
|
}
|
||||||
QMenu *launchMenu = new QMenu(this);
|
QMenu *launchMenu = new QMenu(this);
|
||||||
QAction *normalLaunch = launchMenu->addAction(tr("Launch"));
|
QAction *normalLaunch = launchMenu->addAction(tr("Launch"));
|
||||||
connect(normalLaunch, &QAction::triggered, [this](){doLaunch();});
|
connect(normalLaunch, &QAction::triggered, [this]()
|
||||||
|
{ doLaunch(); });
|
||||||
launchMenu->addSeparator()->setText(tr("Profilers"));
|
launchMenu->addSeparator()->setText(tr("Profilers"));
|
||||||
for (auto profiler : MMC->profilers().values())
|
for (auto profiler : MMC->profilers().values())
|
||||||
{
|
{
|
||||||
@ -408,11 +411,13 @@ void MainWindow::updateToolsMenu()
|
|||||||
if (!profiler->check(&error))
|
if (!profiler->check(&error))
|
||||||
{
|
{
|
||||||
profilerAction->setDisabled(true);
|
profilerAction->setDisabled(true);
|
||||||
profilerAction->setToolTip(tr("Profiler not setup correctly. Go into settings, \"External Tools\"."));
|
profilerAction->setToolTip(
|
||||||
|
tr("Profiler not setup correctly. Go into settings, \"External Tools\"."));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
connect(profilerAction, &QAction::triggered, [this, profiler](){doLaunch(true, profiler.get());});
|
connect(profilerAction, &QAction::triggered, [this, profiler]()
|
||||||
|
{ doLaunch(true, profiler.get()); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
launchMenu->addSeparator()->setText(tr("Tools"));
|
launchMenu->addSeparator()->setText(tr("Tools"));
|
||||||
@ -423,14 +428,13 @@ void MainWindow::updateToolsMenu()
|
|||||||
if (!tool->check(&error))
|
if (!tool->check(&error))
|
||||||
{
|
{
|
||||||
toolAction->setDisabled(true);
|
toolAction->setDisabled(true);
|
||||||
toolAction->setToolTip(tr("Tool not setup correctly. Go into settings, \"External Tools\"."));
|
toolAction->setToolTip(
|
||||||
|
tr("Tool not setup correctly. Go into settings, \"External Tools\"."));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
connect(toolAction, &QAction::triggered, [this, tool]()
|
connect(toolAction, &QAction::triggered, [this, tool]()
|
||||||
{
|
{ tool->createDetachedTool(m_selectedInstance, this)->run(); });
|
||||||
tool->createDetachedTool(m_selectedInstance, this)->run();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui->actionLaunchInstance->setMenu(launchMenu);
|
ui->actionLaunchInstance->setMenu(launchMenu);
|
||||||
@ -672,7 +676,7 @@ void MainWindow::downloadUpdates(QString repo, int versionId, bool installOnExit
|
|||||||
if (updateDlg.exec(&updateTask))
|
if (updateDlg.exec(&updateTask))
|
||||||
{
|
{
|
||||||
UpdateFlags baseFlags = None;
|
UpdateFlags baseFlags = None;
|
||||||
if(BuildConfig.UPDATER_DRY_RUN)
|
if (BuildConfig.UPDATER_DRY_RUN)
|
||||||
baseFlags |= DryRun;
|
baseFlags |= DryRun;
|
||||||
if (installOnExit)
|
if (installOnExit)
|
||||||
MMC->installUpdates(updateTask.updateFilesDir(), baseFlags | OnExit);
|
MMC->installUpdates(updateTask.updateFilesDir(), baseFlags | OnExit);
|
||||||
@ -711,9 +715,9 @@ void MainWindow::on_actionAddInstance_triggered()
|
|||||||
{
|
{
|
||||||
#ifdef TEST_SEGV
|
#ifdef TEST_SEGV
|
||||||
// For further testing stuff.
|
// For further testing stuff.
|
||||||
int v = *((int*)-1);
|
int v = *((int *)-1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!MMC->minecraftlist()->isLoaded() && m_versionLoadTask &&
|
if (!MMC->minecraftlist()->isLoaded() && m_versionLoadTask &&
|
||||||
m_versionLoadTask->isRunning())
|
m_versionLoadTask->isRunning())
|
||||||
{
|
{
|
||||||
@ -1068,10 +1072,10 @@ void MainWindow::instanceActivated(QModelIndex index)
|
|||||||
{
|
{
|
||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return;
|
return;
|
||||||
QString id = index.data(InstanceList::InstanceIDRole).toString();
|
QString id = index.data(InstanceList::InstanceIDRole).toString();
|
||||||
InstancePtr inst = MMC->instances()->getInstanceById(id);
|
InstancePtr inst = MMC->instances()->getInstanceById(id);
|
||||||
if(!inst)
|
if (!inst)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NagUtils::checkJVMArgs(inst->settings().get("JvmArgs").toString(), this);
|
NagUtils::checkJVMArgs(inst->settings().get("JvmArgs").toString(), this);
|
||||||
|
|
||||||
@ -1224,7 +1228,8 @@ void MainWindow::doLaunch(bool online, BaseProfilerFactory *profiler)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateInstance(InstancePtr instance, AuthSessionPtr session, BaseProfilerFactory *profiler)
|
void MainWindow::updateInstance(InstancePtr instance, AuthSessionPtr session,
|
||||||
|
BaseProfilerFactory *profiler)
|
||||||
{
|
{
|
||||||
auto updateTask = instance->doUpdate();
|
auto updateTask = instance->doUpdate();
|
||||||
if (!updateTask)
|
if (!updateTask)
|
||||||
@ -1239,14 +1244,15 @@ void MainWindow::updateInstance(InstancePtr instance, AuthSessionPtr session, Ba
|
|||||||
tDialog.exec(updateTask.get());
|
tDialog.exec(updateTask.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session, BaseProfilerFactory *profiler)
|
void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session,
|
||||||
|
BaseProfilerFactory *profiler)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(instance != NULL, "launchInstance", "instance is NULL");
|
Q_ASSERT_X(instance != NULL, "launchInstance", "instance is NULL");
|
||||||
Q_ASSERT_X(session.get() != nullptr, "launchInstance", "session is NULL");
|
Q_ASSERT_X(session.get() != nullptr, "launchInstance", "session is NULL");
|
||||||
|
|
||||||
QString launchScript;
|
QString launchScript;
|
||||||
|
|
||||||
if(!instance->prepareForLaunch(session, launchScript))
|
if (!instance->prepareForLaunch(session, launchScript))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MinecraftProcess *proc = new MinecraftProcess(instance);
|
MinecraftProcess *proc = new MinecraftProcess(instance);
|
||||||
@ -1266,7 +1272,8 @@ void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session, Ba
|
|||||||
QString error;
|
QString error;
|
||||||
if (!profiler->check(&error))
|
if (!profiler->check(&error))
|
||||||
{
|
{
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Couldn't start profiler: %1").arg(error));
|
QMessageBox::critical(this, tr("Error"),
|
||||||
|
tr("Couldn't start profiler: %1").arg(error));
|
||||||
proc->abort();
|
proc->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1276,9 +1283,11 @@ void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session, Ba
|
|||||||
dialog.setMaximum(0);
|
dialog.setMaximum(0);
|
||||||
dialog.setValue(0);
|
dialog.setValue(0);
|
||||||
dialog.setLabelText(tr("Waiting for profiler..."));
|
dialog.setLabelText(tr("Waiting for profiler..."));
|
||||||
connect(&dialog, &QProgressDialog::canceled, profilerInstance, &BaseProfiler::abortProfiling);
|
connect(&dialog, &QProgressDialog::canceled, profilerInstance,
|
||||||
|
&BaseProfiler::abortProfiling);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
connect(profilerInstance, &BaseProfiler::readyToLaunch, [&dialog, this, proc](const QString &message)
|
connect(profilerInstance, &BaseProfiler::readyToLaunch,
|
||||||
|
[&dialog, this, proc](const QString & message)
|
||||||
{
|
{
|
||||||
dialog.accept();
|
dialog.accept();
|
||||||
QMessageBox msg;
|
QMessageBox msg;
|
||||||
@ -1291,7 +1300,8 @@ void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session, Ba
|
|||||||
msg.exec();
|
msg.exec();
|
||||||
proc->launch();
|
proc->launch();
|
||||||
});
|
});
|
||||||
connect(profilerInstance, &BaseProfiler::abortLaunch, [&dialog, this, proc](const QString &message)
|
connect(profilerInstance, &BaseProfiler::abortLaunch,
|
||||||
|
[&dialog, this, proc](const QString & message)
|
||||||
{
|
{
|
||||||
dialog.accept();
|
dialog.accept();
|
||||||
QMessageBox msg;
|
QMessageBox msg;
|
||||||
@ -1416,9 +1426,9 @@ void MainWindow::on_actionChangeInstLWJGLVersion_triggered()
|
|||||||
lselect.exec();
|
lselect.exec();
|
||||||
if (lselect.result() == QDialog::Accepted)
|
if (lselect.result() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
auto ptr = std::dynamic_pointer_cast<LegacyInstance>(m_selectedInstance);
|
auto ptr = std::dynamic_pointer_cast<LegacyInstance>(m_selectedInstance);
|
||||||
if(ptr)
|
if (ptr)
|
||||||
ptr->setLWJGLVersion(lselect.selectedVersion());
|
ptr->setLWJGLVersion(lselect.selectedVersion());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1434,15 +1444,15 @@ void MainWindow::on_actionInstanceSettings_triggered()
|
|||||||
|
|
||||||
void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||||
{
|
{
|
||||||
if(!current.isValid())
|
if (!current.isValid())
|
||||||
{
|
{
|
||||||
selectionBad();
|
selectionBad();
|
||||||
MMC->settings()->set("SelectedInstance", QString());
|
MMC->settings()->set("SelectedInstance", QString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString id = current.data(InstanceList::InstanceIDRole).toString();
|
QString id = current.data(InstanceList::InstanceIDRole).toString();
|
||||||
m_selectedInstance = MMC->instances()->getInstanceById(id);
|
m_selectedInstance = MMC->instances()->getInstanceById(id);
|
||||||
if ( m_selectedInstance )
|
if (m_selectedInstance)
|
||||||
{
|
{
|
||||||
ui->instanceToolBar->setEnabled(m_selectedInstance->canLaunch());
|
ui->instanceToolBar->setEnabled(m_selectedInstance->canLaunch());
|
||||||
renameButton->setText(m_selectedInstance->name());
|
renameButton->setText(m_selectedInstance->name());
|
||||||
@ -1461,9 +1471,9 @@ void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex &
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
selectionBad();
|
selectionBad();
|
||||||
MMC->settings()->set("SelectedInstance", QString());
|
MMC->settings()->set("SelectedInstance", QString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1528,7 +1538,9 @@ void MainWindow::checkMigrateLegacyAssets()
|
|||||||
|
|
||||||
void MainWindow::checkSetDefaultJava()
|
void MainWindow::checkSetDefaultJava()
|
||||||
{
|
{
|
||||||
|
const QString javaHack = "IntelHack";
|
||||||
bool askForJava = false;
|
bool askForJava = false;
|
||||||
|
do
|
||||||
{
|
{
|
||||||
QString currentHostName = QHostInfo::localHostName();
|
QString currentHostName = QHostInfo::localHostName();
|
||||||
QString oldHostName = MMC->settings()->get("LastHostname").toString();
|
QString oldHostName = MMC->settings()->get("LastHostname").toString();
|
||||||
@ -1536,16 +1548,30 @@ void MainWindow::checkSetDefaultJava()
|
|||||||
{
|
{
|
||||||
MMC->settings()->set("LastHostname", currentHostName);
|
MMC->settings()->set("LastHostname", currentHostName);
|
||||||
askForJava = true;
|
askForJava = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
QString currentJavaPath = MMC->settings()->get("JavaPath").toString();
|
QString currentJavaPath = MMC->settings()->get("JavaPath").toString();
|
||||||
if (currentJavaPath.isEmpty())
|
if (currentJavaPath.isEmpty())
|
||||||
{
|
{
|
||||||
askForJava = true;
|
askForJava = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
#if defined Q_OS_WIN32
|
||||||
|
QString currentHack = MMC->settings()->get("JavaDetectionHack").toString();
|
||||||
|
if (currentHack != javaHack)
|
||||||
|
{
|
||||||
|
CustomMessageBox::selectable(
|
||||||
|
this, tr("Java detection forced"),
|
||||||
|
tr("Because of graphics performance issues caused by Intel drivers on Windows, "
|
||||||
|
"MultiMC java detection was forced. Please select a Minecraft version. If "
|
||||||
|
"you have custom java versions set for your instances, make sure you use "
|
||||||
|
"the 'javaw.exe' executable."),
|
||||||
|
QMessageBox::Warning)->exec();
|
||||||
|
askForJava = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} while (0);
|
||||||
|
|
||||||
if (askForJava)
|
if (askForJava)
|
||||||
{
|
{
|
||||||
@ -1573,7 +1599,10 @@ void MainWindow::checkSetDefaultJava()
|
|||||||
java = ju.GetDefaultJava();
|
java = ju.GetDefaultJava();
|
||||||
}
|
}
|
||||||
if (java)
|
if (java)
|
||||||
|
{
|
||||||
MMC->settings()->set("JavaPath", java->path);
|
MMC->settings()->set("JavaPath", java->path);
|
||||||
|
MMC->settings()->set("JavaDetectionHack", javaHack);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
MMC->settings()->set("JavaPath", QString("java"));
|
MMC->settings()->set("JavaPath", QString("java"));
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ QList<JavaVersionPtr> JavaUtils::FindJavaFromRegistryKey(DWORD keyType, QString
|
|||||||
javaVersion->id = subKeyName;
|
javaVersion->id = subKeyName;
|
||||||
javaVersion->arch = archType;
|
javaVersion->arch = archType;
|
||||||
javaVersion->path =
|
javaVersion->path =
|
||||||
QDir(PathCombine(value, "bin")).absoluteFilePath("java.exe");
|
QDir(PathCombine(value, "bin")).absoluteFilePath("javaw.exe");
|
||||||
javas.append(javaVersion);
|
javas.append(javaVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,12 +154,12 @@ QList<QString> JavaUtils::FindJavaPaths()
|
|||||||
KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\Java Development Kit");
|
KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\Java Development Kit");
|
||||||
|
|
||||||
java_candidates.append(JRE64s);
|
java_candidates.append(JRE64s);
|
||||||
java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre7/bin/java.exe"));
|
java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre7/bin/javaw.exe"));
|
||||||
java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre6/bin/java.exe"));
|
java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre6/bin/javaw.exe"));
|
||||||
java_candidates.append(JDK64s);
|
java_candidates.append(JDK64s);
|
||||||
java_candidates.append(JRE32s);
|
java_candidates.append(JRE32s);
|
||||||
java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre7/bin/java.exe"));
|
java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre7/bin/javaw.exe"));
|
||||||
java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre6/bin/java.exe"));
|
java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre6/bin/javaw.exe"));
|
||||||
java_candidates.append(JDK32s);
|
java_candidates.append(JDK32s);
|
||||||
java_candidates.append(MakeJavaPtr(this->GetDefaultJava()->path));
|
java_candidates.append(MakeJavaPtr(this->GetDefaultJava()->path));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user