From f1feb2d24d4ed4fd6f34a3b0ec3c761f96517f37 Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Tue, 7 May 2024 00:22:54 -0400 Subject: [PATCH] Support migration from PollyMC, Prism Launcher --- launcher/Application.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 9840f6d70..7140f859c 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -487,6 +487,14 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv) { bool migrated = false; + if (!migrated) + migrated = handleDataMigration( + dataPath, FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), "../../PollyMC"), "PollyMC", + "pollymc.cfg"); + if (!migrated) + migrated = handleDataMigration( + dataPath, FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), "../../PrismLauncher"), + "PrismLauncher", "prismlauncher.cfg"); if (!migrated) migrated = handleDataMigration( dataPath, FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), "../../PolyMC"), "PolyMC", @@ -543,7 +551,12 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv) // Initialize application settings { // Provide a fallback for migration from PolyMC - m_settings.reset(new INISettingsObject({ BuildConfig.LAUNCHER_CONFIGFILE, "polymc.cfg", "multimc.cfg" }, this)); + m_settings.reset(new INISettingsObject({ BuildConfig.LAUNCHER_CONFIGFILE, + "pollymc.cfg" + "prismlauncher.cfg" + "polymc.cfg", + "multimc.cfg" }, + this)); // Theming m_settings->registerSetting("IconTheme", QString());