web ui Update feature complete.

This commit is contained in:
Robin Davies
2024-08-25 18:36:50 -04:00
parent b989ac5c92
commit 6280d415ed
25 changed files with 517 additions and 123 deletions
+4
View File
@@ -86,6 +86,7 @@ namespace pipedal
std::chrono::system_clock::time_point LastUpdateTime() const;
void LastUpdateTime(const std::chrono::system_clock::time_point &timePoint);
void ResetCurrentVersion();
bool IsValid() const { return isValid_; }
const std::string &ErrorMessage() const { return errorMessage_; }
bool IsOnline() const { return isOnline_; }
@@ -116,7 +117,10 @@ namespace pipedal
UpdatePolicyT GetUpdatePolicy();
void SetUpdatePolicy(UpdatePolicyT updatePolicy);
void ForceUpdateCheck();
std::filesystem::path DownloadUpdate(const std::string &url);
private:
std::string GetUpdateFilename(const std::string &url);
UpdatePolicyT updatePolicy = UpdatePolicyT::ReleaseOrBeta;
using UpdateReleasePredicate = std::function<bool(const GithubRelease &githubRelease)>;