Commit Graph

84 Commits (master)

Author SHA1 Message Date
Ryan Foster 7d853fb155 UI/updater: Only run updater on Windows 10+
OBS Studio 28 no longer supports Windows 7, 8, or 8.1, and Qt 6 will
fail to run on those versions. Users on those systems being offered the
update will end up in a state where OBS will not run if they install the
update. Let's prevent the updater executable from running on those
versions to avoid that scenario.
2022-09-02 18:03:17 -07:00
jp9000 7396c211be UI/updater: Fix files with similar hashes clashing
Do to multithreading the update process, files of the same hash can
sometimes collide due to race. Ensure the filenames are all unique by
appending an incremented value for each file.
2022-08-31 20:51:21 -07:00
jp9000 e87a97eb8c UI/updater: Fix silent failure on auto-update 2022-08-31 20:19:11 -07:00
Richard Stanway 31414d2d7a
UI/updater: Fix wrong parameter order for MessageBox 2022-09-01 00:44:57 +02:00
Richard Stanway 854d75919f
UI/updater: Use a unique temp path for patch files
Fixes a case where patches for the same destination file but different
source files would clobber each other and cause integrity check
failures.
2022-09-01 00:37:53 +02:00
Richard Stanway edca16d77d
UI: Add HTTP header if the update check is manually initiated
With the addition of server-side release rate control, having the server
know if the update check was manually initiated can allow it to deliver
the update to the user even if they would normally not be eligible.
Windows only.
2022-08-30 16:12:56 +02:00
derrod 9a5e094cb3 UI/updater: Delete files listed as removed in manifest 2022-08-30 00:22:22 -07:00
derrod 9c40e448b6 UI: Add File Integrity Check 2022-07-27 00:34:04 +10:00
PatTheMav 1f0f2be15e
UI: Update CMakeLists.txt for main OBS app 2022-03-16 23:11:58 +01:00
Richard Stanway 10446c1a0b UI/updater: Explicitly set PSAPI_VERSION=2
If the user didn't set their minimum SDK level this would default to
PSAPI_VERSION=1 which requires psapi.lib (removed in 4614c057).
2021-12-09 02:51:08 +01:00
jpark37 4614c0574e UI/updater: Remove dependency on psapi.lib 2021-09-12 14:10:36 -07:00
Yuriy Chumak 37b9ece904 UI: Add request type param to GetRemoteText 2021-07-24 15:50:59 -07:00
Richard Stanway 2678d351f5 UI/updater: Increase number of download workers
Request / response latency dominates the download time of small
files and patches, especially the locale files. Increasing this to
4 doesn't consume many more resources and basically doubles the
download speed, especially on higher latency connections.
2020-12-21 18:32:39 +01:00
Richard Stanway f0ed8c337e UI/updater: Enable HTTP2 and TLS 1.3
Unfortunately WinHTTP doesn't support multiplexing with HTTP2, but there
is still some minor benefit to enabling it. Windows 10 21H1 will enable
TLS 1.3 client support in Schannel, so let's get ready for it.
2020-12-21 18:32:39 +01:00
Richard Stanway 9201390a46 UI/updater: Move in-use files away before writing
On a modern Windows OS, you can rename an in-use file despite not being
able to write to it. With the introduction of the virtual camera, it is
now quite common that users will have in-use files when updating. This
commit renames in-use files, allowing the new version to be installed.
Upon a reboot, the previously in-use file will be deleted.
2020-12-15 21:11:47 +01:00
Richard Stanway c0d7602b64 UI/updater: Always clean up temporary files
If an update failed to install, it would leave a single temporary file
behind for that particular patch / file.
2020-12-15 21:11:35 +01:00
jp9000 580eecda01 UI: Fix installer/updater check for vs2019 32bit
VS2019 32bit redist does not have/use vcruntime140_1.dll, so remove
those checks from the installer and auto-updater.
2020-12-13 21:59:21 -08:00
jp9000 13ee86ab7f UI/updater: Fix dll check 2020-12-09 22:25:49 -08:00
jp9000 a01d3e77b1 UI: Remove jansson requirement from UI and updater
Use json11 instead.
2020-12-09 22:23:03 -08:00
jp9000 9cc5aa5629 UI/updater: Update redist checks to VS2019 2020-12-09 22:23:03 -08:00
jp9000 4a9bb86916 UI/updater: Fix cmd prompts popping up registering vcam
Fixes an issue where command prompts would pop up when registering the
virtual camera in the auto-updater
2020-09-29 04:36:32 -07:00
jp9000 3c54ea3eeb UI/updater: Fix race condition
Fixes a race condition where a hash value could be overwritten from
different threads, causing corruption
2020-09-29 04:35:43 -07:00
Richard Stanway e1b0d1d984 UI: Use correct constant for CryptDecodeObjectEx 2020-09-04 22:10:06 +02:00
jp9000 a72a52fa38 UI: Add virtual camera to UI
Adds a virtual camera button to the main user interface.  If virtual
camera is not installed, it will not add the button.  On Windows, it
detects whether the virtual camera filters are properly registered, and
will only add the button if the virtual camera filter is confirmed
registered.

Also adds a virtual camera option to the auto-configuration wizard,
which will just simply set the user's resolution/scale to 1920x1080 at
30 FPS.
2020-07-07 06:09:59 -07:00
Richard Stanway f03fe34009 UI/updater: Use 1 MB static memory for hashing
Allocating a vector for the hundreds of small files and only reading
64k at a time was a bottleneck on systems that were not I/O bound.
2020-06-19 16:20:32 +02:00
Richard Stanway 3c91fac18e UI/updater: Fix running updater as different user
If the elevated user was a different user account, the updater would
look in the wrong user's appdata for the manifest and fail.
2020-06-19 16:20:32 +02:00
Richard Stanway f26941b566 UI/updater: Exit with error if elevation failed
In rare cases, "runas" would somehow launch the updater as a non-admin user
again, resulting in a loop where the updater constantly spawns processes.
Fixes https://github.com/obsproject/obs-studio/issues/2984
2020-06-19 16:20:32 +02:00
Kurt Kartaltepe d928bfd1ea cmake: Fix warnings and normalize variables/errors
As of 3.17 using find_package_handle_standard_args checks that the name
of the FindXXX file and the first argument are the same case.

Some modules used non-standard variables or the old singular variables
instead of plurals. This normalizes variable usage to the new-style.

Some CMakeLists.txt did custom error checking instead of propagating
find_package errors. These were changes to call find_package with
REQUIRED or without QUIET where needed and shortens the custom status
messages. This helps users who want to enable that functionality see
what precisely wasnt found.
2020-05-21 18:45:16 -07:00
jp9000 8d6f29ffc7 Revert "Merge pull request #2637 from kkartaltepe/cmake-variety-fixes"
This reverts commit d777000a60, reversing
changes made to c9e5f30a78.
2020-05-21 00:03:09 -07:00
Jim d777000a60
Merge pull request #2637 from kkartaltepe/cmake-variety-fixes
cmake: Fix warnings and normalize variables/errors
2020-05-20 23:45:25 -07:00
jp9000 7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
Richard Stanway 078ea5222d UI/updater: Fix launching OBS as admin post-update
A long standing lack of synchronization on the elevated process handle
made the non-elevated process always exit, so the updater would assume
it was started elevated and launch OBS from the elevated context.

Also applies the altered working directory to the non-elevated code
path so it can find the OBS executable properly.
2020-05-05 03:18:45 +02:00
Kurt Kartaltepe c5b731e48f cmake: Fix warnings and normalize variables/errors
As of 3.17 using find_package_handle_standard_args checks that the name
of the FindXXX file and the first argument are the same case.

Some modules used non-standard variables or the old singular variables
instead of plurals. This normalizes variable usage to the new-style.

Some CMakeLists.txt did custom error checking instead of propagating
find_package errors. These were changes to call find_package with
REQUIRED or without QUIET where needed and shortens the custom status
messages. This helps users who want to enable that functionality see
what precisely wasnt found.
2020-04-03 21:32:10 -07:00
jp9000 0fb34ed965 UI: Fix closing OBS before showing whats new dialog
The program can get stuck waiting for the browser within a event queue,
so instead mark that the program is closing, do it in a separate thread,
signal the window when it's finished, and then check whether it's in the
process of closing before actually showing the dialog.
2020-03-16 08:59:46 -07:00
jp9000 141c42c4b5 win-capture: Allow write permission on graphics hook
(This commit also modified the updater module on Windows)

Ensures that an older hook version can be replaced by a newer hook
version.
2020-03-08 15:56:23 -07:00
jp9000 abf3ed2b05 win-capture: Remove SYNCHRONIZE permission
This isn't really meant for file permissions.  This is meant for handle
permissions.
2020-03-08 15:56:23 -07:00
jp9000 e7b0a45126 UI/updater: Add perms for ALL APPLICATION PACKAGES
Adds hook dir perms for ALL APPLICATION PACKAGES, which enables capture
on microsoft store games
2020-03-07 03:37:19 -08:00
Matthieu Cunzi 74acbd7ed0 win-capture: Add Vulkan capture
Co-authored-by: jp9000 <obs.jim@gmail.com>
Co-authored-by: jpark37 <jpark37@users.noreply.github.com>
2020-02-29 04:53:28 -08:00
Richard Stanway 4b9f3cb369 UI: Always prompt when updates are available
The current updater code won't prompt the user if an output is active or
if game capture is in use. These are both fairly common situations to be
in as soon as OBS starts up - for example, the NDI and VirtualCam
plugins both start outputs automatically, and a game capture source will
hook if the game is open.

It should be fairly obvious to a user that OBS will be closed when an
update is installed. Given the low frequency of game capture updates,
the risk of an update encountering in-use files is also very low, and
the standalone updater UI already shows a prompt should this happen.
2020-02-03 22:42:00 +01:00
craftwar 6ffc4f590a UI/updater: Fix variable type to format specifier 2019-09-02 21:14:21 +08:00
Michael Fabian 'Xaymar' Dirks 3b0238fc11 UI: Catch by reference 2019-07-24 18:26:44 +02:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Richard Stanway 5a8cad0876 UI/updater: Update some text for clarity 2019-05-31 15:47:47 +02:00
Richard Stanway 02a5d3e5db UI/updater: Add marquee progress bar for existing file check
This can take a while on a hard drive since it hashes the entire OBS
installation, show a undetermined progress marquee to avoid users
thinking that the updater has frozen.
2019-05-31 15:46:06 +02:00
Richard Stanway 5048fe2026 UI/updater: Add manifest file for DPI awareness 2019-05-31 15:39:51 +02:00
Richard Stanway 69ffce3479 UI: Allocate space for null terminator 2019-02-19 21:57:22 +01:00
jp9000 82848d513e libobs: Add obs_video_active() function
(This commit also modifies UI)

Adds a universal function for determining whether video output is
currently active, rather than having to use video_output_active() on the
value returned by obs_get_video().
2019-02-07 17:00:46 -08:00
jp9000 8f106dc3c1 libobs, UI: Do not log redundant warnings
Reduces log file clutter by not logging certain warning messages that
were already safe/normal/expected failures.
2019-01-12 16:50:55 -08:00
jp9000 b3ef46d986 cmake: Make static VC runtime libraries consistent
Makes Visual C runtime libraries consistent across
Debug/MinSizeRel/Release/RelWithDebInfo, rather than just changing those
flags for RelWithDebInfo.  Also adds /Zl for statically linked
libraries.

Closes obsproject/obs-studio#1421
2018-09-12 07:49:13 -07:00
jp9000 11b84a5d85 UI/updater: Fix update bug for 32bit/64bit installs
It would only check whether it should download a package if the 32bit
version existed.  This would cause it to not download all files
correctly to update 64bit installs (post 22.0.1).
2018-08-31 03:05:15 -07:00