From 8e848e8841eb378a63a9e49fa638e6aab1c67a47 Mon Sep 17 00:00:00 2001 From: Daniel Stiner Date: Thu, 25 Mar 2021 18:14:39 -0700 Subject: [PATCH] Expire build on 2021-06-01 --- UI/obs-app.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 8e421a27a1c10a..be3153aeb15f31 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -1421,6 +1421,19 @@ bool OBSApp::OBSInit() ResetHotkeyState(state == Qt::ApplicationActive); }); ResetHotkeyState(applicationState() == Qt::ApplicationActive); + + struct tm expiration {}; + expiration.tm_year = 2021 - 1900; + expiration.tm_mon = 6 - 1; + expiration.tm_mday = 1; + double timeRemaining = difftime(mktime(&expiration), time(NULL)); + blog(LOG_WARNING, "Expirimental build, expires in: %d seconds", timeRemaining); + if (timeRemaining <= 0.0) { + OBSCrashReport expired(mainWindow, "This experimental OBS build has expired, please switch to an official OBS build."); + expired.exec(); + return false; + } + return true; } @@ -1428,6 +1441,8 @@ string OBSApp::GetVersionString() const { stringstream ver; + ver << "- EXPERIMENTAL Glimesh.tv build, expires 2021-06-01 - "; + #ifdef HAVE_OBSCONFIG_H ver << OBS_VERSION; #else