Support migration from PollyMC, Prism Launcher

This commit is contained in:
Evan Goode 2024-05-07 00:22:54 -04:00
parent 084d462463
commit f1feb2d24d

View File

@ -487,6 +487,14 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
{ {
bool migrated = false; 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) if (!migrated)
migrated = handleDataMigration( migrated = handleDataMigration(
dataPath, FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), "../../PolyMC"), "PolyMC", 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 // Initialize application settings
{ {
// Provide a fallback for migration from PolyMC // 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 // Theming
m_settings->registerSetting("IconTheme", QString()); m_settings->registerSetting("IconTheme", QString());