Files
TimeTracker/scripts/generate-mobile-icon.bat
T
Dries Peeters 94fc19f6f2 Build: add icon generation to CI and scripts, bump version to 4.16.0
- Run app icon and launcher icon generation in build-mobile workflow
- Add generate-mobile-icon scripts (Python/Pillow, ImageMagick, Inkscape)
- BUILD.md: document icon requirements and troubleshooting
- setup.py: version 4.16.0

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:51:13 +01:00

24 lines
717 B
Batchfile

@echo off
REM Generate mobile app icon (app_icon.png) from SVG or Python fallback.
setlocal
set SCRIPT_DIR=%~dp0
set PROJECT_ROOT=%SCRIPT_DIR%..
set SVG=%PROJECT_ROOT%\app\static\images\timetracker-logo-icon.svg
set OUT=%PROJECT_ROOT%\mobile\assets\icon\app_icon.png
if not exist "%PROJECT_ROOT%\mobile\assets\icon" mkdir "%PROJECT_ROOT%\mobile\assets\icon"
REM Try ImageMagick first (exact SVG export)
where magick >nul 2>&1
if %errorlevel% equ 0 (
magick "%SVG%" -resize 1024x1024 "%OUT%"
if %errorlevel% equ 0 (
echo Generated app_icon.png with ImageMagick
exit /b 0
)
)
REM Fallback: Python script (requires Pillow)
python "%SCRIPT_DIR%generate-mobile-icon.py"
exit /b %errorlevel%