Skip to content

Conversation

@Developer-Ecosystem-Engineering
Copy link
Contributor

Complete build including OBS Browser native support on Apple silicon

Download artifacts from here: https://github.com/obsproject/obs-deps/pull/60/checks?check_run_id=2869389632

Unzip them and put them in the obs-build-dependencies dir (which lives next to the obs-studio checkout will need creating if never built before i.e. mkdir ../obs-build-dependencies)

Rename so they're in expected format:

     macos-qt-5.15.2-arm64-2021-06-20.tar.xz
     macos-deps-arm64-2021-06-20.tar.xz

Then extract them so they're in /tmp/obsdeps:

mkdir -p /tmp/obsdeps
/usr/bin/tar -xf ../obs-build-dependencies/macos-deps-arm64-2021-06-20.tar.xz -C /tmp/obsdeps
/usr/bin/tar -xf ../obs-build-dependencies/macos-qt-5.15.2-arm64-2021-06-20.tar.xz -C /tmp/obsdeps
/usr/bin/xattr -r -d com.apple.quarantine /tmp/obsdeps

Copy cef_binary_90.6.7+g19ba721+chromium-90.0.4430.212_macosarm64_minimal.zip to obs-build-dependencies
Instructions here obsproject/obs-browser#310

Extract it and name extracted dir cef_binary_4430_macosarm64

cd ../obs-build-dependencies/cef_binary_4430_macosarm64
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++ -Wno-deprecated-declarations" -DCMAKE_EXE_LINKER_FLAGS="-std=c++11 -stdlib=libc++" -DPROJECT_ARCH=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 ..
/usr/bin/make -j8
mkdir libcef_dll
cd ../../../obs-studio
./CI/full-build-macos.sh -b

Iterative builds for local testing can then by done by doing:

rm -rf build/OBS.app && ./CI/full-build-macos.sh -b && codesign --deep -f -s - build/OBS.app

Description

Update build scripts to include CEF

Motivation and Context

The other part of obsproject/obs-browser#310 to bring in OBS Browser support natively on Apple silicon

How Has This Been Tested?

M1 iMac and M1 MBP
11.5.1
Setup a session recording video + playing WebGL in OBS Browser

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

- Update CEF to the custom OBS Browser version to support Apple silicon
@WizardCM WizardCM added the Bug Fix Non-breaking change which fixes an issue label Aug 3, 2021
@iambenmitchell
Copy link

Is there any update on this? -- I have been compiling OBS manually on M1 with the cmake method, but this no longer works

@jp9000
Copy link
Member

jp9000 commented Aug 17, 2021

Huh is this supposed to be breaking on CI multiplatform due to M1?

@RytoEX
Copy link
Member

RytoEX commented Aug 17, 2021

Huh is this supposed to be breaking on CI multiplatform due to M1?

Looks like the deps file it tried to download doesn't exist. I don't know that it ever existed. Perhaps it should be pointing to the new 2021-08-17 macOS deps file? @DDRBoxman ?

This patch was part of an older version and is no longer necessary
@Developer-Ecosystem-Engineering
Copy link
Contributor Author

Is there any update on this? -- I have been compiling OBS manually on M1 with the cmake method, but this no longer works

Could you elaborate on what you mean? With the dependencies now built in obs-debs (obsproject/obs-deps#60) it should be possible to build OBS Studio for Apple silicon.

With the changes in obsproject/obs-browser#310, you should be able to use OBS Browser on Apple silicon as well. For 310 you'll need to compile CEF yourself, since the built artifact is just a hosted by the project, it doesn't appear to be a part of "obs-deps" directly, so it doesn't get compiled as part of the build process from what we see.

Update to a newer deps version
@Developer-Ecosystem-Engineering
Copy link
Contributor Author

Might be worth closing this in favor of #5155 since 5155 is written against the now merged build changes too. Will confer with @PatTheMav

@PatTheMav
Copy link
Member

I'd keep it open for now because I haven't had access to a patched arm64 build of CEF yet to test if #5155 works with it.

@WizardCM
Copy link
Member

Closing in favour of #5155.

@WizardCM WizardCM closed this Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Non-breaking change which fixes an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants