2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Add '-externalupdater' command-line argument.

Now no-autoupdater mode can be switched on in runtime.
Also TDESKTOP_DISABLE_AUTOUPDATE build is disabled in CI (trivial).

Fixes #4895.
This commit is contained in:
John Preston
2018-07-12 01:14:44 +03:00
parent e2bc6990c7
commit 52e7ddf079
29 changed files with 449 additions and 420 deletions

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/linux/launcher_linux.h"
#include "core/crash_reports.h"
#include "core/update_checker.h"
#include <sys/stat.h>
#include <sys/types.h>
@@ -83,6 +84,11 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
if (cTestMode()) {
argumentsList.push("-testmode");
}
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
if (Core::UpdaterDisabled()) {
argumentsList.push("-externalupdater");
}
#endif // !TDESKTOP_DISABLE_AUTOUPDATE
if (cDataFile() != qsl("data")) {
argumentsList.push("-key");
argumentsList.push(QFile::encodeName(cDataFile()));