diff --git a/droid/app/src/main/cpp/CMakeLists.txt b/droid/app/src/main/cpp/CMakeLists.txt index 26cfc715e..bc2ece7f1 100644 --- a/droid/app/src/main/cpp/CMakeLists.txt +++ b/droid/app/src/main/cpp/CMakeLists.txt @@ -239,7 +239,7 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS set(APP_EMBEDDED_INPUTS apps/publishers.json - assets/app/icon.png + assets/app/icon.webp ) set(APP_EMBEDDED_DEPS) foreach(asset ${APP_EMBEDDED_INPUTS}) diff --git a/mk/web.mk b/mk/web.mk index dc2bc92dd..d5c68a325 100644 --- a/mk/web.mk +++ b/mk/web.mk @@ -36,7 +36,7 @@ web-tools-check: sync-web-icons: $(KRYON_SYNC_ICONS) sh $(KRYON_SYNC_ICONS) web-assets/icons $(WEB_SHARED_ICON_SHEETS) - cp assets/app/icon.png web-assets/icons/$(APP_NAME).png + magick assets/app/icon.webp web-assets/icons/$(APP_NAME).png $(WEB_JS_TARGET): Makefile $(WEB_SRC) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) $(WEB_GEN_STAMP) $(WEB_LIBOQS_A) $(WEB_HOST_JS) web-tools-check | $(WEB_DIST_DIR) $(WEB_JS_TARGET): | zi-check diff --git a/scripts/generate-icons.sh b/scripts/generate-icons.sh index 339a1def3..e2290162c 100755 --- a/scripts/generate-icons.sh +++ b/scripts/generate-icons.sh @@ -73,7 +73,7 @@ generate_transparent() { magick "$ARTWORK" -filter Lanczos -resize "${logo_size}x${logo_size}" \ -background none -gravity center -extent "${size}x${size}" \ -strip +set date:create +set date:modify +set date:timestamp \ - -define png:exclude-chunk=time "$output" + -define png:exclude-chunk=time -define webp:lossless=true "$output" } generate_maskable() { @@ -82,7 +82,7 @@ generate_maskable() { generate_transparent "$size" "$WORK_DIR/maskable.png" "$logo_size" magick "$WORK_DIR/maskable.png" -background "$ICON_BACKGROUND" \ -alpha remove -alpha off -strip \ - -define png:exclude-chunk=time "$output" + -define png:exclude-chunk=time -define webp:lossless=true "$output" } write_android_background() { @@ -145,7 +145,7 @@ echo "✅ Windows icon generated" echo "🖥️ Generating app runtime icon..." # Runtime desktop window icon embedded into the native app binary. -generate_transparent 64 "$PROJECT_ROOT/assets/app/icon.png" +generate_transparent 64 "$PROJECT_ROOT/assets/app/icon.webp" echo "✅ App runtime icon generated" @@ -195,7 +195,7 @@ echo echo "Generated icons:" echo " 📱 Android: mipmap PNGs + adaptive drawable foreground/background" echo " 🪟 Windows: windows/inbe.ico (256, 192, 48, 32, 16 resolutions)" -echo " 🖥️ App: assets/app/icon.png (64x64 transparent runtime icon)" +echo " 🖥️ App: assets/app/icon.webp (64x64 transparent runtime icon)" echo " 🐧 Linux: packaging/linux/appimage/inbe.png + snap/gui/inbe.png (256x256)" echo " 🏪 Store: fastlane/metadata/android/en-US/images/icon.png (512x512)" echo " 🌐 Chrome: packaging/chrome-web-store/icons/ (16, 32, 48, 128)" diff --git a/tests/package_assets_test.py b/tests/package_assets_test.py index 9a2f58e7f..783afa354 100644 --- a/tests/package_assets_test.py +++ b/tests/package_assets_test.py @@ -126,5 +126,5 @@ for index, original in enumerate(paths): assert not any('/characters/' in name or name.endswith('/course.zip') for name in practices) native = (ROOT / 'build/obj/inbe_embedded_assets.c').read_text() entries = set(re.findall(r'\{(?:\(uint8_t \*\))?"([^"\n]+)"', native)) -assert entries == {'assets/app/icon.png', 'apps/publishers.json', 'inbe.zx', 'apps.zx'}, entries +assert entries == {'assets/app/icon.webp', 'apps/publishers.json', 'inbe.zx', 'apps.zx'}, entries print(f'Package assets: {len(root)} root resources, {len(practices)} Practice resources; exact image/font/locale ownership passed')