fix: changelog embarqué manquant, badge hors-ligne trompeur, installeur WireGuard

- CHANGELOG.md n'était pas empaqueté par PyInstaller (datas=[]) et son
  chemin, calculé depuis __file__, ne survivait pas à l'extraction
  onefile : la page « À propos » restait vide une fois compilée. Le
  fichier est désormais embarqué (--add-data) et son chemin bascule sur
  sys._MEIPASS en mode frozen.
- Le badge de latence se basait uniquement sur un ping ICMP vers
  l'endpoint : de nombreux serveurs/pare-feux le bloquent alors que le
  tunnel WireGuard fonctionne, d'où « hors ligne » permanent. Repli sur
  l'âge du dernier handshake réel quand l'ICMP échoue.
- wgsecure.iss installe désormais WireGuard for Windows en silencieux
  (prérequis manquant jusqu'ici), au même titre que le VC++
  Redistributable ; make installer-deps télécharge les deux binaires.
This commit is contained in:
2026-09-01 21:23:12 +02:00
parent 8c09c02362
commit ce4df4edb4
5 changed files with 99 additions and 12 deletions
+23 -1
View File
@@ -27,7 +27,7 @@ PI_OPTS := \
--hidden-import cryptography.hazmat.primitives.asymmetric.x25519 \
--collect-submodules PyQt6
.PHONY: all linux windows release version changelog install install-gnome uninstall-gnome run run-admin icon reset-password setup-sudoers check-privileges clean clean-all help venv
.PHONY: all linux windows installer-deps release version changelog install install-gnome uninstall-gnome run run-admin icon reset-password setup-sudoers check-privileges clean clean-all help venv
# ── Cible par défaut ────────────────────────────────────────────────────────
all: linux
@@ -69,6 +69,7 @@ linux: install icon
$(PYTHON) -m PyInstaller $(PI_OPTS) \
--onefile \
--icon=$(ICON) \
--add-data "CHANGELOG.md:." \
$(SRC)
@echo ""
@echo " ✅ Binaire Linux → $(DIST)/$(APP)"
@@ -97,6 +98,7 @@ windows: icon
--icon=$(ICON) \
--add-data "$(WINE_QT_PLUGINS)/platforms;PyQt6/Qt6/plugins/platforms" \
--add-data "$(WINE_QT_PLUGINS)/styles;PyQt6/Qt6/plugins/styles" \
--add-data "CHANGELOG.md;." \
$(SRC) \
|| (echo ""; \
echo " ❌ Échec : Python Windows introuvable dans Wine."; \
@@ -106,6 +108,25 @@ windows: icon
@echo " ✅ Binaire Windows → $(DIST)/$(APP).exe"
@echo ""
# ── Prérequis de l'installeur Windows (wgsecure.iss) ─────────────────────────
# WireGuard n'est pas empaqueté avec WGSecure (c'est wg.exe et le pilote
# tunnel qui manquent, pas une simple DLL) : wgsecure.iss l'installe donc en
# silencieux à partir de ce binaire, téléchargé ici une bonne fois pour
# toutes plutôt que d'imposer une étape manuelle avant chaque compilation.
WIREGUARD_URL := https://download.wireguard.com/windows-client/wireguard-installer.exe
VCREDIST_URL := https://aka.ms/vs/17/release/vc_redist.x64.exe
installer/wireguard-installer.exe:
@echo " ⬇️ Téléchargement de l'installeur WireGuard…"
@curl -L --fail -o $@ $(WIREGUARD_URL)
installer/VC_redist.x64.exe:
@echo " ⬇️ Téléchargement du Visual C++ Redistributable…"
@curl -L --fail -o $@ $(VCREDIST_URL)
installer-deps: installer/wireguard-installer.exe installer/VC_redist.x64.exe
@echo " ✅ Prérequis de l'installeur prêts dans installer/"
# ── Installation de Python dans Wine ─────────────────────────────────────────
WINE_PY_VER := 3.11.9
WINE_PY_URL := https://www.python.org/ftp/python/$(WINE_PY_VER)/python-$(WINE_PY_VER)-amd64.exe
@@ -272,6 +293,7 @@ help:
@echo " make install Installe les dépendances "
@echo " make linux Binaire Linux (onefile) "
@echo " make windows Binaire Windows (Wine) "
@echo " make installer-deps Prérequis wgsecure.iss "
@echo " make release Linux + nommage release "
@echo " make version Affiche la version "
@echo " make changelog Dernière entrée changelog"