fix(poc-installer): rendre l'installateur Lea embedded fonctionnel
Some checks failed
tests / Lint (ruff + black) (push) Failing after 1m47s
tests / Tests unitaires (sans GPU) (push) Failing after 1m50s
tests / Tests sécurité (critique) (push) Has been skipped

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) <noreply@anthropic.com>
This commit is contained in:
Dom
2026-06-15 17:14:08 +02:00
parent 33c1e2e0d1
commit cbd3d40e39
2 changed files with 18 additions and 5 deletions

8
.gitignore vendored
View File

@@ -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/

View File

@@ -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);