obs-studio secondary development [vs2017 environment construction]

obs-studio secondary development [vs2017 environment setup]-programmer sought (pianshen.com)

obs-studio secondary development [vs2017 environment construction]

 

Installation and configuration vs2017 installation vs2017

Add c++ desktop development components
Insert picture description here

Download project components

1. Project pre-built dependencies [FFmpeg, x264, cURL, and mbedTLS]
https://obsproject.com/downloads/dependencies2017.zip

2.Qt5
https://cdn-fastly.obsproject.com/downloads/Qt_5.10.1.7z

3.cmake
https://cmake.org/download/
download the corresponding version
Insert picture description here

4. Download and install DXSDK_Jun10
https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812

5. Downloading and installing Windows 10 SDK
obs requires win10 sdk version greater than 10.0.18362.0
https://www.filehorse.com/download-microsoft-windows-sdk/screenshots/

6. Pull obs source code
git clone --recursive https://github.com/obsproject/obs-studio.git

Configuration project components take win32 version as an example

1. After qt5 decompression, there are two versions of 32-bit and 64-bit.
Insert picture description here
Configure the bin directory of the 32-bit version to the environment variable path

2. Unzip cmake, dependencies2017.zip

Generate obs sln project

Open bin \ cmake-gui.exe
Insert picture description here

1. Set the obs source code path

2. Create a new build project directory in the project for generating obs sln projects

Insert picture description here
Choose to set the obs sln project directory

3. Configure cmake build variables

Click Add Entry to
add the value of BUILD_TESTS to true for building tests
Insert picture description here

Add the QTDIR item value to the directory of the qt5 32 item
Insert picture description here
Insert picture description here

Add the DepsPath item value to the directory where the dependency is located
Insert picture description here
Insert picture description here

4.Configure

Generator chooses Visual Studio 15 2017 platform as 32-bit

Option selection:
[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-ATZgyOO7-1590036951795)(/uploads/blog/202005/attach_1610ea850644f804.png)]
start to test configure and generate results
Insert picture description here

Start the formal configure to
ensure that COPY_DEPENDENCIES is true and Libavcode_DIR is configured as the dependent component directory
Insert picture description here
Insert picture description here

Formally Configure ok

5.Generate to generate obs sln project

After the generate is successful, check the build
Insert picture description here

Open build\obs-studio.sln with vs2017

Insert picture description here
Click to run the project.
Rest! Take a break and start the computer quickly
Insert picture description here

The obs project compiles and runs successfully, and the debugging content also appears
Insert picture description here

Test the program
Insert picture description here
Add a catcher The
Insert picture description here
Insert picture description here
test is generally ok!

Reference article:
https://github.com/obsproject/obs-studio/wiki/Install-Instructions
https://www.jianshu.com/p/1dcc2208d01d

Guess you like

Origin blog.csdn.net/hyl999/article/details/115316632