UI: Add flag/file to disable built-in updater

When distributing OBS via third party platforms that have their own
update systems we want to be able to disable the OBS updater without
having to resort to having a separate build entirely.
This commit is contained in:
derrod committed 2020-07-18 21:33:47 +02:00
1 parent 1fed223195
commit 30862d75ae
3 files changed
+23 -1

No files matched your search

+5
View File
@@ -1894,6 +1894,9 @@ void OBSBasic::OBSInit()
ui->actionUploadLastCrashLog = nullptr;
ui->menuCrashLogs = nullptr;
ui->actionCheckForUpdates = nullptr;
#elif _WIN32 || __APPLE__
if (App()->IsUpdaterDisabled())
ui->actionCheckForUpdates->setEnabled(false);
#endif
OnFirstLoad();
@@ -3248,6 +3251,8 @@ void trigger_sparkle_update();
void OBSBasic::TimedCheckForUpdates()
{
if (App()->IsUpdaterDisabled())
return;
if (!config_get_bool(App()->GlobalConfig(), "General",
"EnableAutoUpdates"))
return;