updater: add test for update flow

currently windows-only
This commit is contained in:
Shawn Hoffman
2023-03-09 18:23:12 -08:00
parent de0bc06856
commit 0a8725e4a9
7 changed files with 295 additions and 20 deletions

View File

@ -3,6 +3,7 @@
#include "DolphinQt/Updater.h"
#include <cstdlib>
#include <utility>
#include <QCheckBox>
@ -41,6 +42,16 @@ void Updater::CheckForUpdate()
void Updater::OnUpdateAvailable(const NewVersionInformation& info)
{
if (std::getenv("DOLPHIN_UPDATE_SERVER_URL"))
{
TriggerUpdate(info, AutoUpdateChecker::RestartMode::RESTART_AFTER_UPDATE);
RunOnObject(m_parent, [this] {
m_parent->close();
return 0;
});
return;
}
bool later = false;
std::optional<int> choice = RunOnObject(m_parent, [&] {