diff --git a/launcher/Application.cpp b/launcher/Application.cpp index a04f85c28..e172472a1 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -831,7 +831,13 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv) #ifdef Q_OS_MAC m_updater.reset(new MacSparkleUpdater()); #else - m_updater.reset(new PrismExternalUpdater(m_rootPath, m_dataPath)); + auto exe_name = QStringLiteral("%1_updater").arg(BuildConfig.LAUNCHER_APP_BINARY_NAME); +#if defined Q_OS_WIN32 + exe_name.append(".exe"); +#endif + auto updater_binary = QFileInfo(QDir(m_rootPath).absoluteFilePath(exe_name)); + if (updater_binary.isFile()) + m_updater.reset(new PrismExternalUpdater(m_rootPath, m_dataPath)); #endif qDebug() << "<> Updater started."; } @@ -1058,7 +1064,7 @@ void Application::performMainStartupAction() { m_status = Application::Initialized; - auto update_log_path = FS::PathCombine(m_dataPath, "prism_launcher_update.log"); + auto update_log_path = FS::PathCombine(m_dataPath, "logs", "prism_launcher_update.log"); auto update_lock = QFileInfo(FS::PathCombine(m_dataPath, ".prism_launcher_update.lock")); if (update_lock.exists()) { diff --git a/launcher/ui/dialogs/UpdateAvailableDialog.h b/launcher/ui/dialogs/UpdateAvailableDialog.h index d37839fda..7a14c01da 100644 --- a/launcher/ui/dialogs/UpdateAvailableDialog.h +++ b/launcher/ui/dialogs/UpdateAvailableDialog.h @@ -42,7 +42,7 @@ class UpdateAvailableDialog : public QDialog { const QString& availableVersion, const QString& releaseNotes, QWidget* parent = 0); - ~UpdateAvailableDialog(); + ~UpdateAvailableDialog() = default; private: Ui::UpdateAvailableDialog* ui; diff --git a/launcher/updater/prismupdater/PrismUpdater.cpp b/launcher/updater/prismupdater/PrismUpdater.cpp index 658b1a57b..439457bae 100644 --- a/launcher/updater/prismupdater/PrismUpdater.cpp +++ b/launcher/updater/prismupdater/PrismUpdater.cpp @@ -343,10 +343,11 @@ PrismUpdaterApp::PrismUpdaterApp(int& argc, char** argv) : QApplication(argc, ar #endif } - m_updateLogPath = FS::PathCombine(m_dataPath, "prism_launcher_update.log"); + m_updateLogPath = FS::PathCombine(m_dataPath, "logs", "prism_launcher_update.log"); { // setup logging - static const QString logBase = BuildConfig.LAUNCHER_NAME + "Updater" + (m_checkOnly ? "-CheckOnly" : "") + "-%0.log"; + static const QString baseLogFile = BuildConfig.LAUNCHER_NAME + "Updater" + (m_checkOnly ? "-CheckOnly" : "") + "-%0.log"; + static const QString logBase = FS::PathCombine("logs", baseLogFile); auto moveFile = [](const QString& oldName, const QString& newName) { QFile::remove(newName); QFile::copy(oldName, newName);