From 60fb2d7c1fbcf780b9a0238a27b1750b54a9b53d Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 7 Sep 2021 22:36:42 +0400 Subject: [PATCH] Move LZMA usage under TDESKTOP_DISABLE_AUTOUPDATE --- Telegram/SourceFiles/core/update_checker.cpp | 6 ++++++ cmake | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp index e86b2a884..e367086f4 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp @@ -39,11 +39,13 @@ extern "C" { #include } // extern "C" +#ifndef TDESKTOP_DISABLE_AUTOUPDATE #if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win #include #else // Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED #include #endif // else of Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED +#endif // !TDESKTOP_DISABLE_AUTOUPDATE #ifdef Q_OS_UNIX #include @@ -263,6 +265,7 @@ QString ExtractFilename(const QString &url) { } bool UnpackUpdate(const QString &filepath) { +#ifndef TDESKTOP_DISABLE_AUTOUPDATE QFile input(filepath); if (!input.open(QIODevice::ReadOnly)) { LOG(("Update Error: cant read updates file!")); @@ -516,6 +519,9 @@ bool UnpackUpdate(const QString &filepath) { input.remove(); return true; +#else // !TDESKTOP_DISABLE_AUTOUPDATE + return false; +#endif // TDESKTOP_DISABLE_AUTOUPDATE } template diff --git a/cmake b/cmake index 95ee188c7..98c52815e 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 95ee188c7b86b4448acbcfb01a42ac139cee6388 +Subproject commit 98c52815e90f049af4e97209a2283584bfecc913