diff --git a/Makefile b/Makefile index 9ae7b20..079f7f8 100644 --- a/Makefile +++ b/Makefile @@ -75,16 +75,28 @@ linux: install icon @echo "" # ── Binaire Windows (via Wine + Python Windows) ────────────────────────────── +# Le hook PyQt6 de pyinstaller-hooks-contrib introspecte QLibraryInfo pour +# localiser Qt6/plugins/platforms au moment du build : sous Wine cette +# introspection échoue silencieusement, donc qwindows.dll n'est jamais copié +# et l'exe plante au lancement avec « no Qt platform plugin could be +# initialized ». On force sa copie via --add-data. +WINE_QT_PLUGINS := $(HOME)/.wine/drive_c/users/$(USER)/AppData/Local/Programs/Python/Python311/Lib/site-packages/PyQt6/Qt6/plugins + windows: icon @echo "" @echo " 🪟 Compilation Windows (Wine + PyInstaller)…" @echo "" @which wine > /dev/null 2>&1 \ || (echo " ❌ Wine non installé → sudo apt install wine"; exit 1) + @test -f "$(WINE_QT_PLUGINS)/platforms/qwindows.dll" \ + || (echo " ❌ qwindows.dll introuvable dans $(WINE_QT_PLUGINS)/platforms"; \ + echo " → Installez PyQt6 dans Wine avec : make setup-wine"; exit 1) @wine $(WINE_PYTHON) -m PyInstaller $(PI_OPTS) \ --onefile \ --windowed \ --icon=$(ICON) \ + --add-data "$(WINE_QT_PLUGINS)/platforms;PyQt6/Qt6/plugins/platforms" \ + --add-data "$(WINE_QT_PLUGINS)/styles;PyQt6/Qt6/plugins/styles" \ $(SRC) \ || (echo ""; \ echo " ❌ Échec : Python Windows introuvable dans Wine."; \