Skip to content

Commit a71220d

Browse files
committed
Add Markdown layout and Ubuntu development guide
Introduces a reusable MarkdownLayout.astro component for consistent page layouts and adds a detailed guide (ubuntu.md) for developing OBS Background Removal on Ubuntu, including setup, build, packaging, and linting instructions.
1 parent a58437f commit a71220d

File tree

2 files changed

+93
-0
lines changed

2 files changed

+93
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
import Layout from './Layout.astro';
3+
4+
interface Props {
5+
frontmatter: {
6+
lang: string;
7+
title: string;
8+
description: string;
9+
};
10+
}
11+
12+
const { lang, title, description } = Astro.props.frontmatter;
13+
---
14+
15+
<Layout lang={lang} title={title} description={description}>
16+
<main class="white-box">
17+
<slot />
18+
</main>
19+
</Layout>

pages/src/pages/dev/ubuntu.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
layout: ../../layouts/MarkdownLayout.astro
3+
lang: en
4+
title: How to develop OBS Background Removal on Ubuntu
5+
description: How to develop OBS Background Removal on Ubuntu
6+
---
7+
# How to develop it on Ubuntu
8+
9+
## Install system dependencies
10+
11+
```
12+
sudo apt install build-essential zsh cmake git curl zip unzip tar
13+
```
14+
15+
## Clone the source
16+
```
17+
git clone https://github.com/royshil/obs-backgroundremoval.git
18+
cd obs-backgroundremoval
19+
```
20+
21+
## Install vcpkg
22+
23+
```
24+
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
25+
~/vcpkg/bootstrap-vcpkg.sh
26+
export VCPKG_ROOT=~/vcpkg
27+
```
28+
29+
## Install build dependencies with vcpkg
30+
It takes 10-20 minutes.
31+
```
32+
${VCPKG_ROOT}/vcpkg install --triplet x64-linux-obs
33+
```
34+
35+
## Download ONNX Runtime with CMake
36+
```
37+
cmake -P cmake/DownloadOnnxruntime.cmake
38+
```
39+
40+
41+
## Build with CI scripts
42+
43+
```
44+
./.github/scripts/build-ubuntu --target ubuntu-x86_64 --config RelWithDebInfo
45+
```
46+
47+
## Test plugin with system OBS
48+
49+
```
50+
sudo cmake --install build_x86_64
51+
```
52+
53+
## Package the plugin
54+
55+
```
56+
./.github/scripts/package-ubuntu --target ubuntu-x86_64 --config RelWithDebInfo --package
57+
```
58+
59+
## Test the package installatino
60+
61+
```
62+
sudo dpkg -i release/obs-backgroundremoval-*-x86_64-linux-gnu.deb
63+
```
64+
65+
## Lint
66+
67+
```
68+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
69+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
70+
brew install obsproject/tools/clang-format@19 obsproject/tools/gersemi
71+
export PATH="/home/linuxbrew/.linuxbrew/opt/clang-format@19/bin:$PATH"
72+
./build-aux/run-clang-format
73+
./build-aux/run-gersemi
74+
```

0 commit comments

Comments
 (0)