Update Desktop to support the new mac virtual camera system extension #5446
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updates desktop to download the new 'virtual cam system extension', compile it using
cmake
, and package it within the final Streamlabs Desktop.app at theContents/Library/SystemExtensions
path so it can be codesigned and notarized on the release agent. Our SLOBS build agents do not have the certificate present there. This is why Desktop is downloading source code when a build is initiated viayarn package:mac
oryarn package:mac-arm64
. When Desktop is codesigned on the release agent, this new virtual camera system extension will be as well. This works around the restriction that XCode will not allow a System extension to be compiled unless it is codesigned.Added
macVirtualCamVersion
to package.json. This is thegit tag
that will be utilized to download the camera system extensionMotivation and Context
The former legacy DAL plugin was deprecated by Apple. Enabled the mac obs30 virtual camera to be used with Streamlabs Desktop. This way we are using the same implementation as obs.
Known Issue
Atm, users can only uninstall the legacy DAL plugin when they click the button. It is not possible to uninstall a mac system extension from an app unless Apple adds that capability (granted, its currently possible if user disables SIP but don't think it's worth persuing that). We are consistent with OBS in that regard. Users have to manually uninstall it. So clicking the uninstall button will attempt to uninstall the DAL plugin always.
How Has This Been Tested?
VIRTUALCAM_BYPASS_SYSTEM_CHECK
environment var (as described in my slobs pull request).invalid codesign
error because I enabled the system extension installation entitlement. This issue seems unique to attempting to codesign an app withelectron-builder
and unsure how to get around that atm. XCode doesnt have this issue so had to test installing the system extension there- then proceeded to test virtual cam from Desktop after it was already installed.Hoping we can make a codesigned build on the release VM and possibly test it before its uploaded to preview? I am unable to test installing the system extension from Desktop. Should work since it will invoke the exact same code path in mac-virtualcam but cant be 100% sure this will work. However, I believe the worse case scenario is users cant install virtual cam which is OK and doesnt break the preview (cause that already doesnt work).