feat(installer): make Lea autonomous for POC
This commit is contained in:
@@ -106,6 +106,9 @@ rsync -a \
|
||||
--exclude='test_lea_*' \
|
||||
--exclude='_test_paused_toast.py' \
|
||||
--exclude='tools/test_*' \
|
||||
--exclude='install.bat' \
|
||||
--exclude='*.bak' \
|
||||
--exclude='config.txt.bak*' \
|
||||
"$BASE_BUILD_DIR/" \
|
||||
"$STAGING_DIR/"
|
||||
|
||||
@@ -131,15 +134,38 @@ echo ""
|
||||
# 5. Python embedded (optionnel)
|
||||
# ---------------------------------------------------------------
|
||||
PYTHON_EMBED_SRC="${PYTHON_EMBED_DIR:-$SCRIPT_DIR/python-3.12-embed}"
|
||||
if [[ -d "$PYTHON_EMBED_SRC" ]]; then
|
||||
echo "[4/5] Copie de Python 3.12 embedded..."
|
||||
rsync -a "$PYTHON_EMBED_SRC/" "$STAGING_DIR/python-3.12-embed/"
|
||||
echo " Python embedded inclus"
|
||||
else
|
||||
echo -e "${YELLOW}[4/5] Python 3.12 embedded non trouve dans $PYTHON_EMBED_SRC${NC}"
|
||||
echo " L'installeur sera produit SANS bundle Python."
|
||||
echo " Pour bundler Python : voir README.md section 'Python embedded'"
|
||||
if [[ ! -d "$PYTHON_EMBED_SRC" ]]; then
|
||||
echo -e "${RED}[4/5] ERREUR : Python 3.12 embedded introuvable dans $PYTHON_EMBED_SRC${NC}"
|
||||
echo " L'embed est OBLIGATOIRE (runtime 100% autonome, aucune dependance Python systeme)."
|
||||
echo " Build interrompu."
|
||||
exit 1
|
||||
fi
|
||||
echo "[4/5] Copie de Python 3.12 embedded..."
|
||||
rsync -a "$PYTHON_EMBED_SRC/" "$STAGING_DIR/python-3.12-embed/"
|
||||
|
||||
# Validation de la completude de l'embed : un embed incomplet = install cassee chez le client.
|
||||
# La liste doit rester alignee avec configure_embed.ps1 (verification runtime des imports).
|
||||
EMBED="$STAGING_DIR/python-3.12-embed"
|
||||
REQUIRED_EMBED=(
|
||||
"python.exe" "pythonw.exe" "python312._pth"
|
||||
"_tkinter.pyd" "tcl86t.dll" "tk86t.dll" "zlib1.dll"
|
||||
"Lib/site-packages/socketio" "Lib/site-packages/tkinter"
|
||||
"Lib/site-packages/mss" "Lib/site-packages/pynput"
|
||||
"Lib/site-packages/pystray" "Lib/site-packages/plyer"
|
||||
"Lib/site-packages/requests" "Lib/site-packages/PIL"
|
||||
"Lib/site-packages/win32"
|
||||
)
|
||||
MISSING_EMBED=()
|
||||
for f in "${REQUIRED_EMBED[@]}"; do
|
||||
[[ -e "$EMBED/$f" ]] || MISSING_EMBED+=("$f")
|
||||
done
|
||||
if [[ ${#MISSING_EMBED[@]} -gt 0 ]]; then
|
||||
echo -e "${RED} ERREUR : embed incomplet. Elements manquants :${NC}"
|
||||
printf ' - %s\n' "${MISSING_EMBED[@]}"
|
||||
echo " Build interrompu (le runtime doit etre complet et autonome)."
|
||||
exit 1
|
||||
fi
|
||||
echo " Python embedded complet inclus (${#REQUIRED_EMBED[@]} elements verifies)"
|
||||
echo ""
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user