2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow to disable the updater using a marco

Adding "DEFINES += TDESKTOP_DISABLE_AUTOUPDATE" to Telegram.pro would disable the updater. This eases creating packages for Linux distributions, where updates are handled by the corresponding package manager.
This commit is contained in:
Eduardo Sánchez Muñoz
2015-08-20 00:00:37 +02:00
parent 5a1079e367
commit 4e65b2724d
11 changed files with 85 additions and 3 deletions

View File

@@ -81,6 +81,7 @@ int main(int argc, char *argv[]) {
DEBUG_LOG(("Application Info: Telegram done, result: %1").arg(result));
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
if (cRestartingUpdate()) {
if (DevVersion) {
LOG(("Writing 'devversion' file before launching the Updater!"));
@@ -93,7 +94,9 @@ int main(int argc, char *argv[]) {
DEBUG_LOG(("Application Info: executing updater to install update.."));
psExecUpdater();
} else if (cRestarting()) {
} else
#endif
if (cRestarting()) {
DEBUG_LOG(("Application Info: executing Telegram, because of restart.."));
psExecTelegram();
}