ZaStoGram_desktop/Telegram/SourceFiles/platform/win/launcher_win.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

40 lines
833 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 "core/launcher.h"
namespace Platform {
class Launcher : public Core::Launcher {
public:
Launcher(int argc, char *argv[]);
int exec() override;
private:
std::optional<QStringList> readArgumentsHook(
int argc,
char *argv[]) const override;
void initHook() override;
bool launchUpdater(UpdaterLaunch action) override;
bool launch(
const QString &binaryPath,
const QStringList &argumentsList);
bool installProtectedUpdate();
bool relaunchAfterUpdate(bool installed);
bool _updating = false;
bool _updateFailed = false;
};
} // namespace Platform