# Flatpak Build Configuration - OBS LocalVocal Flatpak manifest for the OBS LocalVocal plugin using system dependencies where possible to reduce build time. ## ๐Ÿ“ Files ### Flatpak Configuration | File | Description | |------|-------------| | `com.obsproject.Studio.Plugin.LocalVocal.yaml` | โš™๏ธ Main Flatpak manifest | | `com.obsproject.Studio.Plugin.LocalVocal.metainfo.xml` | ๐Ÿ“‹ AppStream metadata | | `cargo-sources.json` | ๐Ÿ“ฆ Vendored Rust dependencies | | `build.sh` | ๐Ÿ”จ Build script | | `patches/` | ๐Ÿฉน Patches for USE_SYSTEM_* CMake options | ## ๐ŸŽฏ Quick Start ### Build the plugin ```bash # Using build script ./flatpak/build.sh # Or manually with flatpak-builder flatpak-builder --force-clean --repo=repo build \ flatpak/com.obsproject.Studio.Plugin.LocalVocal.yaml ``` ## ๐Ÿ“Š Key Features ### SDK and Dependencies | Component | Version | Notes | |-----------|---------|-------| | **SDK** | org.freedesktop.Sdk//25.08 | Same as OBS Studio | | **Rust** | SDK extension (1.94.0) | Saves 15-20 min build time | | **ICU** | SDK system library | Saves 8-10 min build time | ### Library Versions All libraries use versions with native CMake 3.x/4.x support: - **OpenBLAS** v0.3.32 (CMake 3.16+) - **OpenCL-Headers** v2025.07.22 (CMake 3.16+) - **CTranslate2** v4.7.1 (CMake 3.7+) - cpu_features v0.10.1 (CMake 3.13+) - spdlog v1.17.0 (CMake 3.10+) - **whisper.cpp** v1.8.2 - **SentencePiece** v0.2.1 ## ๐Ÿ” Technical Details ### Build Architecture ``` com.obsproject.Studio (runtime) โ”œโ”€โ”€ org.freedesktop.Sdk//25.08 โ”‚ โ”œโ”€โ”€ sdk-extensions โ”‚ โ”‚ โ””โ”€โ”€ rust-stable (1.94.0) โ”‚ โ””โ”€โ”€ System libraries โ”‚ โ””โ”€โ”€ ICU (system) โ””โ”€โ”€ LocalVocal Extension โ”œโ”€โ”€ Compiled modules โ”‚ โ”œโ”€โ”€ OpenBLAS โ”‚ โ”œโ”€โ”€ whisper.cpp โ”‚ โ”œโ”€โ”€ CTranslate2 โ”‚ โ”œโ”€โ”€ SentencePiece โ”‚ โ””โ”€โ”€ OpenCL-Headers โ””โ”€โ”€ Prebuilt binaries โ”œโ”€โ”€ whispercpp-prebuilt โ””โ”€โ”€ onnxruntime-prebuilt ``` ### Applied Patches Patches in `patches/` add CMake options to use system libraries: - `0001-BuildCTranslate2-use-system-option.patch` โ†’ `USE_SYSTEM_CTRANSLATE2` - `0002-BuildSentencepiece-use-system-option.patch` โ†’ `USE_SYSTEM_SENTENCEPIECE` ## ๐Ÿงช Testing ### Verify build environment ```bash # Check Flatpak configuration flatpak remotes --show-details flatpak list --runtime # Verify SDK extension availability flatpak search org.freedesktop.Sdk.Extension.rust-stable ``` ### Test build with timing ```bash # Full build with timing time flatpak-builder --force-clean build \ flatpak/com.obsproject.Studio.Plugin.LocalVocal.yaml # Partial build (stop at specific module) flatpak-builder --force-clean --stop-at=obs-localvocal build \ flatpak/com.obsproject.Studio.Plugin.LocalVocal.yaml ``` ## ๐Ÿ› Troubleshooting ### Common Issues | Error | Solution | |-------|----------| | Rust extension not found | `flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//25.08` | | CMake version errors | Update library versions in manifest (already done) | | UIC wrapper fails | Check Qt installation in SDK with `flatpak-builder --run ... which uic` | ### Debug build ```bash # Verbose build flatpak-builder -v --force-clean build manifest.yaml # Debug specific module flatpak-builder --force-clean --stop-at=MODULE build manifest.yaml flatpak-builder --run build manifest.yaml bash ``` ## ๐Ÿ“œ License See the `LICENSE` file in the project root. --- **Last updated:** March 24, 2026