aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
Diffstat (limited to 'launcher')
-rw-r--r--launcher/CMakeLists.txt6
-rw-r--r--launcher/InstanceImportTask.cpp2
-rw-r--r--launcher/JavaCommon.cpp8
-rw-r--r--launcher/main.cpp4
-rw-r--r--launcher/minecraft/launch/DirectJavaLaunch.cpp2
-rw-r--r--launcher/minecraft/launch/LauncherPartLaunch.cpp2
-rw-r--r--launcher/minecraft/update/FoldersTask.cpp2
-rw-r--r--launcher/modplatform/legacy_ftb/PackInstallTask.cpp2
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackIndex.cpp4
-rw-r--r--launcher/modplatform/technic/TechnicPackProcessor.cpp2
-rw-r--r--launcher/ui/MainWindow.cpp12
-rw-r--r--launcher/ui/pages/BasePage.h42
-rw-r--r--launcher/ui/pages/global/APIPage.cpp6
-rw-r--r--launcher/ui/pages/global/APIPage.h2
-rw-r--r--launcher/ui/pages/global/APIPage.ui2
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp6
-rw-r--r--launcher/ui/pages/global/AccountListPage.h2
-rw-r--r--launcher/ui/pages/global/CustomCommandsPage.cpp41
-rw-r--r--launcher/ui/pages/global/CustomCommandsPage.h41
-rw-r--r--launcher/ui/pages/global/ExternalToolsPage.cpp45
-rw-r--r--launcher/ui/pages/global/ExternalToolsPage.h41
-rw-r--r--launcher/ui/pages/global/JavaPage.cpp45
-rw-r--r--launcher/ui/pages/global/JavaPage.h41
-rw-r--r--launcher/ui/pages/global/LanguagePage.cpp44
-rw-r--r--launcher/ui/pages/global/LanguagePage.h43
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp45
-rw-r--r--launcher/ui/pages/global/LauncherPage.h41
-rw-r--r--launcher/ui/pages/global/MinecraftPage.cpp45
-rw-r--r--launcher/ui/pages/global/MinecraftPage.h41
-rw-r--r--launcher/ui/pages/global/ProxyPage.cpp45
-rw-r--r--launcher/ui/pages/global/ProxyPage.h41
-rw-r--r--launcher/ui/pages/instance/GameOptionsPage.cpp40
-rw-r--r--launcher/ui/pages/instance/GameOptionsPage.h41
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.cpp42
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.h41
-rw-r--r--launcher/ui/pages/instance/LogPage.cpp40
-rw-r--r--launcher/ui/pages/instance/LogPage.h41
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp50
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.h41
-rw-r--r--launcher/ui/pages/instance/NotesPage.cpp40
-rw-r--r--launcher/ui/pages/instance/NotesPage.h41
-rw-r--r--launcher/ui/pages/instance/OtherLogsPage.cpp45
-rw-r--r--launcher/ui/pages/instance/OtherLogsPage.h42
-rw-r--r--launcher/ui/pages/instance/ResourcePackPage.h35
-rw-r--r--launcher/ui/pages/instance/ScreenshotsPage.cpp40
-rw-r--r--launcher/ui/pages/instance/ScreenshotsPage.h41
-rw-r--r--launcher/ui/pages/instance/ServersPage.cpp40
-rw-r--r--launcher/ui/pages/instance/ServersPage.h41
-rw-r--r--launcher/ui/pages/instance/ShaderPackPage.h35
-rw-r--r--launcher/ui/pages/instance/TexturePackPage.h35
-rw-r--r--launcher/ui/pages/instance/VersionPage.cpp47
-rw-r--r--launcher/ui/pages/instance/VersionPage.h41
-rw-r--r--launcher/ui/pages/instance/WorldListPage.cpp45
-rw-r--r--launcher/ui/pages/instance/WorldListPage.h41
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.cpp40
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.h41
-rw-r--r--launcher/ui/pages/modplatform/VanillaPage.cpp40
-rw-r--r--launcher/ui/pages/modplatform/VanillaPage.h42
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp46
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.h42
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.cpp44
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.h38
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.cpp40
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.h43
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.ui2
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.cpp46
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.h43
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/legacy_ftb/Page.cpp40
-rw-r--r--launcher/ui/pages/modplatform/legacy_ftb/Page.h43
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp45
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.h38
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/technic/TechnicPage.cpp45
-rw-r--r--launcher/ui/pages/modplatform/technic/TechnicPage.h43
-rw-r--r--launcher/ui/pages/modplatform/technic/TechnicPage.ui2
-rw-r--r--launcher/ui/setupwizard/JavaWizardPage.cpp2
-rw-r--r--launcher/ui/widgets/CustomCommands.cpp39
-rw-r--r--launcher/ui/widgets/CustomCommands.h41
-rw-r--r--launcher/ui/widgets/CustomCommands.ui2
-rw-r--r--launcher/ui/widgets/JavaSettingsWidget.cpp4
-rw-r--r--launcher/ui/widgets/PageContainer.cpp58
-rw-r--r--launcher/ui/widgets/PageContainer.h43
85 files changed, 2150 insertions, 460 deletions
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 751b354b..98cb0a3b 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -941,8 +941,8 @@ target_link_libraries(Launcher_logic
Launcher_iconfix
QuaZip::QuaZip
hoedown
- PolyMC_rainbow
LocalPeer
+ Launcher_rainbow
)
target_link_libraries(Launcher_logic)
@@ -984,7 +984,7 @@ if(INSTALL_BUNDLE STREQUAL "full")
DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
DESTINATION ${PLUGIN_DEST_DIR}
COMPONENT Runtime
- REGEX "tga|tiff|mng|webp" EXCLUDE
+ REGEX "tga|tiff|mng" EXCLUDE
)
# Icon engines
install(
@@ -1014,7 +1014,7 @@ if(INSTALL_BUNDLE STREQUAL "full")
DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
DESTINATION ${PLUGIN_DEST_DIR}
COMPONENT Runtime
- REGEX "tga|tiff|mng|webp" EXCLUDE
+ REGEX "tga|tiff|mng" EXCLUDE
REGEX "d\\." EXCLUDE
REGEX "_debug\\." EXCLUDE
REGEX "\\.dSYM" EXCLUDE
diff --git a/launcher/InstanceImportTask.cpp b/launcher/InstanceImportTask.cpp
index 6dd615c7..a825e8d4 100644
--- a/launcher/InstanceImportTask.cpp
+++ b/launcher/InstanceImportTask.cpp
@@ -283,7 +283,7 @@ void InstanceImportTask::processFlame()
}
else
{
- logWarning(tr("Could not map recommended forge version for Minecraft %1").arg(mcVersion));
+ logWarning(tr("Could not map recommended Forge version for Minecraft %1").arg(mcVersion));
}
}
components->setComponentVersion("net.minecraftforge", forgeVersion);
diff --git a/launcher/JavaCommon.cpp b/launcher/JavaCommon.cpp
index 6fa5851b..a6542fa7 100644
--- a/launcher/JavaCommon.cpp
+++ b/launcher/JavaCommon.cpp
@@ -8,7 +8,7 @@ bool JavaCommon::checkJVMArgs(QString jvmargs, QWidget *parent)
|| jvmargs.contains("-XX-MaxHeapSize") || jvmargs.contains("-XX:InitialHeapSize"))
{
auto warnStr = QObject::tr(
- "You tried to manually set a JVM memory option (using \"-XX:PermSize\", \"-XX-MaxHeapSize\", \"-XX:InitialHeapSize\", \"-Xmx\" or \"-Xms\").\n"
+ "You tried to manually set a JVM memory option (using \"-XX:PermSize\", \"-XX-MaxHeapSize\", \"-XX:InitialHeapSize\", \"-Xmx\" or \"-Xms\").\n"
"There are dedicated boxes for these in the settings (Java tab, in the Memory group at the top).\n"
"This message will be displayed until you remove them from the JVM arguments.");
CustomMessageBox::selectable(
@@ -40,7 +40,7 @@ void JavaCommon::javaArgsWereBad(QWidget *parent, JavaCheckResult result)
auto htmlError = result.errorLog;
QString text;
htmlError.replace('\n', "<br />");
- text += QObject::tr("The specified java binary didn't work with the arguments you provided:<br />");
+ text += QObject::tr("The specified Java binary didn't work with the arguments you provided:<br />");
text += QString("<font color=\"red\">%1</font>").arg(htmlError);
CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show();
}
@@ -49,8 +49,8 @@ void JavaCommon::javaBinaryWasBad(QWidget *parent, JavaCheckResult result)
{
QString text;
text += QObject::tr(
- "The specified java binary didn't work.<br />You should use the auto-detect feature, "
- "or set the path to the java executable.<br />");
+ "The specified Java binary didn't work.<br />You should use the auto-detect feature, "
+ "or set the path to the Java executable.<br />");
CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show();
}
diff --git a/launcher/main.cpp b/launcher/main.cpp
index 8b572743..275fff32 100644
--- a/launcher/main.cpp
+++ b/launcher/main.cpp
@@ -29,6 +29,10 @@ int main(int argc, char *argv[])
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
+ QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
+#endif
+
// initialize Qt
Application app(argc, argv);
diff --git a/launcher/minecraft/launch/DirectJavaLaunch.cpp b/launcher/minecraft/launch/DirectJavaLaunch.cpp
index 2bcff664..742170fa 100644
--- a/launcher/minecraft/launch/DirectJavaLaunch.cpp
+++ b/launcher/minecraft/launch/DirectJavaLaunch.cpp
@@ -88,7 +88,7 @@ void DirectJavaLaunch::on_state(LoggedProcess::State state)
case LoggedProcess::FailedToStart:
{
//: Error message displayed if instance can't start
- const char *reason = QT_TR_NOOP("Could not launch minecraft!");
+ const char *reason = QT_TR_NOOP("Could not launch Minecraft!");
emit logLine(reason, MessageLevel::Fatal);
emitFailed(tr(reason));
return;
diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp
index f461b847..d15d7e9d 100644
--- a/launcher/minecraft/launch/LauncherPartLaunch.cpp
+++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp
@@ -154,7 +154,7 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state)
case LoggedProcess::FailedToStart:
{
//: Error message displayed if instace can't start
- const char *reason = QT_TR_NOOP("Could not launch minecraft!");
+ const char *reason = QT_TR_NOOP("Could not launch Minecraft!");
emit logLine(reason, MessageLevel::Fatal);
emitFailed(tr(reason));
return;
diff --git a/launcher/minecraft/update/FoldersTask.cpp b/launcher/minecraft/update/FoldersTask.cpp
index e2b1bb48..22768bd9 100644
--- a/launcher/minecraft/update/FoldersTask.cpp
+++ b/launcher/minecraft/update/FoldersTask.cpp
@@ -14,7 +14,7 @@ void FoldersTask::executeTask()
QDir mcDir(m_inst->gameRoot());
if (!mcDir.exists() && !mcDir.mkpath("."))
{
- emitFailed(tr("Failed to create folder for minecraft binaries."));
+ emitFailed(tr("Failed to create folder for Minecraft binaries."));
return;
}
emitSucceeded();
diff --git a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
index f655a066..c63a9f1e 100644
--- a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
+++ b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
@@ -114,7 +114,7 @@ void PackInstallTask::install()
//ok, found minecraft dir, move contents to instance dir
if(!QDir().rename(m_stagingPath + "/unzip/minecraft", m_stagingPath + "/.minecraft"))
{
- emitFailed(tr("Failed to move unzipped minecraft!"));
+ emitFailed(tr("Failed to move unzipped Minecraft!"));
return;
}
}
diff --git a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp
index 9581ca04..992d6657 100644
--- a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp
@@ -55,7 +55,8 @@ void Modrinth::loadIndexedPackVersions(Modrinth::IndexedPack & pack, QJsonArray
// Find correct file (needed in cases where one version may have multiple files)
// Will default to the last one if there's no primary (though I think Modrinth requires that
// at least one file is primary, idk)
- while (i < files.count()){
+ // NOTE: files.count() is 1-indexed, so we need to subtract 1 to become 0-indexed
+ while (i < files.count() - 1){
auto parent = files[i].toObject();
auto fileName = Json::requireString(parent, "filename");
@@ -77,6 +78,7 @@ void Modrinth::loadIndexedPackVersions(Modrinth::IndexedPack & pack, QJsonArray
i++;
}
+
auto parent = files[i].toObject();
if(parent.contains("url")) {
file.downloadUrl = Json::requireString(parent, "url");
diff --git a/launcher/modplatform/technic/TechnicPackProcessor.cpp b/launcher/modplatform/technic/TechnicPackProcessor.cpp
index 156a295a..782fb9b2 100644
--- a/launcher/modplatform/technic/TechnicPackProcessor.cpp
+++ b/launcher/modplatform/technic/TechnicPackProcessor.cpp
@@ -88,7 +88,7 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const
else
{
if (minecraftVersion.isEmpty())
- emit failed(tr("Could not find \"version.json\" inside \"bin/modpack.jar\", but minecraft version is unknown"));
+ emit failed(tr("Could not find \"version.json\" inside \"bin/modpack.jar\", but Minecraft version is unknown"));
components->setComponentVersion("net.minecraft", minecraftVersion, true);
components->installJarMods({modpackJar});
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index ab4f11e8..47c469e9 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -347,7 +347,7 @@ public:
actionMATRIX = TranslatedAction(MainWindow);
actionMATRIX->setObjectName(QStringLiteral("actionMATRIX"));
actionMATRIX->setIcon(APPLICATION->getThemedIcon("matrix"));
- actionMATRIX.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Matrix"));
+ actionMATRIX.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Matrix space"));
actionMATRIX.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Matrix space"));
all_actions.append(&actionMATRIX);
helpMenu->addAction(actionMATRIX);
@@ -357,7 +357,7 @@ public:
actionDISCORD = TranslatedAction(MainWindow);
actionDISCORD->setObjectName(QStringLiteral("actionDISCORD"));
actionDISCORD->setIcon(APPLICATION->getThemedIcon("discord"));
- actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord"));
+ actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord guild"));
actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Discord guild."));
all_actions.append(&