Compilation .exe PyInstaller + fix chemins resources

- L'installation compile maintenant un vrai .exe autonome
- Les raccourcis Bureau/Menu Demarrer pointent vers le .exe
- Support PyInstaller pour les chemins resources (logo, icone)
- La mise a jour recompile aussi le .exe
- Fallback lanceur .vbs si compilation echoue

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jules
2026-03-20 11:24:12 +01:00
parent 5bd4a18660
commit 785a7d183a
3 changed files with 104 additions and 38 deletions

View File

@@ -38,9 +38,10 @@ class MainWindow(QMainWindow):
self.setMinimumSize(1000, 700)
# Icone de la fenetre
import sys as _sys
from PyQt6.QtGui import QIcon
icon_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
"resources", "logo.png")
_base = _sys._MEIPASS if getattr(_sys, 'frozen', False) else os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
icon_path = os.path.join(_base, "resources", "logo.png")
if os.path.exists(icon_path):
self.setWindowIcon(QIcon(icon_path))
self._current_file = None
@@ -349,8 +350,9 @@ class MainWindow(QMainWindow):
# Logo
logo_label = QLabel()
logo_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
"resources", "logo.png")
import sys as _sys
_base = _sys._MEIPASS if getattr(_sys, 'frozen', False) else os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
logo_path = os.path.join(_base, "resources", "logo.png")
if os.path.exists(logo_path):
pixmap = QPixmap(logo_path).scaled(120, 120, Qt.AspectRatioMode.KeepAspectRatio,
Qt.TransformationMode.SmoothTransformation)