29#include <cpr/callback.h>
73 bool downloadUpdate(
VersionType versionType,
const std::filesystem::path& path,
const std::string& assetName,
bool exactMatch =
true,
const cpr::ProgressCallback& progress = {})
noexcept;
99 mutable std::mutex m_mutex;
100 std::string m_repoOwner;
101 std::string m_repoName;
102 int m_latestStableReleaseId;
103 int m_latestPreviewReleaseId;
Updater(std::string githubRepoUrl)
Constructs an Updater.
bool downloadUpdate(VersionType versionType, const std::filesystem::path &path, const std::string &assetName, bool exactMatch=true, const cpr::ProgressCallback &progress={}) noexcept
Downloads an update for the application.
Version fetchCurrentVersion(VersionType versionType) noexcept
Gets the latest version of the provided type from the GitHub repo.
bool windowsUpdate(VersionType versionType, const cpr::ProgressCallback &progress={}) noexcept
Downloads and installs an application update for Windows.
Updater & operator=(const Updater &u) noexcept
Copies an Updater.
Updater(Updater &&u) noexcept
Constructs an Updater via move.
Updater & operator=(Updater &&u) noexcept
Moves an Updater.
Updater(const Updater &u) noexcept
Constructs an Updater via copy.
A model for a version number.
Definition version.h:37
VersionType
Types of a version.
Definition versiontype.h:32