- Lea.iss : script Inno Setup 6 (enrollment 2 pages, licence, machine_id) - build_installer.sh : staging + ISCC (compatible Wine sur Linux) - uninstall_lea.ps1 : kill PID + cleanup + notif serveur - configure_embed.ps1 : Python 3.12 embedded optionnel - config_template.txt : modèle pour installation silencieuse - LICENSE.txt : CGU AI Act Art. 50 - README.md : doc build, signing, déploiement silencieux Paramètres d'installation silencieuse : Lea-Setup-v1.0.0.exe /VERYSILENT /CONFIG=enroll.txt /LOG=install.log Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6.9 KiB
Installeur Lea (Inno Setup)
Installeur Windows professionnel pour Lea, remplacant le ZIP + install.bat artisanal.
Resume
Produit Lea-Setup-v1.0.0.exe dans deploy/releases/.
Caracteristiques :
- Interface francaise, moderne (style wizard Windows 10/11)
- Page custom d'enrollment (nom, email, ID interne, URL serveur, token)
- Generation automatique de
machine_idunique (GUID + hash hostname) config.txtgenere a partir des donnees saisies- Option bundle Python 3.12 embedded (postes sans droits admin)
- Raccourci demarrage automatique (
shell:startup) optionnel - Notification serveur a l'install / desinstall (best-effort)
- Installation silencieuse :
/VERYSILENT /CONFIG=enroll.txt - Desinstallation propre : kill process, cleanup, export logs
Pre-requis pour compiler
Inno Setup 6.2+
Telecharger depuis jrsoftware.org et installer
innosetup-6.x.exe. Le compilateur ISCC.exe doit etre accessible.
Alternative Linux : Wine
# Installation
winetricks innosetup
# Ou : telecharger innosetup-6.x.exe et lancer : wine innosetup-6.x.exe
# Verifier
ls "$HOME/.wine/drive_c/Program Files (x86)/Inno Setup 6/ISCC.exe"
Le script build_installer.sh detecte automatiquement Wine si present.
Build local
Build complet (staging + compilation)
cd rpa_vision_v3
./deploy/installer/build_installer.sh
Produit deploy/releases/Lea-Setup-v1.0.0.exe.
Build staging uniquement (sans ISCC)
./deploy/installer/build_installer.sh --stage-only
Prepare deploy/build/installer_staging/ puis affiche la commande ISCC a executer
sur Windows.
Nettoyer avant
./deploy/installer/build_installer.sh --clean
Build sur Windows (recommande pour production)
- Copier le dossier
deploy/sur le PC Windows - Ouvrir
deploy/installer/Lea.issdans Inno Setup Compiler Build > Compile(ou F9)- Recuperer
deploy/releases/Lea-Setup-v1.0.0.exe
Python 3.12 embedded (optionnel)
Pour bundler Python directement dans l'installeur (evite d'exiger que les postes aient Python installe) :
# Sur Linux
cd deploy/installer
wget https://www.python.org/ftp/python/3.12.8/python-3.12.8-embed-amd64.zip
mkdir python-3.12-embed
unzip python-3.12.8-embed-amd64.zip -d python-3.12-embed/
Le staging copie automatiquement ce dossier si present. Le composant "pythonembed" devient alors selectionnable dans l'installeur.
Le script configure_embed.ps1 :
- Patche
python312._pthpour activerimport site - Installe
pipviaget-pip.py - Installe
requirements_agent.txt - Reecrit
Lea.batpour pointer surpython-embed\pythonw.exe
Installation silencieuse (deploiement de masse)
Pour deployer sans interaction utilisateur (GPO, SCCM, script PowerShell) :
-
Preparer un fichier
enroll.txtpar poste (ou un commun) :USER_NAME=Jean Dupont USER_EMAIL=jean.dupont@aivanov.com USER_ID=EMP-00123 SERVER_URL=https://lea.labs.laurinebazin.design/api/v1 API_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -
Lancer l'installeur :
Lea-Setup-v1.0.0.exe /VERYSILENT /CONFIG=C:\temp\enroll.txt /DIR="C:\Lea"
Parametres Inno Setup utiles :
/VERYSILENT: aucune UI/SILENT: barre de progression seulement/DIR="...": dossier d'installation/LOG="install.log": log d'installation/TASKS="startmenuicon,autostart": composants a installer (voir[Tasks]et[Components])/CONFIG=path: fichier d'enrollment (custom, specifique a Lea)
Signature du .exe (SmartScreen)
Sans signature, Windows SmartScreen affiche un avertissement rouge ("Cet editeur est inconnu"). Pour eviter cela, signer l'installeur avec un certificat code-signing.
Options de certificat
-
Certificat OV (Organization Validation) : ~200-400 EUR/an
- Sectigo, DigiCert, GlobalSign
- SmartScreen apprend la reputation progressivement (~30 installations)
- Livre sur token USB FIPS depuis 2023
-
Certificat EV (Extended Validation) : ~400-700 EUR/an
- Reputation SmartScreen immediate (pas d'avertissement des la 1ere install)
- Strict : obligatoirement sur token USB
Signature manuelle (avec signtool.exe du Windows SDK)
signtool sign ^
/tr http://timestamp.sectigo.com ^
/td sha256 ^
/fd sha256 ^
/a ^
"deploy\releases\Lea-Setup-v1.0.0.exe"
signtool verify /pa /v "deploy\releases\Lea-Setup-v1.0.0.exe"
Signature automatique dans Inno Setup
Ajouter dans Lea.iss apres [Setup] :
SignTool=signtool $f
Et declarer le signtool via ISCC.exe /Ssigntool=... au build.
Solution interne (certif AIVANOV)
Si AIVANOV a deja un certificat code-signing, le token USB + mot de passe suffisent. Sinon, Sectigo OV est un bon choix d'entree de gamme.
Structure du dossier installer/
deploy/installer/
├── Lea.iss # Script Inno Setup principal
├── build_installer.sh # Helper bash (staging + ISCC)
├── uninstall_lea.ps1 # Script de desinstallation propre
├── configure_embed.ps1 # Configuration Python embedded
├── config_template.txt # Modele config pour /VERYSILENT /CONFIG=
├── LICENSE.txt # CGU affichees dans la page licence
└── README.md # Ce fichier
Test de l'installeur
- Machine de test Windows 11 (VM ou PC physique, idealement sans Python)
- Copier
Lea-Setup-v1.0.0.exesur la machine - Double-cliquer : verifier que l'enrollment s'affiche en francais
- Tester l'installation (avec et sans Python deja installe)
- Verifier le fichier
C:\Program Files\Lea\config.txtgenere - Verifier le raccourci
shell:startup(si option cochee) - Lancer Lea, verifier la connexion au serveur
- Tester la desinstallation depuis "Ajout/suppression de programmes"
Test automatise (PowerShell, sur la VM)
# Installation silencieuse
$cfg = "C:\temp\enroll.txt"
@"
USER_NAME=Test Automatique
USER_EMAIL=test@aivanov.com
"@ | Out-File -Encoding ASCII $cfg
.\Lea-Setup-v1.0.0.exe /VERYSILENT /CONFIG=$cfg /LOG="C:\temp\install.log"
# Verifications
Test-Path "C:\Program Files\Lea\config.txt"
Get-Content "C:\Program Files\Lea\machine_id.txt"
# Desinstallation silencieuse
$uninst = Get-WmiObject Win32_Product | Where-Object { $_.Name -like "Lea*" }
$uninst.Uninstall()
Notes et limites connues
- Endpoint serveur
/agents/enrollet/agents/uninstall: pas encore implemente cote serveur (avril 2026). L'installeur envoie la requete en best-effort, une erreur est silencieusement ignoree. A implementer dansagent_v0/server_v1/api_stream.pyquand necessaire. - Python embedded : le patch
python312._pth+ pip bootstrap fonctionne mais augmente la taille de l'installeur (~25 MB). A reserver aux postes sans Python. - Code signing : indispensable pour deploiement hopital/client. Prevoir le budget certificat (400-700 EUR/an) dans la roadmap commerciale.
Historique
- v1.0.0 (2026-04-13) : Premiere version de l'installeur Inno Setup.