From 1179ae1f7d5193a42cc724193f2af8b34cb69c82 Mon Sep 17 00:00:00 2001 From: pepaskopec-blip Date: Wed, 16 Sep 2026 12:38:30 +0200 Subject: [PATCH] Fix AppImage icon size rejected by linuxdeploy. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the real 512×512 PNG instead of the 1024×1024 app-icon copied into the 512 path. Co-authored-by: Cursor --- Makefile | 13 ++++++++----- scripts/bundle-linux.sh | 9 +++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d9ec1ba..028f689 100644 --- a/Makefile +++ b/Makefile @@ -38,23 +38,26 @@ SRC = $(wildcard *.c) OBJ = $(SRC:.c=.o) ICON_SRC = assets/app-icon.png -ICON_DST = assets/icons/hicolor/512x512/apps/maturita.png +# Always use the real 512×512 asset — copying app-icon.png (1024×1024) breaks +# linuxdeploy, which rejects non-standard icon resolutions. +ICON_DST = share/icons/hicolor/512x512/apps/maturita.png +ICON_RUNTIME = assets/icons/hicolor/512x512/apps/maturita.png ICON_ICO = assets/app-icon.ico all: $(TARGET) -$(ICON_DST): $(ICON_SRC) +$(ICON_RUNTIME): $(ICON_DST) mkdir -p $(dir $@) - cp "$(ICON_SRC)" "$@" + cp "$(ICON_DST)" "$@" ifeq ($(OS),Windows_NT) $(RC_OBJ): maturita.rc $(ICON_ICO) $(WINDRES) maturita.rc -o $(RC_OBJ) -$(TARGET): $(SRC) $(ICON_DST) $(RC_OBJ) +$(TARGET): $(SRC) $(ICON_RUNTIME) $(RC_OBJ) $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(RC_OBJ) $(LIBS) else -$(TARGET): $(SRC) $(ICON_DST) +$(TARGET): $(SRC) $(ICON_RUNTIME) $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LIBS) endif diff --git a/scripts/bundle-linux.sh b/scripts/bundle-linux.sh index 4f2a15e..b8fc37c 100755 --- a/scripts/bundle-linux.sh +++ b/scripts/bundle-linux.sh @@ -19,7 +19,8 @@ esac OUT_NAME="maturita-linux-${ARCH}.AppImage" APPDIR="$ROOT/dist/AppDir" TOOLS="$ROOT/dist/tools" -ICON_DST="assets/icons/hicolor/512x512/apps/maturita.png" +# Real 512×512 PNG (assets/app-icon.png is 1024×1024 and linuxdeploy rejects it). +ICON_512="$ROOT/share/icons/hicolor/512x512/apps/maturita.png" echo "==> Building maturita" make -C "$ROOT" clean @@ -35,9 +36,9 @@ mkdir -p "$APPDIR/usr/bin" \ cp -f "$ROOT/maturita" "$APPDIR/usr/bin/maturita" cp -f "$ROOT/style.css" "$APPDIR/style.css" -cp -f "$ROOT/$ICON_DST" "$APPDIR/icons/hicolor/512x512/apps/maturita.png" -cp -f "$ROOT/$ICON_DST" "$APPDIR/usr/share/icons/hicolor/512x512/apps/maturita.png" -cp -f "$ROOT/$ICON_DST" "$APPDIR/maturita.png" +cp -f "$ICON_512" "$APPDIR/icons/hicolor/512x512/apps/maturita.png" +cp -f "$ICON_512" "$APPDIR/usr/share/icons/hicolor/512x512/apps/maturita.png" +cp -f "$ICON_512" "$APPDIR/maturita.png" cp -R "$ROOT/share/." "$APPDIR/share/" cp -R "$ROOT/share/." "$APPDIR/usr/share/" cp -f "$ROOT/share/applications/org.maturita.Maturita.desktop" \