New upstream version 23.2.1+dfsg1

This commit is contained in:
Simon Chopin 2019-07-27 14:47:10 +02:00
parent cdc9a9fc87
commit b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions

View file

@ -28,11 +28,12 @@ set(updater_SOURCES
http.cpp
hash.cpp
updater.rc
updater.manifest
)
add_definitions(-DNOMINMAX -DUNICODE -D_UNICODE)
if(MSVC)
add_compile_options("$<$<CONFIG:RelWithDebInfo>:/MT>")
add_compile_options($<IF:$<CONFIG:Debug>,/MTd,/MT>)
endif()
add_executable(updater WIN32

View file

@ -576,10 +576,18 @@ static inline bool FileExists(const wchar_t *path)
static bool NonCorePackageInstalled(const char *name)
{
if (strcmp(name, "obs-browser") == 0) {
return FileExists(L"obs-plugins\\32bit\\obs-browser.dll");
} else if (strcmp(name, "realsense") == 0) {
return FileExists(L"obs-plugins\\32bit\\win-ivcam.dll");
if (is32bit) {
if (strcmp(name, "obs-browser") == 0) {
return FileExists(L"obs-plugins\\32bit\\obs-browser.dll");
} else if (strcmp(name, "realsense") == 0) {
return FileExists(L"obs-plugins\\32bit\\win-ivcam.dll");
}
} else {
if (strcmp(name, "obs-browser") == 0) {
return FileExists(L"obs-plugins\\64bit\\obs-browser.dll");
} else if (strcmp(name, "realsense") == 0) {
return FileExists(L"obs-plugins\\64bit\\win-ivcam.dll");
}
}
return false;
@ -1133,6 +1141,12 @@ static bool Update(wchar_t *cmdLine)
SetDlgItemTextW(hwndMain, IDC_STATUS,
L"Searching for available updates...");
HWND hProgress = GetDlgItem(hwndMain, IDC_PROGRESS);
LONG_PTR style = GetWindowLongPtr(hProgress, GWL_STYLE);
SetWindowLongPtr(hProgress, GWL_STYLE, style | PBS_MARQUEE);
SendDlgItemMessage(hwndMain, IDC_PROGRESS, PBM_SETMARQUEE, 1, 0);
/* ------------------------------------- *
* Check if updating portable build */
@ -1237,16 +1251,20 @@ static bool Update(wchar_t *cmdLine)
for (size_t i = 0; i < packageCount; i++) {
if (!AddPackageUpdateFiles(packages, i, tempPath)) {
Status(L"Failed to process update packages");
Status(L"Update failed: Failed to process update packages");
return false;
}
}
SendDlgItemMessage(hwndMain, IDC_PROGRESS, PBM_SETMARQUEE, 0, 0);
SetWindowLongPtr(hProgress, GWL_STYLE, style);
/* ------------------------------------- *
* Exit if updates already installed */
if (!updates.size()) {
Status(L"All available updates are already installed.");
SetDlgItemText(hwndMain, IDC_BUTTON, L"Launch OBS");
return true;
}
@ -1452,8 +1470,10 @@ static DWORD WINAPI UpdateThread(void *arg)
if (WaitForSingleObject(cancelRequested, 0) == WAIT_OBJECT_0)
Status(L"Update aborted.");
SendDlgItemMessage(hwndMain, IDC_PROGRESS, PBM_SETSTATE,
PBST_ERROR, 0);
HWND hProgress = GetDlgItem(hwndMain, IDC_PROGRESS);
LONG_PTR style = GetWindowLongPtr(hProgress, GWL_STYLE);
SetWindowLongPtr(hProgress, GWL_STYLE, style & ~PBS_MARQUEE);
SendMessage(hProgress, PBM_SETSTATE, PBST_ERROR, 0);
SetDlgItemText(hwndMain, IDC_BUTTON, L"Exit");
EnableWindow(GetDlgItem(hwndMain, IDC_BUTTON), true);

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings xmlns="https://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">system</dpiAwareness>
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
</assembly>

View file

@ -21,7 +21,7 @@ std::string vstrprintf(const char *format, va_list args)
return std::string();
std::string str;
int size = (int)vsnprintf(nullptr, 0, format, args);
int size = (int)vsnprintf(nullptr, 0, format, args) + 1;
str.resize(size);
vsnprintf(&str[0], size, format, args);
return str;

View file

@ -242,7 +242,7 @@ try {
return true;
} catch (string text) {
blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str());
blog(LOG_DEBUG, "%s: %s", __FUNCTION__, text.c_str());
return false;
}
@ -586,7 +586,7 @@ try {
auto ActiveOrGameCaptureLocked = [this] ()
{
if (video_output_active(obs_get_video())) {
if (obs_video_active()) {
if (manualUpdate)
info(QTStr("Updater.Running.Title"),
QTStr("Updater.Running.Text"));