mirror of https://github.com/PCSX2/pcsx2.git
Qt: Look for a file named DefaultUpdaterChannel.h
Make manual releases create this file, and make it contain #define DEFAULT_UPDATER_CHANNEL "stable" So that the release defaults to the stable update channel.
This commit is contained in:
parent
ff34150b15
commit
e2ae28741d
|
@ -79,8 +79,13 @@ static constexpr u32 HTTP_POLL_INTERVAL = 10;
|
||||||
// Available release channels.
|
// Available release channels.
|
||||||
static const char* UPDATE_TAGS[] = {"stable", "nightly"};
|
static const char* UPDATE_TAGS[] = {"stable", "nightly"};
|
||||||
|
|
||||||
// Bit annoying, because PCSX2_isReleaseVersion is a bool, but whatever.
|
// TODO: Make manual releases create this file, and make it contain `#define DEFAULT_UPDATER_CHANNEL "stable"`.
|
||||||
#define THIS_RELEASE_TAG (PCSX2_isReleaseVersion ? "stable" : "nightly")
|
#if __has_include("DefaultUpdaterChannel.h")
|
||||||
|
#include "DefaultUpdaterChannel.h"
|
||||||
|
#endif
|
||||||
|
#ifndef DEFAULT_UPDATER_CHANNEL
|
||||||
|
#define DEFAULT_UPDATER_CHANNEL "nightly"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -135,7 +140,7 @@ QStringList AutoUpdaterDialog::getTagList()
|
||||||
std::string AutoUpdaterDialog::getDefaultTag()
|
std::string AutoUpdaterDialog::getDefaultTag()
|
||||||
{
|
{
|
||||||
#ifdef AUTO_UPDATER_SUPPORTED
|
#ifdef AUTO_UPDATER_SUPPORTED
|
||||||
return THIS_RELEASE_TAG;
|
return DEFAULT_UPDATER_CHANNEL;
|
||||||
#else
|
#else
|
||||||
return {};
|
return {};
|
||||||
#endif
|
#endif
|
||||||
|
@ -154,7 +159,7 @@ QString AutoUpdaterDialog::getCurrentVersionDate()
|
||||||
QString AutoUpdaterDialog::getCurrentUpdateTag() const
|
QString AutoUpdaterDialog::getCurrentUpdateTag() const
|
||||||
{
|
{
|
||||||
#ifdef AUTO_UPDATER_SUPPORTED
|
#ifdef AUTO_UPDATER_SUPPORTED
|
||||||
return QString::fromStdString(Host::GetBaseStringSettingValue("AutoUpdater", "UpdateTag", THIS_RELEASE_TAG));
|
return QString::fromStdString(Host::GetBaseStringSettingValue("AutoUpdater", "UpdateTag", DEFAULT_UPDATER_CHANNEL));
|
||||||
#else
|
#else
|
||||||
return QString();
|
return QString();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue