Ashmanq
New Member
Hello!
I've spent the last few weeks looking at the OBS source code to try and build a plugin in C/C++ for macOS. This all started when I found a plugin I liked that wasn't built for Mac and so I tried building from source code to get it running on my MacBook.
This was exacerbated by the fact that I'm using an M1 MacBook which made building more tricky. I've so far been able to run the CMakeFile.txt in the root folder of OBS to run make and cmake to get the build files. I've done this for intel and arm architecture so far. I was following the instructions on the installation instructions page for Mac and under the macOS Instructions section under 'Building and Configuring' where it asks to run ./obs in the /rundir/RelWithDebInfo/bin folder but I get the following error:
Do any of you have any idea what I could have done wrong? I used the full-build-macos.sh script that I customised to point to the correct urls for obs-deps and qt-dep files (for some reason the name formating for these lines in the script is off) and I have altered the cmake command as follows:
Note: I am not running terminal using Rosetta so the code is being built for the arm64 architecture.
where I've disabled RTMPS, Build Browser and Python. When I run the command in terminal I am sitting in the bin folder. I have also tried double clicking on the obs executable file itself, in finder, and when it opens up a terminal window I get an error popup saying Failed to find locale/en-US.ini
I feel like I've made real progress over the last few weeks getting my head around C/C++ make and cmake files and trying to understand at a really high level how things are working, I seem to have hit a stumbling block at this point.
I've spent the last few weeks looking at the OBS source code to try and build a plugin in C/C++ for macOS. This all started when I found a plugin I liked that wasn't built for Mac and so I tried building from source code to get it running on my MacBook.
This was exacerbated by the fact that I'm using an M1 MacBook which made building more tricky. I've so far been able to run the CMakeFile.txt in the root folder of OBS to run make and cmake to get the build files. I've done this for intel and arm architecture so far. I was following the instructions on the installation instructions page for Mac and under the macOS Instructions section under 'Building and Configuring' where it asks to run ./obs in the /rundir/RelWithDebInfo/bin folder but I get the following error:
Bash:
dyld[15543]: Library not loaded: /usr/local/opt/jansson/lib/libjansson.4.dylib
Referenced from: /Users/username/Projects/OBS/Intel/obs-studio-intel/build/rundir/RelWithDebInfo/bin/libobs.0.dylib
Reason: tried: '/usr/local/opt/jansson/lib/libjansson.4.dylib' (no such file), '/usr/local/lib/libjansson.4.dylib' (no such file), '/usr/lib/libjansson.4.dylib' (no such file)
[1] 15543 abort ./bin/obs
Do any of you have any idea what I could have done wrong? I used the full-build-macos.sh script that I customised to point to the correct urls for obs-deps and qt-dep files (for some reason the name formating for these lines in the script is off) and I have altered the cmake command as follows:
Bash:
cmake -DENABLE_SPARKLE_UPDATER=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MIN_MACOS_VERSION:-${CI_MIN_MACOS_VERSION}} \
-DQTDIR="/tmp/obsdeps" \
-DSWIGDIR="/tmp/obsdeps" \
-DDepsPath="/tmp/obsdeps" \
-DVLCPath="${DEPS_BUILD_DIR}/vlc-${VLC_VERSION:-${CI_VLC_VERSION}}" \
-DBUILD_BROWSER=OFF \
-DBROWSER_LEGACY="$(test "${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}}" -le 3770 && echo "ON" || echo "OFF")" \
-DWITH_RTMPS=OFF \
-DCEF_ROOT_DIR="${DEPS_BUILD_DIR}/cef_binary_${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}}_macosx64" \
-DCMAKE_BUILD_TYPE="${BUILD_CONFIG}" \
-DDISABLE_PYTHON=ON \
..
Note: I am not running terminal using Rosetta so the code is being built for the arm64 architecture.
where I've disabled RTMPS, Build Browser and Python. When I run the command in terminal I am sitting in the bin folder. I have also tried double clicking on the obs executable file itself, in finder, and when it opens up a terminal window I get an error popup saying Failed to find locale/en-US.ini
I feel like I've made real progress over the last few weeks getting my head around C/C++ make and cmake files and trying to understand at a really high level how things are working, I seem to have hit a stumbling block at this point.