feat(build): aggiunge infrastruttura Docker per build Windows con Wine

This commit is contained in:
2026-03-16 11:28:28 +01:00
parent fc1c7990be
commit 1c758d68fc
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
FROM electronuserland/builder:wine-mono
WORKDIR /project

20
contrib/windows/build.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
IMAGE_NAME="cadroute-builder-windows"
echo "[cadroute] Building Docker image..."
docker build -t "$IMAGE_NAME" "$SCRIPT_DIR"
echo "[cadroute] Running Windows build..."
docker run --rm \
-v "$PROJECT_ROOT":/project \
-w /project \
-v cadroute-electron-cache:/root/.cache/electron \
-v cadroute-electronbuilder-cache:/root/.cache/electron-builder \
"$IMAGE_NAME" \
bash -c "npm ci && npm run build -- --win --x64"
echo "[cadroute] Artefatti in: $PROJECT_ROOT/dist"