CI / lint (push) Successful in 24s
CI / security (push) Successful in 14s
CI / test (push) Successful in 28s
CI / build (push) Successful in 6s
CI / e2e (push) Failing after 19s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
- build-windows.bat: Python 3.11.15→3.11.9 (dernière version avec binaires embed) - tauri.conf.json: supprimer "wix": null (causait conflit anyOf avec nsis dans Tauri v2)
62 lines
2.7 KiB
Batchfile
62 lines
2.7 KiB
Batchfile
@echo off
|
|
REM ============================================================
|
|
REM ObsiGate Desktop — Build Windows (.msi + .exe)
|
|
REM Prérequis : Rust, Tauri CLI, NSIS, Python 3.11 embed
|
|
REM ============================================================
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo ========================================
|
|
echo ObsiGate Desktop — Build Windows
|
|
echo ========================================
|
|
echo.
|
|
|
|
REM ── 1. Vérifier les prérequis ─────────────────────────────────
|
|
echo [1/6] Verifying prerequisites...
|
|
where cargo >nul 2>&1 || (echo ❌ Rust/Cargo not found. Install from https://rustup.rs & exit /b 1)
|
|
where tauri >nul 2>&1 || cargo install tauri-cli
|
|
echo ✅ Rust + Tauri OK
|
|
|
|
REM ── 2. Préparer Python 3.11 embed ─────────────────────────────
|
|
echo [2/6] Preparing Python embed...
|
|
if not exist "python-embed\python.exe" (
|
|
echo 📥 Downloading Python 3.11 embed...
|
|
curl -L -o python-embed.zip "https://www.python.org/ftp/python/3.11.9/python-3.11.9-embed-amd64.zip"
|
|
powershell Expand-Archive -Path python-embed.zip -DestinationPath python-embed\
|
|
del python-embed.zip
|
|
|
|
REM Enable pip in embedded Python
|
|
echo import site >> python-embed\python311._pth
|
|
|
|
REM Install dependencies
|
|
python-embed\python.exe -m pip install --no-cache-dir -r ..\backend\requirements.txt
|
|
)
|
|
echo ✅ Python embed ready
|
|
|
|
REM ── 3. Copier le frontend ─────────────────────────────────────
|
|
echo [3/6] Copying frontend...
|
|
if exist "frontend-static" rmdir /s /q "frontend-static"
|
|
xcopy /E /I /Q "..\frontend" "frontend-static"
|
|
echo ✅ Frontend copied
|
|
|
|
REM ── 4. Mettre à jour les icônes ───────────────────────────────
|
|
echo [4/6] Generating icons...
|
|
REM Placeholder — will use tauri icon generator when icons are ready
|
|
echo ✅ Icons OK (using defaults)
|
|
|
|
REM ── 5. Build Tauri ────────────────────────────────────────────
|
|
echo [5/6] Building Tauri application...
|
|
cargo tauri build --target x86_64-pc-windows-msvc --bundles msi,nsis
|
|
if errorlevel 1 (
|
|
echo ❌ Build failed!
|
|
exit /b 1
|
|
)
|
|
echo ✅ Build successful
|
|
|
|
REM ── 6. Signer (optionnel) ─────────────────────────────────────
|
|
echo [6/6] Results:
|
|
dir /b target\release\bundle\msi\*.msi 2>nul
|
|
dir /b target\release\bundle\nsis\*.exe 2>nul
|
|
echo.
|
|
echo ✅ Done! Check target\release\bundle\
|
|
endlocal
|