updating: show the reason why the update couldn't be completed

- include nonstd::expected library for modern error-handling
- add localized strings
- refactor updating.cpp
This commit is contained in:
yuyoyuppe
2020-11-18 17:31:15 +03:00
committed by Andrey Nekrasov
parent 63ce7ca981
commit 289532d7c8
14 changed files with 158 additions and 85 deletions

View File

@@ -13,13 +13,12 @@ namespace updating
{
struct new_version_download_info
{
winrt::Windows::Foundation::Uri release_page_uri;
winrt::Windows::Foundation::Uri release_page_uri = nullptr;
std::wstring version_string;
winrt::Windows::Foundation::Uri installer_download_url;
winrt::Windows::Foundation::Uri installer_download_url = nullptr;
std::wstring installer_filename;
};
std::future<std::optional<new_version_download_info>> get_new_github_version_info_async();
std::future<void> try_autoupdate(const bool download_updates_automatically, const notifications::strings&);
std::filesystem::path get_pending_updates_path();