ZaStoGram_desktop/Telegram/SourceFiles/platform/mac/update_install_mac.h
John Preston c3a319be9f Verify the kept update package before installing on Windows
A write-protected install elevates only the installed Telegram.exe in a
new -installupdate mode that verifies the package again and stages the
files under its own directory, and the Updater replaces files that are
still in use by renaming them aside.
2026-11-19 16:31:57 +04:00

32 lines
807 B
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include <QtCore/QByteArray>
#include <QtCore/QString>
#include <optional>
namespace Platform {
enum class UpdateInstallMode {
Writable,
Protected,
Refused,
};
[[nodiscard]] UpdateInstallMode GetUpdateInstallMode(
const QString &executablePath,
QString &error);
[[nodiscard]] QString ReadyUpdatePackagePath(const QString &workingDirectory);
[[nodiscard]] bool ReadyUpdatePackagePresent(const QString &workingDirectory);
[[nodiscard]] std::optional<QByteArray> ReadUpdatePackage(
const QString &path,
QString &error);
} // namespace Platform