From aa1d90108cf5c04a87bf92fa3b0059f99c0a8b22 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 8 Dec 2016 14:12:43 -0800 Subject: [PATCH] No updater command line argument --- interface/src/Application.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c6150dcc53..4951e4d0ec 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -591,8 +591,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo qCDebug(interfaceapp) << "[VERSION] We will use DEVELOPMENT global services."; #endif - - bool wantsSandboxRunning = shouldRunServer(); + + static const QString NO_UPDATER_ARG = "--no-updater"; + static const bool noUpdater = arguments().indexOf(NO_UPDATER_ARG) != -1; + static const bool wantsSandboxRunning = shouldRunServer(); static bool determinedSandboxState = false; static bool sandboxIsRunning = false; SandboxUtils sandboxUtils; @@ -602,11 +604,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo qCDebug(interfaceapp) << "Home sandbox appears to be running....."; determinedSandboxState = true; sandboxIsRunning = true; - }, [&, wantsSandboxRunning]() { + }, [&]() { qCDebug(interfaceapp) << "Home sandbox does not appear to be running...."; if (wantsSandboxRunning) { QString contentPath = getRunServerPath(); - bool noUpdater = SteamClient::isRunning(); SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME, noUpdater); sandboxIsRunning = true; } @@ -1128,7 +1129,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo #endif // If launched from Steam, let it handle updates - if (!SteamClient::isRunning()) { + if (!noUpdater) { auto applicationUpdater = DependencyManager::get(); connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog); applicationUpdater->checkForUpdate();