To specify a provisioning profile (needed in future versions of obs-studio with certain macOS features enabled), pass either the name or UUID of the provisioning profile to CMake via -DOBS_PROVISIONING_PROFILE. This needs to match the name of the developer certificate that is installed on the machine. An identity commonly takes a form of a string like Developer ID Application: (). When building (and packaging) on CI, a developer identity need to be provided instead via -DOBS_CODESIGN_IDENTITY. This will enable automatic codesigning in Xcode for all targets built by the project. The only way to fix this is to compile the application with a valid Apple developer certificate, as the code signature will not change between builds of the application and permissions will "stick".īecause obs-studio is made up of multiple independent parts, signing is most easily configured via CMake: Specify a developer team ID via -DOBS_CODESIGN_TEAM (you can find your team identifier in the Apple developer portal). For local execution an ad-hoc signature is sufficient, which Xcode will handle automatically ("Sign to Run Locally").īecause macOS stores application permissions (e.g., webcam access, microphone access, screen recording) based on code signatures, this has the side-effect of permissions not being applied to updated binaries (the underlying hashes will not match the entry in macOS' database). Starting with macOS 11, it is best practice to always codesign all binaries on macOS. OR run the CLI UI with a preset to change options directly: ccmake -preset macos-arm64.cmake -preset macos-arm64 -DENABLE-BROWSER:BOOL=OFF Either specify them directly as cache variables, e.g.Both options require the project to be configured with a correct developer certificate, team identifier and provisioning profile (see below)Ĭustom build options can be provided to CMake after specifying the CMake preset:."Upload" checks if the application is fully compliant and also uploads it to Apple's notarization service."Export" checks if the application is fully compliant with Apple's codesigning requirements (you will be prompted to specify a provisioning profile for specific targets if necessary).Selecting "Developer ID" allows one to "Export" or "Upload" the application.Select "Copy App" to just copy OBS to a desired location.Select "Distribute App" to start an export of the archive.Xcode will automatically open the "Organizer" window after successfully creating an archive.Select "Archive" from the "Product" menu item (Xcode will build the project in "Release" configuration, as is canonical on macOS).To generate optimised and fully codesigned application bundles, use the archive and export functions provided by Xcode: Choose this scheme from within Xcode (or specify via the command line) and build the project. HINT: You can install the tool xcbeautify to make the xcodebuild output more readable - the suggested way to run the build command changes slightly in that case: set -o pipefail & 2>&1 | xcbeautifyĬMake creates an install scheme that will automatically install OBS into the Applications directory. Run xcodebuild -configuration -scheme obs-studio -parallelizeTargets -destination "generic/platform=macOS,name=Any Mac".Change into the generated build directory ( build_arm64 or build_x86_64).Press + to build the project (or + to build and run it).Īlternatively the project can also be built on the command line:. Select the obs-studio scheme from the scheme browser at the top of the Xcode window.Open the Xcode project file in the generated build directory ( build_arm64 or build_x86_64).Select preset for desired build architecture ( macos-arm64 or macos-x86_64): cmake -preset macos-arm64 macOS 13.0 (for Xcode versions after and including 14.3)Ĭlone the repository including submodules:Ĭheck available CMake presets cmake -list-presets.macOS 12.0 (for Xcode versions up to and including 14.2).Build instructions for the legacy build system are retained in this document, albeit in a simplified form reflecting the suggested way macOS builds should be approached. NOTE: Since March 2023, obs-studio uses an updated build system on macOS that automated most steps required in old build systems.
0 Comments
Leave a Reply. |