AppStream compose in the Flatpak build failed with "Unrecognized image file format" for the new scalable icon, so v0.1.5 was never published. Image loaders recognise an SVG by finding "<svg" within the first 256 bytes, and the icon's descriptive header comment pushed the tag past that. The comment now lives inside the element; the icon renders pixel-identically. icons/CMakeLists.txt now fails configuration if the tag drifts past 256 bytes again. Verified with the KDE 6.10 runtime's appstreamcli-compose, which now succeeds and emits all catalog icons. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01BxDf7HqD1xPnsZP8wt3NTk
27 lines
1.2 KiB
CMake
27 lines
1.2 KiB
CMake
# SPDX-FileCopyrightText: 2026 ToServeTheKing <[email protected]>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# Named after the app ID, as the desktop file, the window icon and Flatpak
|
|
# (which only exports icons prefixed with the app ID) all expect.
|
|
# Image loaders (gdk-pixbuf, and so AppStream compose in the Flatpak build)
|
|
# recognise an SVG by finding "<svg" in its first 256 bytes; past that the
|
|
# file is "Unrecognized image file format" and the Flatpak build fails.
|
|
file(READ sc-apps-io.github.toservetheking.Kareer.svg _kareer_svg_head LIMIT 256)
|
|
if(NOT _kareer_svg_head MATCHES "<svg")
|
|
message(FATAL_ERROR "icons/sc-apps-io.github.toservetheking.Kareer.svg: the <svg> tag must start within the first 256 bytes; move comments inside the element.")
|
|
endif()
|
|
|
|
ecm_install_icons(ICONS
|
|
sc-apps-io.github.toservetheking.Kareer.svg
|
|
128-apps-io.github.toservetheking.Kareer.png
|
|
64-apps-io.github.toservetheking.Kareer.png
|
|
48-apps-io.github.toservetheking.Kareer.png
|
|
44-apps-io.github.toservetheking.Kareer.png
|
|
32-apps-io.github.toservetheking.Kareer.png
|
|
22-apps-io.github.toservetheking.Kareer.png
|
|
16-apps-io.github.toservetheking.Kareer.png
|
|
DESTINATION ${KDE_INSTALL_ICONDIR}
|
|
THEME hicolor
|
|
)
|