http://blog.csdn.net/longji/article/details/52335863
1 下载软件,构建环境。
obs官网: https://obsproject.com/
obs源代码来源: https://github.com/jp9000/obs-studio
https://github.com/jp9000/obs-studio.git
cmake官网: https://cmake.org/
https://cmake.org/files/v3.6/cmake-3.6.1-win64-x64.msi
Qt下载: http://www.qt.io/
需要下载很久,要修改界面,记得下载 QtCreator。
C:\Qt \5.7\ msvc2015
C:\Qt \5.7\ msvc2015_64
FFmpeg, x264 and cURL的开发依赖包:
https://obsproject.com/downloads/dependencies2015.zip
https://obsproject.com/downloads/dependencies2013.zip
cmake下载地址: https://cmake.org/download/
nsis下载地址: http://www.jrsoftware.org/isdl.php
inno setup下载地址: http://www.jrsoftware.org/isinfo.php
QT下载地址: https://www.qt.io/download/
vc2015下载地址: https://www.visualstudio.com/downloads/download-visual-studio-vs
安装windwos版本git。 https://git-for-windows.github.io/
https://github.com/git-for-windows/git/releases/download/v2.9.3.windows.1/Git-2.9.3-64-bit.exe
# 注意,这个过程,可能需要你设置一下git账号和邮箱,例如:
# git config --global user.name [username]
# git config --global user.email [email]
git checkout -b b0.15.4 0.15.4
git submodule foreach --recursive git fetch --tags
git submodule update --init --recursive
3.1 设置4个依赖库位置。
DepsPath 对应 D:/git/obs-studio/dependencies2015/win32/include
FFmpegPath 对应 D:/git/obs-studio/dependencies2015/win32/include/libavcodec
x264Path 对应 D:/git/obs-studio/dependencies2015/win32/include
curlPath 对应 D:/git/obs-studio/dependencies2015/win32/include/curl
3.2 第一次 Configure。选择Visual Studio 14 2015。这个表示 vs2015 win32版本。
3.3 3.2Finish后,出现下图。点击 OK 后。
3.4 设置 Qt5Widgets_Dir,C:\Qt\5.7\msvc2015\lib\cmake\Qt5Widgets。再次点击 Configure。
3.5 勾选COPY_DEPENDENCIES 后,再次点击 Configure。
3.6 点击 Generate ,生成vs2015工程文件。
3.7 使用vs2015打开D:\Git\obs-studio\build\x86\obs-studio.sln,编译。
obs工程右键 --> 属性 --> C/C++ --> 预处理器 --> 预处理定义 --> 删除HAVE_OBSCONFIG_H选项
3.8 编译
4 使用cmake 生成 vs2015 X64工程文件
4.1 设置4个依赖库位置。
DepsPath 对应 D:/git/obs-studio/dependencies2015/win64/include
FFmpegPath 对应 D:/git/obs-studio/dependencies2015/win64/include/libavcodec
x264Path 对应 D:/git/obs-studio/dependencies2015/win64/include
curlPath 对应 D:/git/obs-studio/dependencies2015/win64/include/curl
4.2 点击 configure,设置 Visual Studio 15 2015 Win64,也就是vs2015的win64版本。
4.3 设置Qt5Widgets_DIR,C:/Qt/5.7/msvc2015_64/lib/cmake/Qt5Widgets。
4.4勾选COPY_DEPENDENCIES 后,再次点击 Configure。
4.5 点击 Generate,生成 vs2015 x64工程文件。
4.6 obs工程右键 --> 属性 --> C/C++ --> 预处理器 --> 预处理定义 --> 删除HAVE_OBSCONFIG_H选项
4.6 使用vs2015编译win64位版本。
1 下载软件,构建环境。
obs官网: https://obsproject.com/
obs源代码来源: https://github.com/jp9000/obs-studio
https://github.com/jp9000/obs-studio.git
cmake官网: https://cmake.org/
https://cmake.org/files/v3.6/cmake-3.6.1-win64-x64.msi
Qt下载: http://www.qt.io/
需要下载很久,要修改界面,记得下载 QtCreator。
C:\Qt \5.7\ msvc2015
C:\Qt \5.7\ msvc2015_64
FFmpeg, x264 and cURL的开发依赖包:
https://obsproject.com/downloads/dependencies2015.zip
https://obsproject.com/downloads/dependencies2013.zip
cmake下载地址: https://cmake.org/download/
nsis下载地址: http://www.jrsoftware.org/isdl.php
inno setup下载地址: http://www.jrsoftware.org/isinfo.php
QT下载地址: https://www.qt.io/download/
vc2015下载地址: https://www.visualstudio.com/downloads/download-visual-studio-vs
安装windwos版本git。 https://git-for-windows.github.io/
https://github.com/git-for-windows/git/releases/download/v2.9.3.windows.1/Git-2.9.3-64-bit.exe
# 注意,这个过程,可能需要你设置一下git账号和邮箱,例如:
# git config --global user.name [username]
# git config --global user.email [email]
git checkout -b b0.15.4 0.15.4
git submodule foreach --recursive git fetch --tags
git submodule update --init --recursive
3.1 设置4个依赖库位置。
DepsPath 对应 D:/git/obs-studio/dependencies2015/win32/include
FFmpegPath 对应 D:/git/obs-studio/dependencies2015/win32/include/libavcodec
x264Path 对应 D:/git/obs-studio/dependencies2015/win32/include
curlPath 对应 D:/git/obs-studio/dependencies2015/win32/include/curl
3.2 第一次 Configure。选择Visual Studio 14 2015。这个表示 vs2015 win32版本。
3.3 3.2Finish后,出现下图。点击 OK 后。
3.4 设置 Qt5Widgets_Dir,C:\Qt\5.7\msvc2015\lib\cmake\Qt5Widgets。再次点击 Configure。
3.5 勾选COPY_DEPENDENCIES 后,再次点击 Configure。
3.6 点击 Generate ,生成vs2015工程文件。
3.7 使用vs2015打开D:\Git\obs-studio\build\x86\obs-studio.sln,编译。
obs工程右键 --> 属性 --> C/C++ --> 预处理器 --> 预处理定义 --> 删除HAVE_OBSCONFIG_H选项
3.8 编译
4 使用cmake 生成 vs2015 X64工程文件
4.1 设置4个依赖库位置。
DepsPath 对应 D:/git/obs-studio/dependencies2015/win64/include
FFmpegPath 对应 D:/git/obs-studio/dependencies2015/win64/include/libavcodec
x264Path 对应 D:/git/obs-studio/dependencies2015/win64/include
curlPath 对应 D:/git/obs-studio/dependencies2015/win64/include/curl
4.2 点击 configure,设置 Visual Studio 15 2015 Win64,也就是vs2015的win64版本。
4.3 设置Qt5Widgets_DIR,C:/Qt/5.7/msvc2015_64/lib/cmake/Qt5Widgets。
4.4勾选COPY_DEPENDENCIES 后,再次点击 Configure。
4.5 点击 Generate,生成 vs2015 x64工程文件。
4.6 obs工程右键 --> 属性 --> C/C++ --> 预处理器 --> 预处理定义 --> 删除HAVE_OBSCONFIG_H选项
4.6 使用vs2015编译win64位版本。