From 4186623d0d81d10e58ac98e6b6a02b8de2978344 Mon Sep 17 00:00:00 2001 From: Sky Date: Tue, 5 Nov 2013 21:08:42 +0000 Subject: Nuke Travis CI --- .travis.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c94982f2..00000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: cpp -compiler: - - gcc - -before_script: - - sudo apt-add-repository -y ppa:czchen/travis-ci - - sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa - - sudo add-apt-repository -y ppa:canonical-qt5-edgers/qt5-proper - - sudo apt-get update -yqq - - sudo apt-get install -yqq cmake - - sudo apt-get install -yqq ubuntu-sdk - -script: "cmake . && make -j4" - -notifications: - irc: "irc.esper.net#MultiMC" -- cgit v1.2.3 From 605423b8e486616677e88efafbcfaba1fb9f70e1 Mon Sep 17 00:00:00 2001 From: Sky Date: Tue, 5 Nov 2013 23:46:06 +0000 Subject: Read mcmod.info first, forgeversion.properties second --- logic/Mod.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/logic/Mod.cpp b/logic/Mod.cpp index f9647eea..cff9467e 100644 --- a/logic/Mod.cpp +++ b/logic/Mod.cpp @@ -56,34 +56,34 @@ void Mod::repath(const QFileInfo &file) return; QuaZipFile file(&zip); - for (bool more = zip.goToFirstFile(); more; more = zip.goToNextFile()) + + if (zip.setCurrentFile("mcmod.info")) { - QString name = zip.getCurrentFileName(); - if (name == "mcmod.info") + if(!file.open(QIODevice::ReadOnly)) { - if (!file.open(QIODevice::ReadOnly)) - { - zip.close(); - return; - } - ReadMCModInfo(file.readAll()); - file.close(); zip.close(); return; } - else if (name == "forgeversion.properties") + + ReadMCModInfo(file.readAll()); + file.close(); + zip.close(); + return; + } + else if (zip.setCurrentFile("forgeversion.properties")) + { + if (!file.open(QIODevice::ReadOnly)) { - if (!file.open(QIODevice::ReadOnly)) - { - zip.close(); - return; - } - ReadForgeInfo(file.readAll()); - file.close(); zip.close(); return; } + + ReadForgeInfo(file.readAll()); + file.close(); + zip.close(); + return; } + zip.close(); } else if (m_type == MOD_FOLDER) -- cgit v1.2.3 From 51dee3745f044e413797eb5ea3f8260d1ff6935b Mon Sep 17 00:00:00 2001 From: Sky Date: Wed, 6 Nov 2013 01:01:09 +0000 Subject: Fix "Auto Login" instance specific setting, tweak UI --- gui/MainWindow.cpp | 4 ++-- gui/dialogs/InstanceSettings.cpp | 8 ++++---- gui/dialogs/InstanceSettings.ui | 13 +++---------- gui/dialogs/SettingsDialog.ui | 18 +++++++++++++----- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 39e6dff2..cf4a7124 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -537,7 +537,7 @@ void MainWindow::instanceActivated(QModelIndex index) NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this); - bool autoLogin = MMC->settings()->get("AutoLogin").toBool(); + bool autoLogin = inst->settings().get("AutoLogin").toBool(); if (autoLogin) doAutoLogin(); else @@ -826,7 +826,7 @@ void MainWindow::on_actionInstanceSettings_triggered() return; InstanceSettings settings(&m_selectedInstance->settings(), this); - settings.setWindowTitle(QString("Instance settings")); + settings.setWindowTitle(tr("Instance settings")); settings.exec(); } diff --git a/gui/dialogs/InstanceSettings.cpp b/gui/dialogs/InstanceSettings.cpp index 57dd6a81..a3269878 100644 --- a/gui/dialogs/InstanceSettings.cpp +++ b/gui/dialogs/InstanceSettings.cpp @@ -89,11 +89,11 @@ void InstanceSettings::applySettings() } // Auto Login - bool login = ui->accountSettingsGroupBox->isChecked(); + bool login = ui->accountSettingsBox->isChecked(); m_obj->set("OverrideLogin", login); if (login) { - m_obj->set("AutoLogin", ui->autoLoginChecBox->isChecked()); + m_obj->set("AutoLogin", ui->autoLoginCheckBox->isChecked()); } else { @@ -159,8 +159,8 @@ void InstanceSettings::loadSettings() ui->windowHeightSpinBox->setValue(m_obj->get("MinecraftWinHeight").toInt()); // Auto Login - ui->accountSettingsGroupBox->setChecked(m_obj->get("OverrideLogin").toBool()); - ui->autoLoginChecBox->setChecked(m_obj->get("AutoLogin").toBool()); + ui->accountSettingsBox->setChecked(m_obj->get("OverrideLogin").toBool()); + ui->autoLoginCheckBox->setChecked(m_obj->get("AutoLogin").toBool()); // Memory ui->memoryGroupBox->setChecked(m_obj->get("OverrideMemory").toBool()); diff --git a/gui/dialogs/InstanceSettings.ui b/gui/dialogs/InstanceSettings.ui index b536e9ff..27004ed8 100644 --- a/gui/dialogs/InstanceSettings.ui +++ b/gui/dialogs/InstanceSettings.ui @@ -132,7 +132,7 @@ - + true @@ -147,16 +147,10 @@ - - - false - + Login automatically when an instance icon is double clicked? - - false - @@ -403,8 +397,7 @@ consoleSettingsBox showConsoleCheck autoCloseConsoleCheck - accountSettingsGroupBox - autoLoginChecBox + accountSettingsBox memoryGroupBox minMemSpinBox maxMemSpinBox diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index 6da9420e..a036cd09 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -33,7 +33,7 @@ QTabWidget::Rounded - 0 + 1 @@ -262,10 +262,19 @@ - - - Login automatically when an instance icon is double clicked? + + + Account Settings + + + + + Login automatically when an instance icon is double clicked? + + + + @@ -515,7 +524,6 @@ windowHeightSpinBox showConsoleCheck autoCloseConsoleCheck - autoLoginCheckBox minMemSpinBox maxMemSpinBox permGenSpinBox -- cgit v1.2.3 From dd6af4efab11b0c1c4344bcb780abf1701b51511 Mon Sep 17 00:00:00 2001 From: Sky Date: Wed, 6 Nov 2013 01:18:47 +0000 Subject: Nag for instance specific JVM args too --- gui/MainWindow.cpp | 4 ++-- gui/dialogs/InstanceSettings.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index cf4a7124..62ae195b 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -535,7 +535,7 @@ void MainWindow::instanceActivated(QModelIndex index) BaseInstance *inst = (BaseInstance *)index.data(InstanceList::InstancePointerRole).value(); - NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this); + NagUtils::checkJVMArgs(inst->settings().get("JvmArgs").toString(), this); bool autoLogin = inst->settings().get("AutoLogin").toBool(); if (autoLogin) @@ -548,7 +548,7 @@ void MainWindow::on_actionLaunchInstance_triggered() { if (m_selectedInstance) { - NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this); + NagUtils::checkJVMArgs(m_selectedInstance->settings().get("JvmArgs").toString(), this); doLogin(); } } diff --git a/gui/dialogs/InstanceSettings.cpp b/gui/dialogs/InstanceSettings.cpp index a3269878..add135b4 100644 --- a/gui/dialogs/InstanceSettings.cpp +++ b/gui/dialogs/InstanceSettings.cpp @@ -20,6 +20,7 @@ #include "InstanceSettings.h" #include "ui_InstanceSettings.h" #include "gui/Platform.h" +#include "logic/NagUtils.h" InstanceSettings::InstanceSettings(SettingsObject *obj, QWidget *parent) : m_obj(obj), QDialog(parent), ui(new Ui::InstanceSettings) @@ -123,6 +124,8 @@ void InstanceSettings::applySettings() { m_obj->set("JavaPath", ui->javaPathTextBox->text()); m_obj->set("JvmArgs", ui->jvmArgsTextBox->text()); + + NagUtils::checkJVMArgs(m_obj->get("JvmArgs").toString(), this->parentWidget()); } else { -- cgit v1.2.3 From bba4ed5ab2c98c3d60a141d6a089a49716753615 Mon Sep 17 00:00:00 2001 From: Sky Date: Wed, 6 Nov 2013 17:00:02 +0000 Subject: Open on the correct settings tab --- gui/dialogs/SettingsDialog.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index a036cd09..53a41d6e 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -33,7 +33,7 @@ QTabWidget::Rounded - 1 + 0 -- cgit v1.2.3 From 452cc1849fe7e3219d278615aa47d3303dbeb7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 6 Nov 2013 20:59:44 +0100 Subject: Fix Sourceforge lwjgl version index download. --- logic/lists/InstanceList.cpp | 22 +++++++++++----------- logic/lists/LwjglVersionList.cpp | 11 +++++++---- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/logic/lists/InstanceList.cpp b/logic/lists/InstanceList.cpp index 4446ff22..7081dc6f 100644 --- a/logic/lists/InstanceList.cpp +++ b/logic/lists/InstanceList.cpp @@ -204,7 +204,7 @@ void InstanceList::loadGroupList(QMap &groupMap) // if the root of the json wasn't an object, fail if (!jsonDoc.isObject()) { - qWarning("Invalid group file. Root entry should be an object."); + QLOG_WARN() << "Invalid group file. Root entry should be an object."; return; } @@ -217,7 +217,7 @@ void InstanceList::loadGroupList(QMap &groupMap) // Get the groups. if it's not an object, fail if (!rootObj.value("groups").isObject()) { - qWarning("Invalid group list JSON: 'groups' should be an object."); + QLOG_WARN() << "Invalid group list JSON: 'groups' should be an object."; return; } @@ -230,21 +230,21 @@ void InstanceList::loadGroupList(QMap &groupMap) // If not an object, complain and skip to the next one. if (!iter.value().isObject()) { - qWarning(QString("Group '%1' in the group list should " - "be an object.") - .arg(groupName) - .toUtf8()); + QLOG_WARN() << QString("Group '%1' in the group list should " + "be an object.") + .arg(groupName) + .toUtf8(); continue; } QJsonObject groupObj = iter.value().toObject(); if (!groupObj.value("instances").isArray()) { - qWarning(QString("Group '%1' in the group list is invalid. " - "It should contain an array " - "called 'instances'.") - .arg(groupName) - .toUtf8()); + QLOG_WARN() << QString("Group '%1' in the group list is invalid. " + "It should contain an array " + "called 'instances'.") + .arg(groupName) + .toUtf8(); continue; } diff --git a/logic/lists/LwjglVersionList.cpp b/logic/lists/LwjglVersionList.cpp index 3333e86c..df46d7be 100644 --- a/logic/lists/LwjglVersionList.cpp +++ b/logic/lists/LwjglVersionList.cpp @@ -83,7 +83,10 @@ void LWJGLVersionList::loadList() setLoading(true); auto worker = MMC->qnam(); - reply = worker->get(QNetworkRequest(QUrl(RSS_URL))); + QNetworkRequest req(QUrl(RSS_URL)); + req.setRawHeader("Accept", "text/xml"); + req.setRawHeader("User-Agent", "MultiMC/5.0 (Uncached)"); + reply = worker->get(req); connect(reply, SIGNAL(finished()), SLOT(netRequestComplete())); } @@ -127,7 +130,7 @@ void LWJGLVersionList::netRequestComplete() QDomElement linkElement = getDomElementByTagName(items.at(i).toElement(), "link"); if (linkElement.isNull()) { - qWarning() << "Link element" << i << "in RSS feed doesn't exist! Skipping."; + QLOG_INFO() << "Link element" << i << "in RSS feed doesn't exist! Skipping."; continue; } @@ -143,7 +146,7 @@ void LWJGLVersionList::netRequestComplete() QUrl url(link); if (!url.isValid()) { - qWarning() << "LWJGL version URL isn't valid:" << link << "Skipping."; + QLOG_INFO() << "LWJGL version URL isn't valid:" << link << "Skipping."; continue; } @@ -180,7 +183,7 @@ const PtrLWJGLVersion LWJGLVersionList::getVersion(const QString &versionName) void LWJGLVersionList::failed(QString msg) { - qWarning() << msg; + QLOG_INFO() << msg; emit loadListFailed(msg); } -- cgit v1.2.3 From ad7c41114ff2fd2220111fd0f71f052375aed68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 7 Nov 2013 22:31:15 +0100 Subject: Fix layout margins in console window --- gui/ConsoleWindow.ui | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/gui/ConsoleWindow.ui b/gui/ConsoleWindow.ui index 8dc80015..472c7c8d 100644 --- a/gui/ConsoleWindow.ui +++ b/gui/ConsoleWindow.ui @@ -6,8 +6,8 @@ 0 0 - 600 - 400 + 610 + 391 @@ -23,6 +23,9 @@ 0 + + 6 + @@ -49,6 +52,12 @@ + + 6 + + + 6 + @@ -65,14 +74,14 @@ - Kill Minecraft + &Kill Minecraft - Close + &Close @@ -80,6 +89,11 @@ + + text + closeButton + btnKillMinecraft + -- cgit v1.2.3 From b097d2f744a5f9152700a3df27c56b3fc8d203b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 11 Nov 2013 03:47:14 +0100 Subject: Use the right LWJGL path while creating an instance --- logic/LegacyUpdate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logic/LegacyUpdate.cpp b/logic/LegacyUpdate.cpp index 9533f8ff..5008a346 100644 --- a/logic/LegacyUpdate.cpp +++ b/logic/LegacyUpdate.cpp @@ -40,7 +40,7 @@ void LegacyUpdate::lwjglStart() LegacyInstance *inst = (LegacyInstance *)m_inst; lwjglVersion = inst->lwjglVersion(); - lwjglTargetPath = PathCombine("lwjgl", lwjglVersion); + lwjglTargetPath = PathCombine(MMC->settings()->get("LWJGLDir").toString(), lwjglVersion); lwjglNativesPath = PathCombine(lwjglTargetPath, "natives"); // if the 'done' file exists, we don't have to download this again -- cgit v1.2.3 From e611aef0e77f727d0c77f6dea0d373e7a12b241c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 11 Nov 2013 04:45:31 +0100 Subject: Recover from the bin folder of converted legacy instance being deleted. Use the new vanilla jar as the base jar if mcbackup.jar is missing. --- logic/LegacyUpdate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/logic/LegacyUpdate.cpp b/logic/LegacyUpdate.cpp index 5008a346..8ba97827 100644 --- a/logic/LegacyUpdate.cpp +++ b/logic/LegacyUpdate.cpp @@ -361,7 +361,10 @@ void LegacyUpdate::ModTheJar() setStatus("Installing mods - backing up minecraft.jar..."); if (!baseJar.exists() && !QFile::copy(runnableJar.filePath(), baseJar.filePath())) { - emitFailed("Failed to back up minecraft.jar"); + emitFailed("It seems both the active and base jar are gone. A fresh base jar will be used on next run."); + inst->setShouldRebuild(true); + inst->setShouldUpdate(true); + inst->setShouldUseCustomBaseJar(false); return; } } -- cgit v1.2.3