New upstream version 25.0.3+dfsg1
This commit is contained in:
parent
04fe0efc67
commit
8b2e5f2130
569 changed files with 62491 additions and 5875 deletions
|
|
@ -20,8 +20,15 @@
|
|||
#include <winhttp.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
#include <browser-panel.hpp>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct QCef;
|
||||
extern QCef *cef;
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
#ifndef WIN_MANIFEST_URL
|
||||
|
|
@ -503,26 +510,6 @@ int AutoUpdateThread::queryUpdate(bool localManualUpdate, const char *text_utf8)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static bool IsFileInUse(const wstring &file)
|
||||
{
|
||||
WinHandle f = CreateFile(file.c_str(), GENERIC_WRITE, 0, nullptr,
|
||||
OPEN_EXISTING, 0, nullptr);
|
||||
if (!f.Valid()) {
|
||||
int err = GetLastError();
|
||||
if (err == ERROR_SHARING_VIOLATION ||
|
||||
err == ERROR_LOCK_VIOLATION)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool IsGameCaptureInUse()
|
||||
{
|
||||
wstring path = L"..\\..\\data\\obs-plugins\\win-capture\\graphics-hook";
|
||||
return IsFileInUse(path + L"32.dll") || IsFileInUse(path + L"64.dll");
|
||||
}
|
||||
|
||||
void AutoUpdateThread::run()
|
||||
try {
|
||||
long responseCode;
|
||||
|
|
@ -546,29 +533,6 @@ try {
|
|||
BPtr<char> manifestPath =
|
||||
GetConfigPathPtr("obs-studio\\updates\\manifest.json");
|
||||
|
||||
auto ActiveOrGameCaptureLocked = [this]() {
|
||||
if (obs_video_active()) {
|
||||
if (manualUpdate)
|
||||
info(QTStr("Updater.Running.Title"),
|
||||
QTStr("Updater.Running.Text"));
|
||||
return true;
|
||||
}
|
||||
if (IsGameCaptureInUse()) {
|
||||
if (manualUpdate)
|
||||
info(QTStr("Updater.GameCaptureActive.Title"),
|
||||
QTStr("Updater.GameCaptureActive.Text"));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/* ----------------------------------- *
|
||||
* warn if running or gc locked */
|
||||
|
||||
if (ActiveOrGameCaptureLocked())
|
||||
return;
|
||||
|
||||
/* ----------------------------------- *
|
||||
* create signature provider */
|
||||
|
||||
|
|
@ -665,12 +629,6 @@ try {
|
|||
if (!manualUpdate && updateVer == skipUpdateVer)
|
||||
return;
|
||||
|
||||
/* ----------------------------------- *
|
||||
* warn again if running or gc locked */
|
||||
|
||||
if (ActiveOrGameCaptureLocked())
|
||||
return;
|
||||
|
||||
/* ----------------------------------- *
|
||||
* fetch updater module */
|
||||
|
||||
|
|
@ -848,3 +806,13 @@ try {
|
|||
} catch (string &text) {
|
||||
blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str());
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
void WhatsNewBrowserInitThread::run()
|
||||
{
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
cef->wait_for_browser_init();
|
||||
#endif
|
||||
emit Result(url);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue