fix: revue complète obsigate-desktop — 6 correctifs pour le prochain build
CI / lint (push) Successful in 24s
CI / security (push) Successful in 13s
CI / test (push) Successful in 27s
CI / build (push) Successful in 9s
CI / e2e (push) Failing after 26s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
CI / lint (push) Successful in 24s
CI / security (push) Successful in 13s
CI / test (push) Successful in 27s
CI / build (push) Successful in 9s
CI / e2e (push) Failing after 26s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
1. main.rs: .current_dir(exe_dir) pour que Python trouve backend/ (pas le cwd hérité) 2. build-windows.bat: dir bundles pointe vers target/x86_64-.../release (était target/release) 3. build-windows.bat: supprimer étape 3 inutile (frontend-static) — Tauri utilise ../frontend 4. capabilities/default.json: requis par Tauri v2 (permissions plugins) 5. tauri.conf.json + Cargo.toml: retirer updater (placeholder sans clé) 6. .gitignore: ajouter desktop/target/, python-embed/, frontend-static/ 7. build-linux.sh: mêmes corrections (bundles path, simplification)
This commit is contained in:
+14
-26
@@ -11,41 +11,30 @@ echo ========================================
|
||||
echo.
|
||||
|
||||
REM ── 1. Vérifier les prérequis ─────────────────────────────────
|
||||
echo [1/6] Verifying prerequisites...
|
||||
echo [1/5] 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...
|
||||
echo [2/5] Preparing Python embed...
|
||||
if not exist "python-embed\python.exe" (
|
||||
echo 📥 Downloading Python 3.11 embed...
|
||||
if exist "python-embed" rmdir /s /q "python-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...
|
||||
REM ── 3. Build Tauri ────────────────────────────────────────────
|
||||
echo [3/5] Building Tauri application...
|
||||
cargo tauri build --target x86_64-pc-windows-msvc --bundles msi,nsis
|
||||
if errorlevel 1 (
|
||||
echo ❌ Build failed!
|
||||
@@ -53,20 +42,19 @@ if errorlevel 1 (
|
||||
)
|
||||
echo ✅ Build successful
|
||||
|
||||
REM ── 5b. Copier python-embed à côté de l'exécutable pour le dev ─────
|
||||
echo [5b/6] Copying python-embed to output dir...
|
||||
REM ── 4. Copier le runtime à côté de l'exécutable ───────────────
|
||||
echo [4/5] Copying runtime to output dir...
|
||||
set "OUTDIR=target\x86_64-pc-windows-msvc\release"
|
||||
if exist "%OUTDIR%\python-embed" rmdir /s /q "%OUTDIR%\python-embed"
|
||||
if exist "%OUTDIR%\backend" rmdir /s /q "%OUTDIR%\backend"
|
||||
xcopy /E /I /Q "python-embed" "%OUTDIR%\python-embed"
|
||||
REM Copier aussi le backend Python
|
||||
if not exist "%OUTDIR%\backend" mkdir "%OUTDIR%\backend"
|
||||
xcopy /E /I /Q "..\backend" "%OUTDIR%\backend"
|
||||
echo ✅ Runtime copied
|
||||
|
||||
REM ── 6. Résultats ───────────────────────────────────────────────────
|
||||
echo [6/6] Results:
|
||||
dir /b target\release\bundle\msi\*.msi 2>nul
|
||||
dir /b target\release\bundle\nsis\*.exe 2>nul
|
||||
REM ── 5. Résultats ───────────────────────────────────────────────
|
||||
echo [5/5] Results:
|
||||
dir /b "%OUTDIR%\bundle\msi\*.msi" 2>nul
|
||||
dir /b "%OUTDIR%\bundle\nsis\*.exe" 2>nul
|
||||
echo.
|
||||
echo ✅ Done! Check target\release\bundle\
|
||||
echo ✅ Done! Check %OUTDIR%\bundle\
|
||||
endlocal
|
||||
|
||||
Reference in New Issue
Block a user