#!/bin/sh # Build the Windows management app from Linux and lay it out ready to zip (admin.spec.md, "Windows build"): # Jarvis/jarvis.exe, Jarvis/WebView2Loader.dll, Jarvis/python-src/{voice_worker,jarvis} # Needs the x86_64-pc-windows-gnu Rust target, mingw-w64 and cmake (for Opus). # app/shell/package.sh set -eu here=$(cd "$(dirname "$0")" && pwd) out=${1:?output folder} target=${CARGO_TARGET_DIR:-$here/target} cargo build --release --locked --target x86_64-pc-windows-gnu --manifest-path "$here/Cargo.toml" rel="$target/x86_64-pc-windows-gnu/release" rm -rf "$out/Jarvis" mkdir -p "$out/Jarvis/python-src" cp "$rel/jarvis.exe" "$rel/WebView2Loader.dll" "$out/Jarvis/" # The worker and brain sources only (the worker venv gets its packages from the requirement files). for pkg in voice_worker jarvis; do (cd "$here/../../src" && find "$pkg" -name __pycache__ -prune -o -name '*.spec.md' -prune -o -type f -print) | while read -r f; do mkdir -p "$out/Jarvis/python-src/$(dirname "$f")"; cp "$here/../../src/$f" "$out/Jarvis/python-src/$f"; done done echo "$out/Jarvis"