Merge pull request #6463 from delroth/auto-update

Initial implementation of the Dolphin auto-updater for Windows
This commit is contained in:
Anthony 2018-03-20 11:28:26 -07:00 committed by GitHub
commit ad8c31699f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 7409 additions and 4 deletions

View file

@ -23,6 +23,7 @@
#include "Common/MsgHandler.h"
#include "Common/NandPaths.h"
#include "Common/StringUtil.h"
#include "Common/scmrev.h"
#include "Core/Analytics.h"
#include "Core/Boot/Boot.h"
@ -90,6 +91,7 @@ void SConfig::SaveSettings()
SaveNetworkSettings(ini);
SaveBluetoothPassthroughSettings(ini);
SaveUSBPassthroughSettings(ini);
SaveAutoUpdateSettings(ini);
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
@ -369,6 +371,14 @@ void SConfig::SaveUSBPassthroughSettings(IniFile& ini)
section->Set("Devices", devices_string);
}
void SConfig::SaveAutoUpdateSettings(IniFile& ini)
{
IniFile::Section* section = ini.GetOrCreateSection("AutoUpdate");
section->Set("TrackForTesting", m_auto_update_track);
section->Set("HashOverride", m_auto_update_hash_override);
}
void SConfig::LoadSettings()
{
Config::Load();
@ -390,6 +400,7 @@ void SConfig::LoadSettings()
LoadAnalyticsSettings(ini);
LoadBluetoothPassthroughSettings(ini);
LoadUSBPassthroughSettings(ini);
LoadAutoUpdateSettings(ini);
}
void SConfig::LoadGeneralSettings(IniFile& ini)
@ -669,6 +680,15 @@ void SConfig::LoadUSBPassthroughSettings(IniFile& ini)
}
}
void SConfig::LoadAutoUpdateSettings(IniFile& ini)
{
IniFile::Section* section = ini.GetOrCreateSection("AutoUpdate");
// TODO: Rename and default to SCM_UPDATE_TRACK_STR when ready for general consumption.
section->Get("TrackForTesting", &m_auto_update_track, "");
section->Get("HashOverride", &m_auto_update_hash_override, "");
}
void SConfig::ResetRunningGameMetadata()
{
SetRunningGameMetadata("00000000", 0, 0, Core::TitleDatabase::TitleType::Other);