Compare commits

...

2 Commits

Author SHA1 Message Date
345171f035 Améliorations 2026-03-24 20:40:28 +01:00
6863fbad98 v0.5.8 - Ajout icone
Changements :
- Icone affichee dans le coin haut gauche du header de la GUI
- Icone de fenetre et taskbar via iconphoto (icon.png)
- Icone de l'exe compilee depuis icon.png -> icon.ico (Pillow, multi-tailles)
- build.bat mis a jour avec la conversion PNG -> ICO automatique

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 20:39:52 +01:00
7 changed files with 32 additions and 4 deletions

View File

@@ -8,7 +8,9 @@
"Bash(pyinstaller --onefile --console --name \"GitUpdateChecker\" --icon=NONE git_updater.py)",
"Bash(python -m PyInstaller --onefile --console --name \"GitUpdateChecker\" --icon=NONE git_updater.py)",
"Bash(cmd /c build.bat)",
"Bash(pyinstaller --onefile --noconsole --name \"GitUpdateChecker\" --icon=NONE git_updater.py)"
"Bash(pyinstaller --onefile --noconsole --name \"GitUpdateChecker\" --icon=NONE git_updater.py)",
"Bash(python -c \"from PIL import Image; img = Image.open\\(''icon.png''\\); img.save\\(''icon.ico'', format=''ICO'', sizes=[\\(256,256\\),\\(128,128\\),\\(64,64\\),\\(32,32\\),\\(16,16\\)]\\)\")",
"Bash(pyinstaller --onefile --noconsole --name \"GitUpdateChecker\" --icon=icon.ico git_updater.py)"
]
}
}

Binary file not shown.

View File

@@ -19,10 +19,13 @@ if errorlevel 1 (
pip install pyinstaller
)
echo [*] Conversion icon.png -> icon.ico...
python -c "from PIL import Image; img = Image.open('icon.png'); img.save('icon.ico', format='ICO', sizes=[(256,256),(128,128),(64,64),(32,32),(16,16)])"
echo [*] Compilation en cours...
echo.
pyinstaller --onefile --noconsole --name "GitUpdateChecker" --icon=NONE git_updater.py
pyinstaller --onefile --noconsole --name "GitUpdateChecker" --icon=icon.ico git_updater.py
echo.
if exist "dist\GitUpdateChecker.exe" (

View File

@@ -5,7 +5,7 @@ Accès lecture seule uniquement (fetch/pull/checkout, jamais de push).
Tous les chemins sont relatifs à l'emplacement de l'exécutable.
"""
VERSION = "0.5.7"
VERSION = "0.5.8"
import subprocess
import sys
@@ -484,6 +484,16 @@ class App(tk.Tk):
self.repos_config = load_repos()
self.repo_results = []
# Icône de la fenêtre (barre de titre + taskbar)
self._app_icon = None
icon_path = get_exe_dir() / "icon.png"
if icon_path.exists():
try:
self._app_icon = tk.PhotoImage(file=str(icon_path))
self.iconphoto(True, self._app_icon)
except Exception:
self._app_icon = None
log.info(f"=== Demarrage Git Update Checker v{VERSION} ===")
self._cleanup_old_exe()
self._build_ui()
@@ -524,6 +534,19 @@ class App(tk.Tk):
# Header
header = ttk.Frame(self)
header.pack(fill="x", padx=15, pady=(15, 5))
# Icône dans le coin haut gauche (redimensionnée à 32x32)
if self._app_icon:
try:
icon_small = tk.PhotoImage(file=str(get_exe_dir() / "icon.png")).subsample(
max(1, self._app_icon.width() // 32),
max(1, self._app_icon.height() // 32),
)
self._icon_small = icon_small # garder la référence
ttk.Label(header, image=icon_small, style="TLabel").pack(side="left", padx=(0, 8))
except Exception:
pass
ttk.Label(header, text=f"Git Update Checker v{VERSION}", style="Title.TLabel").pack(side="left")
self.status_label = ttk.Label(header, text="Verification en cours...", style="Status.TLabel")
self.status_label.pack(side="right")

BIN
icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 944 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -1 +1 @@
0.5.7
0.5.8