美文网首页
OBS-Studio MAC 环境配置编译成 Xcode 项目

OBS-Studio MAC 环境配置编译成 Xcode 项目

作者: 我来也super | 来源:发表于2021-08-06 16:42 被阅读0次

一、源码

Git clone 主工程    git clone --recursive https://github.com/obsproject/obs-studio.git

--recursive :同时clone 依赖的第三方库

如果失败 需要挨个clone 依赖工程,拖进所在的路径 obs-studio/plugins/

工程依赖的三方库:

1  obs-studio/plugins/enc-amf                        git@github.com:obsproject/obs-amd-encoder.git   
2  obs-studio/plugins/obs-browser                    git@github.com:obsproject/obs-browser.git
3  obs-studio/plugins/ obs-vst                       git@github.com:obsproject/obs-vst.git
4  obs-studio/plugins/win-dshow/libdshowcapture      git@github.com:obsproject/libdshowcapture.git
5  obs-studio/plugins/mac-syphon/syphon-framework    git@github.com:palana/Syphon-Framework.git 

二 、工程依赖的三方工具:

1.homebrew 安装

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

2.使用brew install安装

    FFmpeg
    X264
    freetype
    mbedtls
    swig
    Qt5

3.安装可视化Cmake :

https://cmake.org/download/

三、开始构建

image.png

1.此时configure 会报错,是因为obs-browser 需要再独立配置CEF,CEF是浏览器源,具体干嘛的没细查,所以把BUILD_BROWSER 取消勾选,不构建这个插件就可以,然后重新 Configure
2.所以依赖配置都成功,然后Generate


image.png

Generate成功后


[图片上传中...(截屏2021-08-06 下午3.51.46.png-96c2f9-1628236309587-0)] 截屏2021-08-06 下午3.52.38.png

四、配置Xcode 工程

image.png image.png image.png
  • ALL_BUILD从 Xcode 中可用的构建方案中选择,然后按CMD+B至少构建一次项目

  • 然后Edit Scheme...从同一菜单中选择。

  • 在Info选项卡下,单击 的下拉菜单Executable,然后单击other。

  • 导航到build/rundir/debug/bin之前的 Xcode 构建过程应该创建的bin 文件夹,然后选择在obs那里找到的二进制文件。

  • 接下来,切换到Options选项卡并选中复选框Use custom working directory并选择build/rundir/debug/binXcode 构建目录中的相同目录。

基本到此为止是可以Run起来了

相关文章

网友评论

      本文标题:OBS-Studio MAC 环境配置编译成 Xcode 项目

      本文链接:https://www.haomeiwen.com/subject/ehtivltx.html