Autoupdate: implement updating bootstrapper utility (#5204)

This commit is contained in:
Andrey Nekrasov
2020-07-27 19:53:29 +03:00
committed by GitHub
parent 5a48376a77
commit 3796a5ef97
34 changed files with 1016 additions and 296 deletions

22
src/common/RcResource.h Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include <string_view>
#include <optional>
#include <span>
#include <filesystem>
class RcResource
{
public:
std::span<const std::byte> _memory;
static std::optional<RcResource> create(int resource_id, const std::wstring_view resource_class);
bool saveAsFile(const std::filesystem::path destination);
private:
RcResource() = delete;
RcResource(std::span<const std::byte> memory) :
_memory{ std::move(memory) }
{
}
};