From cbd3d40e39754b0412d570e1d24ac6083a620461 Mon Sep 17 00:00:00 2001 From: Dom Date: Mon, 15 Jun 2026 17:14:08 +0200 Subject: [PATCH] fix(poc-installer): rendre l'installateur Lea embedded fonctionnel Lea.iss (Inno Setup) n'avait jamais compile. Corrections : - StringChange utilise en in-place (procedure modifiant la variable, retour Integer) au lieu d'imbrique/assigne (l.246, 407-408) - GetTickCount (absent du Pascal Script Inno) -> GetDateTimeString pour le fallback machine_id - skipifsilent retire du [Run] configure_embed : le runtime python-embed est desormais configure aussi en installation silencieuse (cas POC) .gitignore : artefacts de build installateur non versionnes (python-3.12-embed/, releases/*.exe, build/). Valide sur VM Win11 : install per-user sans Python systeme, config DGX (RPA_SERVER_URL=http://192.168.1.45:5005/api/v1), python-embed 3.12.8 + deps OK. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitignore | 8 ++++++++ deploy/installer/Lea.iss | 15 ++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f72684cfd..c2381a603 100644 --- a/.gitignore +++ b/.gitignore @@ -126,3 +126,11 @@ tools/codex_windows_correction_rapport.py docs/clients/ .qw-baseline.log +docs/coordination/.loop_state/ + +# Runtime Python embedded pour l'installateur Inno Setup (local, ~11M, non versionné) +deploy/installer/python-3.12-embed/ +deploy/installer/python-3.12.8-embed-amd64.zip +# Artefacts de build installateur (EXE compilés + staging) — non versionnés +deploy/releases/*.exe +deploy/build/ diff --git a/deploy/installer/Lea.iss b/deploy/installer/Lea.iss index 261ef4398..1b8bc160e 100644 --- a/deploy/installer/Lea.iss +++ b/deploy/installer/Lea.iss @@ -144,7 +144,7 @@ Filename: "{cmd}"; \ Parameters: "/c copy /y ""{app}\Lea.bat"" ""{app}\Lea.bat.bak"" && powershell -NoProfile -ExecutionPolicy Bypass -File ""{app}\configure_embed.ps1"""; \ WorkingDir: "{app}"; \ StatusMsg: "Configuration du runtime Python embedded..."; \ - Flags: runhidden waituntilterminated skipifsilent; \ + Flags: runhidden waituntilterminated; \ Components: pythonembed ; Lancer Lea a la fin de l'installation (optionnel) @@ -243,9 +243,14 @@ begin // Essaye d'utiliser le GUID genere par Windows (via PowerShell) Guid := ''; if CreateGUIDString(Guid) then - Result := LowerCase(StringChange(StringChange(StringChange(Guid, '{', ''), '}', ''), '-', '')) + begin + StringChange(Guid, '{', ''); + StringChange(Guid, '}', ''); + StringChange(Guid, '-', ''); + Result := LowerCase(Guid); + end else - Result := IntToStr(GetTickCount); + Result := GetDateTimeString('yyyymmddhhnnss', #0, #0); // Ajoute un hash du hostname pour stabilite Hostname := GetComputerNameString(); @@ -404,8 +409,8 @@ begin // Derive ServerHost depuis ServerUrl : https://host/api/v1 -> host ServerHost := ServerUrl; - ServerHost := StringChange(ServerHost, 'https://', ''); - ServerHost := StringChange(ServerHost, 'http://', ''); + StringChange(ServerHost, 'https://', ''); + StringChange(ServerHost, 'http://', ''); SlashPos := Pos('/', ServerHost); if SlashPos > 0 then ServerHost := Copy(ServerHost, 1, SlashPos - 1);