feat(rembg): add RemoveBG Studio - native background removal app

C++ WebView2 host app driving a Python/rembg engine as a JSON-stdio
sidecar, with live before/after preview for images and video frames.
Also includes the original CLI (removebg.py) built on the same
core/ engine.

The WebView2 SDK is fetched on demand via
native/third_party/fetch-webview2.ps1 (wired into the Makefile)
rather than vendored, since it's ~15MB of prebuilt/generated
Microsoft SDK content. A Makefile provides make sync/build/run/clean
as the standard entry points.
This commit is contained in:
2026-07-26 18:19:02 +01:00
parent ef24dbc4e5
commit fa0170daa9
28 changed files with 29783 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# RemoveBG Studio
#
# Common entry points for building/running the native app and keeping the
# Python engine's virtualenv in sync. Requires: CMake, MSVC (Visual Studio
# 2022 Build Tools or full VS), PowerShell, and uv (or pip) for Python deps.
GENERATOR ?= Visual Studio 17 2022
CONFIG ?= Release
BUILD_DIR := native/build
WEBVIEW2_HEADER := native/third_party/webview2/include/WebView2.h
EXE := $(BUILD_DIR)/$(CONFIG)/RemoveBGStudio.exe
.PHONY: all sync fetch-deps configure build run clean
all: build
# --- Python engine -----------------------------------------------------
sync:
uv sync
# --- Native app ----------------------------------------------------------
$(WEBVIEW2_HEADER):
powershell -ExecutionPolicy Bypass -File native/third_party/fetch-webview2.ps1
fetch-deps: $(WEBVIEW2_HEADER)
configure: fetch-deps
cmake -S native -B $(BUILD_DIR) -G "$(GENERATOR)" -A x64
build: configure
cmake --build $(BUILD_DIR) --config $(CONFIG)
run: build
$(EXE)
clean:
rm -rf $(BUILD_DIR)