支持v4l2编码,arm机器原生构建,docker镜像换archlinux,允许初始化时禁用HID

This commit is contained in:
a15355447898a
2026-01-23 17:11:19 +08:00
parent e7d8c93bff
commit 89072ad58d
9 changed files with 107 additions and 50 deletions

View File

@@ -19,8 +19,22 @@ ARCH_MAP=(
build_arch() {
local rust_target="$1"
echo "=== Building: $rust_target (via cross with custom Dockerfile) ==="
cross build --release --target "$rust_target"
# Build frontend first
if [ ! -d "$PROJECT_DIR/web/dist" ]; then
echo "=== Building Frontend ==="
cd "$PROJECT_DIR/web" && npm install && npm run build
cd "$PROJECT_DIR"
fi
local host_arch=$(rustc -vV | grep host | cut -d ' ' -f 2)
if [ "$rust_target" == "$host_arch" ]; then
echo "=== Building: $rust_target (NATIVE build, skipping cross) ==="
cargo build --release --target "$rust_target"
else
echo "=== Building: $rust_target (via cross) ==="
cross build --release --target "$rust_target"
fi
}
# Main