@@ -4,71 +4,108 @@ lang: en
44title : How to develop OBS Background Removal on Ubuntu
55description : How to develop OBS Background Removal on Ubuntu
66---
7- # How to develop it on Ubuntu
7+ # Step-by-Step Guide: Developing OBS Background Removal on Ubuntu
88
9- ## Install system dependencies
9+ Welcome! This guide will walk you through setting up your development environment for OBS Background Removal on Ubuntu.
1010
11- ```
11+ ---
12+
13+ ## 1. Install System Dependencies
14+
15+ Open your terminal and run:
16+ ``` sh
1217sudo apt install build-essential zsh cmake git curl zip unzip tar
1318```
1419
15- ## Clone the source
16- ```
20+ ---
21+
22+ ## 2. Clone the Source Code
23+
24+ Get the latest code from GitHub:
25+ ``` sh
1726git clone https://github.com/royshil/obs-backgroundremoval.git
1827cd obs-backgroundremoval
1928```
2029
21- ## Install vcpkg
30+ ---
2231
23- ```
32+ ## 3. Set Up vcpkg
33+
34+ Install vcpkg to manage dependencies:
35+ ``` sh
2436git clone https://github.com/microsoft/vcpkg.git ~ /vcpkg
2537~ /vcpkg/bootstrap-vcpkg.sh
2638export VCPKG_ROOT=~ /vcpkg
2739```
2840
29- ## Install build dependencies with vcpkg
30- It takes 10-20 minutes.
31- ```
32- ${VCPKG_ROOT}/vcpkg install --triplet x64-linux-obs
33- ```
41+ ---
42+
43+ ## 4. Install Build Dependencies
3444
35- ## Download ONNX Runtime with CMake
45+ This step may take 10–20 minutes:
46+ ``` sh
47+ ${VCPKG_ROOT} /vcpkg install --triplet x64-linux-obs
3648```
49+
50+ ---
51+
52+ ## 5. Download ONNX Runtime
53+
54+ Use CMake to download ONNX Runtime:
55+ ``` sh
3756cmake -P cmake/DownloadOnnxruntime.cmake
3857```
3958
59+ ---
4060
41- ## Build with CI scripts
61+ ## 6. Build the Project
4262
43- ```
63+ Build using the provided CI scripts:
64+ ``` sh
4465./.github/scripts/build-ubuntu --target ubuntu-x86_64 --config RelWithDebInfo
4566```
4667
47- ## Test plugin with system OBS
68+ ---
4869
49- ```
70+ ## 7. Test the Plugin with System OBS
71+
72+ Install the plugin locally:
73+ ``` sh
5074sudo cmake --install build_x86_64
5175```
5276
53- ## Package the plugin
77+ ---
78+
79+ ## 8. Package the Plugin
5480
55- ```
81+ Create a Debian package:
82+ ``` sh
5683./.github/scripts/package-ubuntu --target ubuntu-x86_64 --config RelWithDebInfo --package
5784```
5885
59- ## Test the package installatino
86+ ---
6087
61- ```
88+ ## 9. Test the Package Installation
89+
90+ Install the generated package:
91+ ``` sh
6292sudo dpkg -i release/obs-backgroundremoval-* -x86_64-linux-gnu.deb
6393```
6494
65- ## Lint
95+ ---
6696
67- ```
97+ ## 10. Lint Your Code
98+
99+ Install the required tools and run linters:
100+ ``` sh
68101/bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
69102eval " $( /home/linuxbrew/.linuxbrew/bin/brew shellenv) "
70103brew install obsproject/tools/clang-format@19 obsproject/tools/gersemi
71104export PATH=" /home/linuxbrew/.linuxbrew/opt/clang-format@19/bin:$PATH "
72105./build-aux/run-clang-format
73106./build-aux/run-gersemi
74107```
108+
109+ ---
110+
111+ You're all set! Happy coding!
0 commit comments