diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 8408d2cf46..cc81396d84 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -599,7 +599,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo qCDebug(interfaceapp) << "Home sandbox does not appear to be running...."; if (wantsSandboxRunning) { QString contentPath = getRunServerPath(); - SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME); + bool noUpdater = SteamClient::isRunning(); + SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME, noUpdater); sandboxIsRunning = true; } determinedSandboxState = true; @@ -1119,9 +1120,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo setActiveEyeTracker(); #endif - auto applicationUpdater = DependencyManager::get(); - connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog); - applicationUpdater->checkForUpdate(); + // If launched from Steam, let it handle updates + if (!SteamClient::isRunning()) { + auto applicationUpdater = DependencyManager::get(); + connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog); + applicationUpdater->checkForUpdate(); + } // Now that menu is initialized we can sync myAvatar with it's state. myAvatar->updateMotionBehaviorFromMenu(); diff --git a/libraries/networking/src/SandboxUtils.cpp b/libraries/networking/src/SandboxUtils.cpp index 98c963b793..b16c169baa 100644 --- a/libraries/networking/src/SandboxUtils.cpp +++ b/libraries/networking/src/SandboxUtils.cpp @@ -61,15 +61,16 @@ void SandboxUtils::ifLocalSandboxRunningElse(std::function localSandboxR } -void SandboxUtils::runLocalSandbox(QString contentPath, bool autoShutdown, QString runningMarkerName) { +void SandboxUtils::runLocalSandbox(QString contentPath, bool autoShutdown, QString runningMarkerName, bool noUpdater) { QString applicationDirPath = QFileInfo(QCoreApplication::applicationFilePath()).path(); QString serverPath = applicationDirPath + "/server-console/server-console.exe"; qDebug() << "Application dir path is: " << applicationDirPath; qDebug() << "Server path is: " << serverPath; qDebug() << "autoShutdown: " << autoShutdown; + qDebug() << "noUpdater: " << noUpdater; bool hasContentPath = !contentPath.isEmpty(); - bool passArgs = autoShutdown || hasContentPath; + bool passArgs = autoShutdown || hasContentPath || noUpdater; QStringList args; @@ -87,6 +88,10 @@ void SandboxUtils::runLocalSandbox(QString contentPath, bool autoShutdown, QStri args << "--shutdownWatcher" << interfaceRunningStateFile; } + if (noUpdater) { + args << "--noUpdater"; + } + qDebug() << applicationDirPath; qDebug() << "Launching sandbox with:" << args; qDebug() << QProcess::startDetached(serverPath, args); diff --git a/libraries/networking/src/SandboxUtils.h b/libraries/networking/src/SandboxUtils.h index e40ff71a56..aaceafb9ef 100644 --- a/libraries/networking/src/SandboxUtils.h +++ b/libraries/networking/src/SandboxUtils.h @@ -26,7 +26,7 @@ public: void ifLocalSandboxRunningElse(std::function localSandboxRunningDoThis, std::function localSandboxNotRunningDoThat); - static void runLocalSandbox(QString contentPath, bool autoShutdown, QString runningMarkerName); + static void runLocalSandbox(QString contentPath, bool autoShutdown, QString runningMarkerName, bool noUpdater); }; #endif // hifi_SandboxUtils_h diff --git a/server-console/src/main.js b/server-console/src/main.js index a7855ab063..be5a5cc107 100644 --- a/server-console/src/main.js +++ b/server-console/src/main.js @@ -579,6 +579,10 @@ function backupResourceDirectoriesAndRestart() { } function checkNewContent() { + if (argv.noUpdater) { + return; + } + // Start downloading content set var req = request.head({ url: HOME_CONTENT_URL @@ -821,7 +825,7 @@ function onContentLoaded() { // Disable splash window for now. // maybeShowSplash(); - if (buildInfo.releaseType == 'PRODUCTION') { + if (buildInfo.releaseType == 'PRODUCTION' && !argv.noUpdater) { var currentVersion = null; try { currentVersion = parseInt(buildInfo.buildIdentifier);