aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
Diffstat (limited to 'launcher')
-rw-r--r--launcher/Application.cpp69
-rw-r--r--launcher/CMakeLists.txt2
-rw-r--r--launcher/modplatform/atlauncher/ATLShareCode.cpp60
-rw-r--r--launcher/modplatform/atlauncher/ATLShareCode.h47
-rw-r--r--launcher/resources/multimc/multimc.qrc1
-rw-r--r--launcher/resources/multimc/scalable/instances/polymc.svg21
-rw-r--r--launcher/ui/MainWindow.cpp8
-rw-r--r--launcher/ui/pages/global/APIPage.ui4
-rw-r--r--launcher/ui/pages/global/AccountListPage.ui18
-rw-r--r--launcher/ui/pages/global/ExternalToolsPage.ui11
-rw-r--r--launcher/ui/pages/global/JavaPage.cpp2
-rw-r--r--launcher/ui/pages/global/JavaPage.ui113
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp14
-rw-r--r--launcher/ui/pages/global/LauncherPage.h1
-rw-r--r--launcher/ui/pages/global/LauncherPage.ui25
-rw-r--r--launcher/ui/pages/global/MinecraftPage.ui20
-rw-r--r--launcher/ui/pages/global/ProxyPage.ui16
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp150
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h50
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.ui16
-rw-r--r--launcher/ui/widgets/CustomCommands.ui17
21 files changed, 455 insertions, 210 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 8bd434f0..11109857 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -409,69 +409,6 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
return;
}
-#if defined(Q_OS_MAC)
- // move user data to new location if on macOS and it still exists in Contents/MacOS
- QDir fi(applicationDirPath());
- QString originalData = fi.absolutePath();
- // if the config file exists in Contents/MacOS, then user data is still there and needs to moved
- if (QFileInfo::exists(FS::PathCombine(originalData, BuildConfig.LAUNCHER_CONFIGFILE)))
- {
- if (!QFileInfo::exists(FS::PathCombine(originalData, "dontmovemacdata")))
- {
- QMessageBox::StandardButton askMoveDialogue;
- askMoveDialogue = QMessageBox::question(
- nullptr,
- BuildConfig.LAUNCHER_DISPLAYNAME,
- "Would you like to move application data to a new data location? It will improve the launcher's performance, but if you switch to older versions it will look like instances have disappeared. If you select no, you can migrate later in settings. You should select yes unless you're commonly switching between different versions (eg. develop and stable).",
- QMessageBox::Yes | QMessageBox::No,
- QMessageBox::Yes
- );
- if (askMoveDialogue == QMessageBox::Yes)
- {
- qDebug() << "On macOS and found config file in old location, moving user data...";
- QDir dir;
- QStringList dataFiles {
- "*.log", // Launcher log files: ${Launcher_Name}-@.log
- "accounts.json",
- "accounts",
- "assets",
- "cache",
- "icons",
- "instances",
- "libraries",
- "meta",
- "metacache",
- "mods",
- BuildConfig.LAUNCHER_CONFIGFILE,
- "themes",
- "translations"
- };
- QDirIterator files(originalData, dataFiles);
- while (files.hasNext()) {
- QString filePath(files.next());
- QString fileName(files.fileName());
- if (!dir.rename(filePath, FS::PathCombine(dataPath, fileName)))
- {
- qWarning() << "Failed to move " << fileName;
- }
- }
- }
- else
- {
- dataPath = originalData;
- QDir::setCurrent(dataPath);
- QFile file(originalData + "/dontmovemacdata");
- file.open(QIODevice::WriteOnly);
- }
- }
- else
- {
- dataPath = originalData;
- QDir::setCurrent(dataPath);
- }
- }
-#endif
-
/*
* Establish the mechanism for communication with an already running PolyMC that uses the same data path.
* If there is one, tell it what the user actually wanted to do and exit.
@@ -691,6 +628,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_settings->registerSetting("LastHostname", "");
m_settings->registerSetting("JvmArgs", "");
m_settings->registerSetting("IgnoreJavaCompatibility", false);
+ m_settings->registerSetting("IgnoreJavaWizard", false);
// Native library workarounds
m_settings->registerSetting("UseNativeOpenAL", false);
@@ -936,6 +874,10 @@ bool Application::createSetupWizard()
{
bool javaRequired = [&]()
{
+ bool ignoreJavaWizard = m_settings->get("IgnoreJavaWizard").toBool();
+ if(ignoreJavaWizard) {
+ return false;
+ }
QString currentHostName = QHostInfo::localHostName();
QString oldHostName = settings()->get("LastHostname").toString();
if (currentHostName != oldHostName)
@@ -966,6 +908,7 @@ bool Application::createSetupWizard()
{
m_setupWizard->addPage(new LanguageWizardPage(m_setupWizard));
}
+
if (javaRequired)
{
m_setupWizard->addPage(new JavaWizardPage(m_setupWizard));
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 075c183a..b79f03c8 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -559,6 +559,8 @@ set(ATLAUNCHER_SOURCES
modplatform/atlauncher/ATLPackInstallTask.h
modplatform/atlauncher/ATLPackManifest.cpp
modplatform/atlauncher/ATLPackManifest.h
+ modplatform/atlauncher/ATLShareCode.cpp
+ modplatform/atlauncher/ATLShareCode.h
)
add_unit_test(Index
diff --git a/launcher/modplatform/atlauncher/ATLShareCode.cpp b/launcher/modplatform/atlauncher/ATLShareCode.cpp
new file mode 100644
index 00000000..59030c87
--- /dev/null
+++ b/launcher/modplatform/atlauncher/ATLShareCode.cpp
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "ATLShareCode.h"
+
+#include "Json.h"
+
+namespace ATLauncher {
+
+static void loadShareCodeMod(ShareCodeMod& m, QJsonObject& obj)
+{
+ m.selected = Json::requireBoolean(obj, "selected");
+ m.name = Json::requireString(obj, "name");
+}
+
+static void loadShareCode(ShareCode& c, QJsonObject& obj)
+{
+ c.pack = Json::requireString(obj, "pack");
+ c.version = Json::requireString(obj, "version");
+
+ auto mods = Json::requireObject(obj, "mods");
+ auto optional = Json::requireArray(mods, "optional");
+ for (const auto modRaw : optional) {
+ auto modObj = Json::requireObject(modRaw);
+ ShareCodeMod mod;
+ loadShareCodeMod(mod, modObj);
+ c.mods.append(mod);
+ }
+}
+
+void loadShareCodeResponse(ShareCodeResponse& r, QJsonObject& obj)
+{
+ r.error = Json::requireBoolean(obj, "error");
+ r.code = Json::requireInteger(obj, "code");
+
+ if (obj.contains("message") && !obj.value("message").isNull())
+ r.message = Json::requireString(obj, "message");
+
+ if (!r.error) {
+ auto dataRaw = Json::requireObject(obj, "data");
+ loadShareCode(r.data, dataRaw);
+ }
+}
+
+}
diff --git a/launcher/modplatform/atlauncher/ATLShareCode.h b/launcher/modplatform/atlauncher/ATLShareCode.h
new file mode 100644
index 00000000..88c30c98
--- /dev/null
+++ b/launcher/modplatform/atlauncher/ATLShareCode.h
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <QString>
+#include <QVector>
+#include <QJsonObject>
+
+namespace ATLauncher {
+
+struct ShareCodeMod {
+ bool selected;
+ QString name;
+};
+
+struct ShareCode {
+ QString pack;
+ QString version;
+ QVector<ShareCodeMod> mods;
+};
+
+struct ShareCodeResponse {
+ bool error;
+ int code;
+ QString message;
+ ShareCode data;
+};
+
+void loadShareCodeResponse(ShareCodeResponse& r, QJsonObject& obj);
+
+}
diff --git a/launcher/resources/multimc/multimc.qrc b/launcher/resources/multimc/multimc.qrc
index d31885b9..0fe673ff 100644
--- a/launcher/resources/multimc/multimc.qrc
+++ b/launcher/resources/multimc/multimc.qrc
@@ -313,5 +313,6 @@
<file>scalable/instances/fox.svg</file>
<file>scalable/instances/bee.svg</file>
+ <file>scalable/instances/polymc.svg</file>
</qresource>
</RCC>
diff --git a/launcher/resources/multimc/scalable/instances/polymc.svg b/launcher/resources/multimc/scalable/instances/polymc.svg
new file mode 100644
index 00000000..c192d503
--- /dev/null
+++ b/launcher/resources/multimc/scalable/instances/polymc.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
+ <stop stop-color="#88b858" offset="0"/>
+ <stop stop-color="#72b147" offset=".5"/>
+ <stop stop-color="#5a9a30" offset="1"/>
+ </linearGradient>
+ </defs>
+ <g>
+ <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
+ <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
+ <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
+ <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
+ <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
+ <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
+ <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+ </g>
+ <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+</svg>
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 7ac4d2d4..f34cf1ab 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -294,14 +294,14 @@ public:
actionViewInstanceFolder = TranslatedAction(MainWindow);
actionViewInstanceFolder->setObjectName(QStringLiteral("actionViewInstanceFolder"));
actionViewInstanceFolder->setIcon(APPLICATION->getThemedIcon("viewfolder"));
- actionViewInstanceFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "View Instance Folder"));
+ actionViewInstanceFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&View Instance Folder"));
actionViewInstanceFolder.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the instance folder in a file browser."));
all_actions.append(&actionViewInstanceFolder);
actionViewCentralModsFolder = TranslatedAction(MainWindow);
actionViewCentralModsFolder->setObjectName(QStringLiteral("actionViewCentralModsFolder"));
actionViewCentralModsFolder->setIcon(APPLICATION->getThemedIcon("centralmods"));
- actionViewCentralModsFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "View Central Mods Folder"));
+ actionViewCentralModsFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "View &Central Mods Folder"));
actionViewCentralModsFolder.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the central mods folder in a file browser."));
all_actions.append(&actionViewCentralModsFolder);
@@ -326,7 +326,7 @@ public:
actionSettings->setObjectName(QStringLiteral("actionSettings"));
actionSettings->setIcon(APPLICATION->getThemedIcon("settings"));
actionSettings->setMenuRole(QAction::PreferencesRole);
- actionSettings.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Settings..."));
+ actionSettings.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Setti&ngs..."));
actionSettings.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Change settings."));
actionSettings->setShortcut(QKeySequence::Preferences);
all_actions.append(&actionSettings);
@@ -542,7 +542,7 @@ public:
actionOpenWiki = TranslatedAction(MainWindow);
actionOpenWiki->setObjectName(QStringLiteral("actionOpenWiki"));
- actionOpenWiki.setTextId(QT_TRANSLATE_NOOP("MainWindow", "%1 He&lp"));
+ actionOpenWiki.setTextId(QT_TRANSLATE_NOOP("MainWindow", "%1 &Help"));
actionOpenWiki.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the %1 wiki"));
connect(actionOpenWiki, &QAction::triggered, MainWindow, &MainWindow::on_actionOpenWiki_triggered);
all_actions.append(&actionOpenWiki);
diff --git a/launcher/ui/pages/global/APIPage.ui b/launcher/ui/pages/global/APIPage.ui
index 7a9088d1..acde9aef 100644
--- a/launcher/ui/pages/global/APIPage.ui
+++ b/launcher/ui/pages/global/APIPage.ui
@@ -36,7 +36,7 @@
<item>
<widget class="QGroupBox" name="groupBox_paste">
<property name="title">
- <string>Pastebin URL</string>
+ <string>&amp;Pastebin URL</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
@@ -98,7 +98,7 @@
<item>
<widget class="QGroupBox" name="groupBox_msa">
<property name="title">
- <string>Microsoft Authentication</string>
+ <string>&amp;Microsoft Authentication</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
diff --git a/launcher/ui/pages/global/AccountListPage.ui b/launcher/ui/pages/global/AccountListPage.ui
index d21a92e2..469955b5 100644
--- a/launcher/ui/pages/global/AccountListPage.ui
+++ b/launcher/ui/pages/global/AccountListPage.ui
@@ -65,17 +65,17 @@
</widget>
<action name="actionAddMojang">
<property name="text">
- <string>Add Mojang</string>
+ <string>Add &amp;Mojang</string>
</property>
</action>
<action name="actionRemove">
<property name="text">
- <string>Remove</string>
+ <string>Remo&amp;ve</string>
</property>
</action>
<action name="actionSetDefault">
<property name="text">
- <string>Set Default</string>
+ <string>&amp;Set Default</string>
</property>
</action>
<action name="actionNoDefault">
@@ -83,17 +83,17 @@
<bool>true</bool>
</property>
<property name="text">
- <string>No Default</string>
+ <string>&amp;No Default</string>
</property>
</action>
<action name="actionUploadSkin">
<property name="text">
- <string>Upload Skin</string>
+ <string>&amp;Upload Skin</string>
</property>
</action>
<action name="actionDeleteSkin">
<property name="text">
- <string>Delete Skin</string>
+ <string>&amp;Delete Skin</string>
</property>
<property name="toolTip">
<string>Delete the currently active skin and go back to the default one</string>
@@ -101,17 +101,17 @@
</action>
<action name="actionAddMicrosoft">
<property name="text">
- <string>Add Microsoft</string>
+ <string>&amp;Add Microsoft</string>
</property>
</action>
<action name="actionAddOffline">
<property name="text">
- <string>Add Offline</string>
+ <string>Add &amp;Offline</string>
</property>
</action>
<action name="actionRefresh">
<property name="text">
- <string>Refresh</string>
+ <string>&amp;Refresh</string>
</property>
<property name="toolTip">
<string>Refresh the account tokens</string>
diff --git a/launcher/ui/pages/global/ExternalToolsPage.ui b/launcher/ui/pages/global/ExternalToolsPage.ui
index e79e9388..3643094d 100644
--- a/launcher/ui/pages/global/ExternalToolsPage.ui
+++ b/launcher/ui/pages/global/ExternalToolsPage.ui
@@ -36,7 +36,7 @@
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
- <string notr="true">JProfiler</string>
+ <string notr="true">J&amp;Profiler</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
@@ -73,7 +73,7 @@
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
- <string notr="true">JVisualVM</string>
+ <string notr="true">J&amp;VisualVM</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
@@ -110,7 +110,7 @@
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
- <string notr="true">MCEdit</string>
+ <string notr="true">&amp;MCEdit</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
@@ -156,7 +156,10 @@
<item row="0" column="0">
<widget class="QLabel" name="labelJsonEditor">
<property name="text">
- <string>Text Editor:</string>
+ <string>&amp;Text Editor:</string>
+ </property>
+ <property name="buddy">
+ <cstring>jsonEditorTextBox</cstring>
</property>
</widget>
</item>
diff --git a/launcher/ui/pages/global/JavaPage.cpp b/launcher/ui/pages/global/JavaPage.cpp
index f0616db1..b5e8de6c 100644
--- a/launcher/ui/pages/global/JavaPage.cpp
+++ b/launcher/ui/pages/global/JavaPage.cpp
@@ -97,6 +97,7 @@ void JavaPage::applySettings()
s->set("JavaPath", ui->javaPathTextBox->text());
s->set("JvmArgs", ui->jvmArgsTextBox->text());
s->set("IgnoreJavaCompatibility", ui->skipCompatibilityCheckbox->isChecked());
+ s->set("IgnoreJavaWizard", ui->skipJavaWizardCheckbox->isChecked());
JavaCommon::checkJVMArgs(s->get("JvmArgs").toString(), this->parentWidget());
}
void JavaPage::loadSettings()
@@ -121,6 +122,7 @@ void JavaPage::loadSettings()
ui->javaPathTextBox->setText(s->get("JavaPath").toString());
ui->jvmArgsTextBox->setText(s->get("JvmArgs").toString());
ui->skipCompatibilityCheckbox->setChecked(s->get("IgnoreJavaCompatibility").toBool());
+ ui->skipJavaWizardCheckbox->setChecked(s->get("IgnoreJavaWizard").toBool());
}
void JavaPage::on_javaDetectBtn_clicked()
diff --git a/launcher/ui/pages/global/JavaPage.ui b/launcher/ui/pages/global/JavaPage.ui
index d27b200f..3e4b12a1 100644
--- a/launcher/ui/pages/global/JavaPage.ui
+++ b/launcher/ui/pages/global/JavaPage.ui
@@ -70,14 +70,20 @@
<item row="0" column="0">
<widget class="QLabel" name="labelMinMem">
<property name="text">
- <string>Minimum memory allocation:</string>
+ <string>&amp;Minimum memory allocation:</string>
+ </property>
+ <property name="buddy">
+ <cstring>minMemSpinBox</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelMaxMem">
<property name="text">
- <string>Maximum memory allocation:</string>
+ <string>Ma&amp;ximum memory allocation:</string>
+ </property>
+ <property name="buddy">
+ <cstring>maxMemSpinBox</cstring>
</property>
</widget>
</item>
@@ -106,7 +112,10 @@
<item row="2" column="0">
<widget class="QLabel" name="labelPermGen">
<property name="text">
- <string notr="true">PermGen:</string>
+ <string notr="true">&amp;PermGen:</string>
+ </property>
+ <property name="buddy">
+ <cstring>permGenSpinBox</cstring>
</property>
</widget>
</item>
@@ -150,39 +159,13 @@
</sizepolicy>
</property>
<property name="text">
- <string>Java path:</string>
+ <string>&amp;Java path:</string>
+ </property>
+ <property name="buddy">
+ <cstring>javaPathTextBox</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLineEdit" name="javaPathTextBox"/>
- </item>
- <item>
- <widget class="QPushButton" name="javaBrowseBtn">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>28</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string notr="true">...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="1" colspan="2">
- <widget class="QLineEdit" name="jvmArgsTextBox"/>
- </item>
<item row="2" column="0">
<widget class="QLabel" name="labelJVMArgs">
<property name="sizePolicy">
@@ -192,25 +175,31 @@
</sizepolicy>
</property>
<property name="text">
- <string>JVM arguments:</string>
+ <string>J&amp;VM arguments:</string>
+ </property>
+ <property name="buddy">
+ <cstring>jvmArgsTextBox</cstring>
</property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QPushButton" name="javaDetectBtn">
+ <item row="4" column="1">
+ <widget class="QCheckBox" name="skipCompatibilityCheckbox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="toolTip">
+ <string>If enabled, the launcher will not check if an instance is compatible with the selected Java version.</string>
+ </property>
<property name="text">
- <string>Auto-detect...</string>
+ <string>&amp;Skip Java compatibility checks</string>
</property>
</widget>
</item>
- <item row="3" column="2">
- <widget class="QPushButton" name="javaTestBtn">
+ <item row="3" column="1">
+ <widget class="QPushButton" name="javaDetectBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -218,23 +207,59 @@
</sizepolicy>
</property>
<property name="text">
- <string>Test</string>
+ <string>&amp;Auto-detect...</string>
</property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="QCheckBox" name="skipCompatibilityCheckbox">
+ <item row="0" column="1" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLineEdit" name="javaPathTextBox"/>
+ </item>
+ <item>
+ <widget class="QPushButton" name="javaBrowseBtn">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>28</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string notr="true">...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="2">
+ <widget class="QPushButton" name="javaTestBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="text">
+ <string>&amp;Test</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2">
+ <widget class="QLineEdit" name="jvmArgsTextBox"/>
+ </item>
+ <item row="5" column="1">
+ <widget class="QCheckBox" name="skipJavaWizardCheckbox">
<property name="toolTip">
- <string>If enabled, the launcher will not check if an instance is compatible with the selected Java version.</string>
+ <string>If enabled, the launcher will not prompt you to choose a Java version if one isn't found.</string>
</property>
<property name="text">
- <string>Skip Java compatibility checks</string>
+ <string>Skip Java &amp;Wizard</string>
</property>
</widget>
</item>
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 097a2bfa..af2e2cd1 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -97,13 +97,6 @@ LauncherPage::LauncherPage(QWidget *parent) : QWidget(parent), ui(new Ui::Launch
}
connect(ui->fontSizeBox, SIGNAL(valueChanged(int)), SLOT(refreshFontPreview()));
connect(ui->consoleFont, SIGNAL(currentFontChanged(QFont)), SLOT(refreshFontPreview()));
-
- //move mac data button
- QFile file(QDir::current().absolutePath() + "/dontmovemacdata");
- if (!file.exists())
- {
- ui->migrateDataFolderMacBtn->setVisible(false);
- }
}
LauncherPage::~LauncherPage()
@@ -190,13 +183,6 @@ void LauncherPage::on_modsDirBrowseBtn_clicked()
ui->modsDirTextBox->setText(cooked_dir);
}
}
-void LauncherPage::on_migrateDataFolderMacBtn_clicked()
-{
- QFile file(QDir::current().absolutePath() + "/dontmovemacdata");
- file.remove();
- QProcess::startDetached(qApp->arguments()[0]);
- qApp->quit();
-}
void LauncherPage::refreshUpdateChannelList()
{
diff --git a/launcher/ui/pages/global/LauncherPage.h b/launcher/ui/pages/global/LauncherPage.h
index 63cfe9c3..bbf5d2fe 100644
--- a/launcher/ui/pages/global/LauncherPage.h
+++ b/launcher/ui/pages/global/LauncherPage.h
@@ -88,7 +88,6 @@ slots:
void on_instDirBrowseBtn_clicked();
void on_modsDirBrowseBtn_clicked();
void on_iconsDirBrowseBtn_clicked();
- void on_migrateDataFolderMacBtn_clicked();
/*!
* Updates the list of update channels in the combo box.
diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui
index 4cc2a113..ae7eb73f 100644
--- a/launcher/ui/pages/global/LauncherPage.ui
+++ b/launcher/ui/pages/global/LauncherPage.ui
@@ -158,13 +158,6 @@
</widget>
</item>
<item>
- <widget class="QPushButton" name="migrateDataFolderMacBtn">
- <property name="text">
- <string>Move the data to new location (will restart the launcher)</string>
- </property>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -196,7 +189,7 @@
<item>