obs-studio-node icon indicating copy to clipboard operation
obs-studio-node copied to clipboard

Cannot build with custom libobs (missing files in the OBS.app) in Mac

Open jamesguitar3 opened this issue 1 year ago • 5 comments

System: macOS 13.3.1 (arm64) obs-studio: v28.0.3

I followed the instructions in README to build using a custom libobs, and had set ENABLE_UI=false when built obs-studio as told in README. (The generated libobs package is much smaller with this ENABLE_UI=false setting)

So when building obs-studio-node by running the /ci/build-osn-osx.sh, I ran into the following error and of course the files are indeed missing tin the package.

Make Error at obs-studio-server/cmake_install.cmake:121 (file):
  file INSTALL cannot find
  "/Users/james/Projects/streamlab/obs-studio-node/build/libobs-src/OBS.app/Contents/MacOS":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:46 (include)

Any idea how to build this using the custom libobs? Thx

jamesguitar3 avatar May 11 '23 17:05 jamesguitar3

Readme file probably are outdated.

You will get better results when using same build scripts what CI machines use. https://github.com/stream-labs/obs-studio/blob/f254c4d0a11e8647cf9ba73b96f853d066a81102/.github/workflows/main-streamlabs.yml#LL74C6-L74C6

You will need to set variables and start this script ./slobs_CI/build-script-osx.sh

summeroff avatar May 11 '23 19:05 summeroff

Hi @summeroff thanks for commenting. I did build the libobs by running the ./slobs_CI/build-script-osx.sh script. However, I thought I had to add the DENABLE_UI=false in the script in order to use this custom libobs to build obs-studio-node. Here is what it says in the osn README:

Custom OBS Build
By default, we download a pre-built version of libobs if none is specified. However, this pre-built version may not be what you want to use or maybe you're testing a new obs feature.

You may specify a custom archive of your own. However, some changes need to be made to obs-studio's default configuration before building:

ENABLE_SCRIPTING must be set to false
ENABLE_UI must be set to false
QTDIR should not be specified as it is not used.

Any ideas?

jamesguitar3 avatar May 11 '23 19:05 jamesguitar3

Yes this part of a readme is outdated. it was not updated when macos support was added.

summeroff avatar May 11 '23 19:05 summeroff

list of env variables what get set before script launch.

InstallPath: packed_build
    BUILD_DIRECTORY: build
    RELEASE_BUCKET: obsstudios3.streamlabs.com
    PACKAGE_NAME: libobs
    OS_TAG: osx
    MACOSX_DEPLOYMENT_TARGET_X86_64: 10.15
    MACOSX_DEPLOYMENT_TARGET_ARM64: 11.0
    CEF_BUILD_VERSION_MAC: 5060
    DEPS_VERSION_MAC: 2022-08-02-b230301
    QT_DEPS_VERSION_MAC: 2022-08-02
    VLC_VERSION_MAC: 3.0.8
    QT_VERSION_MAC: 6.3.1
    SPARKLE_VERSION: 1.26.0
    WEBRTC_VERSION_MAC: m94-b230130
    LIBMEDIASOUPCLIENT_VERSION_MAC: 55d724f-b230130
    ReleaseName: release
    BuildConfig: 
    CefBuildConfig: 
    ARCH: arm64

summeroff avatar May 11 '23 19:05 summeroff

@summeroff Thanks for posting the env vars for the script. I basically built using very similar env values. I guess the DENABLE-UI=false is not required when building obs-studio for custom libobs used in osn then, or at least not required for mac?

jamesguitar3 avatar May 12 '23 22:05 jamesguitar3