mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:37:29 +02:00
Merge pull request #9029 from highfidelity/hotfix-steam-auto-updater
Disable Sandbox auto-update popup when the application is running from Steam
This commit is contained in:
commit
31ff26368d
4 changed files with 21 additions and 8 deletions
|
@ -599,7 +599,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
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();
|
||||||
SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME);
|
bool noUpdater = SteamClient::isRunning();
|
||||||
|
SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME, noUpdater);
|
||||||
sandboxIsRunning = true;
|
sandboxIsRunning = true;
|
||||||
}
|
}
|
||||||
determinedSandboxState = true;
|
determinedSandboxState = true;
|
||||||
|
@ -1119,9 +1120,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
setActiveEyeTracker();
|
setActiveEyeTracker();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto applicationUpdater = DependencyManager::get<AutoUpdater>();
|
// If launched from Steam, let it handle updates
|
||||||
connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog);
|
if (!SteamClient::isRunning()) {
|
||||||
applicationUpdater->checkForUpdate();
|
auto applicationUpdater = DependencyManager::get<AutoUpdater>();
|
||||||
|
connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog);
|
||||||
|
applicationUpdater->checkForUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
// Now that menu is initialized we can sync myAvatar with it's state.
|
// Now that menu is initialized we can sync myAvatar with it's state.
|
||||||
myAvatar->updateMotionBehaviorFromMenu();
|
myAvatar->updateMotionBehaviorFromMenu();
|
||||||
|
|
|
@ -61,15 +61,16 @@ void SandboxUtils::ifLocalSandboxRunningElse(std::function<void()> 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 applicationDirPath = QFileInfo(QCoreApplication::applicationFilePath()).path();
|
||||||
QString serverPath = applicationDirPath + "/server-console/server-console.exe";
|
QString serverPath = applicationDirPath + "/server-console/server-console.exe";
|
||||||
qDebug() << "Application dir path is: " << applicationDirPath;
|
qDebug() << "Application dir path is: " << applicationDirPath;
|
||||||
qDebug() << "Server path is: " << serverPath;
|
qDebug() << "Server path is: " << serverPath;
|
||||||
qDebug() << "autoShutdown: " << autoShutdown;
|
qDebug() << "autoShutdown: " << autoShutdown;
|
||||||
|
qDebug() << "noUpdater: " << noUpdater;
|
||||||
|
|
||||||
bool hasContentPath = !contentPath.isEmpty();
|
bool hasContentPath = !contentPath.isEmpty();
|
||||||
bool passArgs = autoShutdown || hasContentPath;
|
bool passArgs = autoShutdown || hasContentPath || noUpdater;
|
||||||
|
|
||||||
QStringList args;
|
QStringList args;
|
||||||
|
|
||||||
|
@ -87,6 +88,10 @@ void SandboxUtils::runLocalSandbox(QString contentPath, bool autoShutdown, QStri
|
||||||
args << "--shutdownWatcher" << interfaceRunningStateFile;
|
args << "--shutdownWatcher" << interfaceRunningStateFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (noUpdater) {
|
||||||
|
args << "--noUpdater";
|
||||||
|
}
|
||||||
|
|
||||||
qDebug() << applicationDirPath;
|
qDebug() << applicationDirPath;
|
||||||
qDebug() << "Launching sandbox with:" << args;
|
qDebug() << "Launching sandbox with:" << args;
|
||||||
qDebug() << QProcess::startDetached(serverPath, args);
|
qDebug() << QProcess::startDetached(serverPath, args);
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
void ifLocalSandboxRunningElse(std::function<void()> localSandboxRunningDoThis,
|
void ifLocalSandboxRunningElse(std::function<void()> localSandboxRunningDoThis,
|
||||||
std::function<void()> localSandboxNotRunningDoThat);
|
std::function<void()> 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
|
#endif // hifi_SandboxUtils_h
|
||||||
|
|
|
@ -579,6 +579,10 @@ function backupResourceDirectoriesAndRestart() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkNewContent() {
|
function checkNewContent() {
|
||||||
|
if (argv.noUpdater) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Start downloading content set
|
// Start downloading content set
|
||||||
var req = request.head({
|
var req = request.head({
|
||||||
url: HOME_CONTENT_URL
|
url: HOME_CONTENT_URL
|
||||||
|
@ -817,7 +821,7 @@ function onContentLoaded() {
|
||||||
// Disable splash window for now.
|
// Disable splash window for now.
|
||||||
// maybeShowSplash();
|
// maybeShowSplash();
|
||||||
|
|
||||||
if (buildInfo.releaseType == 'PRODUCTION') {
|
if (buildInfo.releaseType == 'PRODUCTION' && !argv.noUpdater) {
|
||||||
var currentVersion = null;
|
var currentVersion = null;
|
||||||
try {
|
try {
|
||||||
currentVersion = parseInt(buildInfo.buildIdentifier);
|
currentVersion = parseInt(buildInfo.buildIdentifier);
|
||||||
|
|
Loading…
Reference in a new issue