Skip to content

Commit

Permalink
Replace 'Prism Launcher' with 'PollyMC' in updater
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-goode committed Nov 16, 2023
1 parent cdb2f09 commit 518962c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions launcher/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)

// check update locks
{
auto update_log_path = FS::PathCombine(m_dataPath, "logs", "prism_launcher_update.log");
auto update_log_path = FS::PathCombine(m_dataPath, "logs", "pollymc_update.log");

auto update_lock = QFileInfo(FS::PathCombine(m_dataPath, ".prism_launcher_update.lock"));
if (update_lock.exists()) {
Expand All @@ -910,7 +910,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
"\n"
"This likely means that a update attempt failed. Please ensure your installation is in working order before "
"proceeding.\n"
"Check the Prism Launcher updater log at: \n"
"Check the PollyMC updater log at: \n"
"%7\n"
"for details on the last update attempt.\n"
"\n"
Expand Down Expand Up @@ -947,7 +947,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
"\n"
"Please ensure your installation is in working order before "
"proceeding.\n"
"Check the Prism Launcher updater log at: \n"
"Check the PollyMC updater log at: \n"
"%1\n"
"for details on the last update attempt.")
.arg(update_log_path);
Expand Down Expand Up @@ -979,7 +979,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
auto infoMsg = tr("Update succeeded\n"
"\n"
"You are now running %1 .\n"
"Check the Prism Launcher updater log at: \n"
"Check the PollyMC updater log at: \n"
"%1\n"
"for details.")
.arg(BuildConfig.printableVersionString())
Expand Down
2 changes: 1 addition & 1 deletion launcher/updater/PrismExternalUpdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ PrismExternalUpdater::PrismExternalUpdater(QWidget* parent, const QString& appDi
priv = new PrismExternalUpdater::Private();
priv->appDir = QDir(appDir);
priv->dataDir = QDir(dataDir);
auto settings_file = priv->dataDir.absoluteFilePath("prismlauncher_update.cfg");
auto settings_file = priv->dataDir.absoluteFilePath("pollymc_update.cfg");
priv->settings = std::make_unique<QSettings>(settings_file, QSettings::Format::IniFormat);
priv->allowBeta = priv->settings->value("allow_beta", false).toBool();
priv->autoCheck = priv->settings->value("auto_check", false).toBool();
Expand Down
18 changes: 9 additions & 9 deletions launcher/updater/prismupdater/PrismUpdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ PrismUpdaterApp::PrismUpdaterApp(int& argc, char** argv) : QApplication(argc, ar

// Command line parsing
QCommandLineParser parser;
parser.setApplicationDescription(QObject::tr("An auto-updater for Prism Launcher"));
parser.setApplicationDescription(QObject::tr("An auto-updater for PollyMC"));

parser.addOptions(
{ { { "d", "dir" }, tr("Use a custom path as application root (use '.' for current directory)."), tr("directory") },
{ { "V", "prism-version" },
{ { "V", "pollymc-version" },
tr("Use this version as the installed launcher version. (provided because stdout can not be reliably captured on windows)"),
tr("installed launcher version") },
{ { "I", "install-version" }, "Install a specific version.", tr("version name") },
Expand Down Expand Up @@ -285,7 +285,7 @@ PrismUpdaterApp::PrismUpdaterApp(int& argc, char** argv) : QApplication(argc, ar
m_selectUI = parser.isSet("select-ui");
m_allowDowngrade = parser.isSet("allow-downgrade");

auto version = parser.value("prism-version");
auto version = parser.value("pollymc-version");
if (!version.isEmpty()) {
if (version.contains('-')) {
auto index = version.indexOf('-');
Expand Down Expand Up @@ -346,7 +346,7 @@ PrismUpdaterApp::PrismUpdaterApp(int& argc, char** argv) : QApplication(argc, ar
#endif
}

m_updateLogPath = FS::PathCombine(m_dataPath, "logs", "prism_launcher_update.log");
m_updateLogPath = FS::PathCombine(m_dataPath, "logs", "pollymc_update.log");

{ // setup logging
FS::ensureFolderPathExists(FS::PathCombine(m_dataPath, "logs"));
Expand Down Expand Up @@ -576,7 +576,7 @@ void PrismUpdaterApp::run()

if (m_isFlatpak) {
showFatalErrorMessage(tr("Updating flatpack not supported"), tr("Actions outside of checking if an update is available are not "
"supported when running the flatpak version of Prism Launcher."));
"supported when running the flatpak version of PollyMC."));
return;
}
if (m_isAppimage) {
Expand Down Expand Up @@ -1101,13 +1101,13 @@ void PrismUpdaterApp::backupAppDir()
if (file_list.isEmpty()) {
// best guess
if (BuildConfig.BUILD_ARTIFACT.toLower() == "linux") {
file_list.append({ "PrismLauncher", "bin", "share", "lib" });
file_list.append({ "PollyMC", "bin", "share", "lib" });
} else { // windows by process of elimination
file_list.append({
"jars",
"prismlauncher.exe",
"prismlauncher_filelink.exe",
"prismlauncher_updater.exe",
"pollymc.exe",
"pollymc_filelink.exe",
"pollymc_updater.exe",
"qtlogging.ini",
"imageformats",
"iconengines",
Expand Down

0 comments on commit 518962c

Please sign in to comment.