Files
Lanceur-Geco/build.bat
zogzog 959298fc2d v0.6.6 - Fix icone header : icon_small.png pre-generee
Changements :
- icon_small.png (25x32) generee au build via Pillow LANCZOS, plus de subsample au runtime
- Chargement direct de icon_small.png dans le header, sans calcul de redimensionnement
- build.bat genere automatiquement icon_small.png avant la compilation
- _find_icon() generalisee pour chercher n'importe quel fichier icone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 22:32:49 +01:00

48 lines
1.6 KiB
Batchfile

@echo off
echo ========================================
echo Build Git Update Checker (.exe)
echo ========================================
echo.
:: Vérifier que Python est installé
python --version >nul 2>&1
if errorlevel 1 (
echo [ERREUR] Python n'est pas installe ou pas dans le PATH.
pause
exit /b 1
)
:: Installer PyInstaller si nécessaire
pip show pyinstaller >nul 2>&1
if errorlevel 1 (
echo [*] Installation de PyInstaller...
pip install pyinstaller
)
echo [*] Conversion icon.png -> icon.ico + icon_small.png (32x32)...
python -c "from PIL import Image; img = Image.open('icon.png').convert('RGBA'); img.save('icon.ico', format='ICO', sizes=[(256,256),(128,128),(64,64),(32,32),(16,16)]); thumb = img.copy(); thumb.thumbnail((32,32), Image.LANCZOS); thumb.save('icon_small.png')"
echo [*] Compilation en cours...
echo.
pyinstaller --onedir --noconsole --name "GitUpdateChecker" --icon=icon.ico --add-data "icon.png:." --add-data "icon_small.png:." -y git_updater.py
echo.
if exist "dist\GitUpdateChecker\GitUpdateChecker.exe" (
echo [*] Copie de GitUpdateChecker.exe a la racine...
copy /Y "dist\GitUpdateChecker\GitUpdateChecker.exe" "GitUpdateChecker.exe" >nul
echo [*] Copie de _internal\ a la racine...
if exist "_internal" rmdir /s /q "_internal"
xcopy /E /I /Q "dist\GitUpdateChecker\_internal" "_internal"
echo.
echo [OK] Deploiement pret. Committer GitUpdateChecker.exe + _internal\
echo _internal\ ne change que si la version de Python change.
) else (
echo [ERREUR] La compilation a echoue.
)
echo.
pause