No updater command line argument

This commit is contained in:
Atlante45 2016-12-08 14:12:43 -08:00
parent e539840439
commit aa1d90108c

View file

@ -591,8 +591,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
qCDebug(interfaceapp) << "[VERSION] We will use DEVELOPMENT global services."; qCDebug(interfaceapp) << "[VERSION] We will use DEVELOPMENT global services.";
#endif #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 determinedSandboxState = false;
static bool sandboxIsRunning = false; static bool sandboxIsRunning = false;
SandboxUtils sandboxUtils; SandboxUtils sandboxUtils;
@ -602,11 +604,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
qCDebug(interfaceapp) << "Home sandbox appears to be running....."; qCDebug(interfaceapp) << "Home sandbox appears to be running.....";
determinedSandboxState = true; determinedSandboxState = true;
sandboxIsRunning = true; sandboxIsRunning = true;
}, [&, wantsSandboxRunning]() { }, [&]() {
qCDebug(interfaceapp) << "Home sandbox does not appear to be running...."; qCDebug(interfaceapp) << "Home sandbox does not appear to be running....";
if (wantsSandboxRunning) { if (wantsSandboxRunning) {
QString contentPath = getRunServerPath(); QString contentPath = getRunServerPath();
bool noUpdater = SteamClient::isRunning();
SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME, noUpdater); SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME, noUpdater);
sandboxIsRunning = true; sandboxIsRunning = true;
} }
@ -1128,7 +1129,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
#endif #endif
// If launched from Steam, let it handle updates // If launched from Steam, let it handle updates
if (!SteamClient::isRunning()) { if (!noUpdater) {
auto applicationUpdater = DependencyManager::get<AutoUpdater>(); auto applicationUpdater = DependencyManager::get<AutoUpdater>();
connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog); connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog);
applicationUpdater->checkForUpdate(); applicationUpdater->checkForUpdate();