From be86976882ea4fd7ff2504446dc37b9a290841b3 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sun, 12 Jul 2026 03:53:02 +0545 Subject: [PATCH] feat(build): add progress steps and environment configuration for App Capture module --- install.sh | 19 +++++++++++++++++++ pyproject.toml | 1 + start.py | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/install.sh b/install.sh index ab7d6c3..5770fef 100755 --- a/install.sh +++ b/install.sh @@ -306,6 +306,25 @@ else warn "native/Makefile not found - skipping C library build" fi +progress "Building App Capture module" + +step "Compiling libappcapture.so..." +if [ -d "$INSTALL_DIR/src/window/switcher/app-capture" ]; then + cd "$INSTALL_DIR/src/window/switcher/app-capture" + if meson setup builddir --wipe >/dev/null 2>&1 || meson setup builddir >/dev/null 2>&1; then + if meson compile -C builddir >/dev/null 2>&1; then + success "libappcapture.so built successfully" + else + warn "Failed to compile App Capture module" + fi + else + warn "Failed to setup App Capture builddir" + fi + cd - >/dev/null +else + warn "App Capture module directory not found" +fi + progress "Configuring Hyprland" HYPR_CONFIG="$HOME/.config/hypr/hyprland.lua" diff --git a/pyproject.toml b/pyproject.toml index 1d2ebb5..15a9bb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,7 @@ packages = ["src/shared", "src/utils", "src/window", "src/services", "src/global [tool.ruff.lint.per-file-ignores] "src/main.py" = ["E402"] +"src/window/switcher/main.py" = ["E402"] [tool.uv.sources] fabric = { git = "https://github.com/Fabric-Development/fabric.git" } diff --git a/start.py b/start.py index 10ac8ff..c911027 100644 --- a/start.py +++ b/start.py @@ -7,6 +7,14 @@ src_path = os.path.join(os.path.dirname(__file__), "src") if src_path not in sys.path: sys.path.insert(0, src_path) +# App-capture library paths (built via meson in src/window/switcher/app-capture/builddir) +_app_capture_builddir = os.path.join(src_path, "window", "switcher", "app-capture", "builddir") +if os.path.isdir(_app_capture_builddir): + for env_var in ("GI_TYPELIB_PATH", "LD_LIBRARY_PATH"): + current = os.environ.get(env_var, "") + if _app_capture_builddir not in current.split(os.pathsep): + os.environ[env_var] = f"{_app_capture_builddir}{os.pathsep}{current}" if current else _app_capture_builddir + # Apply monkey patch for hyprland lua dispatcher def run_app():