History

No updater command line argument

Atlante45 committed 9 years ago

Commit aa1d9011 parent e5398401 file · +6 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+6−5
@@ -591,8 +591,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 590 unmodified lines
591591 qCDebug(interfaceapp) << "[VERSION] We will use DEVELOPMENT global services.";
592592 #endif
593593
594−
595− bool wantsSandboxRunning = shouldRunServer();
594+
595+ static const QString NO_UPDATER_ARG = "--no-updater";
596+ static const bool noUpdater = arguments().indexOf(NO_UPDATER_ARG) != -1;
597+ static const bool wantsSandboxRunning = shouldRunServer();
596598 static bool determinedSandboxState = false;
597599 static bool sandboxIsRunning = false;
598600 SandboxUtils sandboxUtils;
@@ -602,11 +604,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 3 unmodified lines
602604 qCDebug(interfaceapp) << "Home sandbox appears to be running.....";
603605 determinedSandboxState = true;
604606 sandboxIsRunning = true;
605− }, [&, wantsSandboxRunning]() {
607+ }, [&]() {
606608 qCDebug(interfaceapp) << "Home sandbox does not appear to be running....";
607609 if (wantsSandboxRunning) {
608610 QString contentPath = getRunServerPath();
609− bool noUpdater = SteamClient::isRunning();
610611 SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME, noUpdater);
611612 sandboxIsRunning = true;
612613 }
@@ -1128,7 +1129,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 515 unmodified lines
11281129 #endif
11291130
11301131 // If launched from Steam, let it handle updates
1131− if (!SteamClient::isRunning()) {
1132+ if (!noUpdater) {
11321133 auto applicationUpdater = DependencyManager::get<AutoUpdater>();
11331134 connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog);
11341135 applicationUpdater->checkForUpdate();