fix: nettoyer warning state_clone + xcopy /Y + taskkill avant copie runtime
CI / lint (push) Successful in 24s
CI / security (push) Successful in 13s
CI / test (push) Successful in 27s
CI / build (push) Successful in 6s
CI / e2e (push) Failing after 27s
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 6s
CI / e2e (push) Failing after 27s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
- main.rs: supprimer state_clone unused dans restart_backend - build-windows.bat: taskkill /F python.exe avant xcopy (évite Access denied) - build-windows.bat: /Y sur xcopy (pas de prompt interactif) - build-windows.bat: 2>nul sur rmdir (silencieux si dossier absent)
This commit is contained in:
@@ -48,13 +48,15 @@ echo ✅ Build successful
|
||||
|
||||
REM ── 4. Copier le runtime à côté de l'exécutable ───────────────
|
||||
echo [4/5] Copying runtime to output dir...
|
||||
REM Kill any leftover backend from a previous run
|
||||
taskkill /F /IM python.exe /FI "WINDOWTITLE eq *" 2>nul
|
||||
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"
|
||||
if exist "%OUTDIR%\frontend" rmdir /s /q "%OUTDIR%\frontend"
|
||||
xcopy /E /I /Q "python-embed" "%OUTDIR%\python-embed"
|
||||
xcopy /E /I /Q "..\backend" "%OUTDIR%\backend"
|
||||
xcopy /E /I /Q "..\frontend" "%OUTDIR%\frontend"
|
||||
if exist "%OUTDIR%\python-embed" rmdir /s /q "%OUTDIR%\python-embed" 2>nul
|
||||
if exist "%OUTDIR%\backend" rmdir /s /q "%OUTDIR%\backend" 2>nul
|
||||
if exist "%OUTDIR%\frontend" rmdir /s /q "%OUTDIR%\frontend" 2>nul
|
||||
xcopy /E /I /Q /Y "python-embed" "%OUTDIR%\python-embed"
|
||||
xcopy /E /I /Q /Y "..\backend" "%OUTDIR%\backend"
|
||||
xcopy /E /I /Q /Y "..\frontend" "%OUTDIR%\frontend"
|
||||
|
||||
REM Add parent directory to Python path so 'import backend' works at runtime
|
||||
echo ..>> "%OUTDIR%\python-embed\python311._pth"
|
||||
|
||||
+1
-3
@@ -256,9 +256,7 @@ fn restart_backend(state: tauri::State<BackendProcess>) -> Result<String, String
|
||||
*guard = Some(new_child);
|
||||
drop(guard);
|
||||
|
||||
// Wait for it to become ready (fire and forget with UI poll)
|
||||
let state_clone = state.inner().clone();
|
||||
// Can't clone state directly, use a flag pattern
|
||||
// Fire and forget — the monitoring loop will detect when it's ready
|
||||
info!("Backend restart initiated");
|
||||
Ok("restarting".to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user