mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-19 04:40:32 -05:00
94fc19f6f2
- 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>
24 lines
717 B
Batchfile
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%
|