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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user