WinUpdater: Check OS and VC++ Redist versions.

This commit is contained in:
Shawn Hoffman
2022-09-10 23:21:12 -07:00
parent 22197c09a3
commit 717c36bc43
13 changed files with 435 additions and 8 deletions

View File

@ -3,6 +3,7 @@
#include "MacUpdater/ViewController.h"
#include "UpdaterCommon/Platform.h"
#include "UpdaterCommon/UI.h"
#include <Cocoa/Cocoa.h>
@ -136,3 +137,21 @@ void UI::Stop()
void UI::Init()
{
}
Platform::BuildInfo::BuildInfo(const std::string& content)
{
map = {{"OSMinimumVersionMacOS", ""}};
Parse(content);
}
bool Platform::VersionCheck(const BuildInfo& this_build_info, const BuildInfo& next_build_info)
{
// TODO implement OS Minimum Version check
// It should go something like this:
// auto target_version = next_build_info.GetVersion("OSMinimumVersionMacOS");
// if (!target_version.has_value() || current_version >= target_version)
// return true;
// show error
// return false;
return true;
}