aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 64adc6e9..6ffec1ae 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -237,7 +237,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Commandline parsing
QCommandLineParser parser;
- parser.setApplicationDescription(BuildConfig.LAUNCHER_NAME);
+ parser.setApplicationDescription(BuildConfig.LAUNCHER_DISPLAYNAME);
parser.addOptions({
{{"d", "dir"}, "Use a custom path as application root (use '.' for current directory)", "directory"},
@@ -301,6 +301,12 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
dataPath = foo.absolutePath();
adjustedBy = "Persistent data path";
+ QDir polymcData(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), "PolyMC"));
+ if (polymcData.exists()) {
+ dataPath = polymcData.absolutePath();
+ adjustedBy = "PolyMC data path";
+ }
+
#ifdef Q_OS_LINUX
// TODO: this should be removed in a future version
// TODO: provide a migration path similar to macOS migration
@@ -482,7 +488,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Initialize application settings
{
- m_settings.reset(new INISettingsObject(BuildConfig.LAUNCHER_CONFIGFILE, this));
+ // Provide a fallback for migration from PolyMC
+ m_settings.reset(new INISettingsObject({ BuildConfig.LAUNCHER_CONFIGFILE, "polymc.cfg", "multimc.cfg" }, this));
// Updates
// Multiple channels are separated by spaces
m_settings->registerSetting("UpdateChannel", BuildConfig.VERSION_CHANNEL);
@@ -860,12 +867,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
qDebug() << "<> Application theme set.";
}
+ updateCapabilities();
+
if(createSetupWizard())
{
return;
}
- updateCapabilities();
performMainStartupAction();
}
@@ -1157,7 +1165,7 @@ void Application::setIconTheme(const QString& name)
QIcon Application::getThemedIcon(const QString& name)
{
if(name == "logo") {
- return QIcon(":/org.polymc.PolyMC.svg");
+ return QIcon(":/org.prismlauncher.PrismLauncher.svg"); // FIXME: Make this a BuildConfig variable
}
return QIcon::fromTheme(name);
}