Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ jobs:
cp build/linux/install.sh dist-package/
cp build/linux/uninstall.sh dist-package/
cp build/linux/aerion.desktop dist-package/io.github.hkdb.Aerion.desktop
# 256 at tarball root keeps AUR aerion-bin working; sized copies
# live under icons/ so install.sh can fill hicolor 32–256 (#395).
cp build/linux/aerion.png dist-package/io.github.hkdb.Aerion.png
for sz in 32 48 64 128 256; do # keep in sync with ICON_SIZES in Makefile / install.sh
mkdir -p dist-package/icons/${sz}x${sz}
cp build/linux/icons/${sz}x${sz}/io.github.hkdb.Aerion.png \
dist-package/icons/${sz}x${sz}/
done

if [ "${{ matrix.arch }}" = "amd64" ]; then
tar czf aerion-linux-amd64.tar.gz -C dist-package .
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ BUILD_TAGS := webkit2_41
# Installation directories (can be overridden)
PREFIX ?= /usr/local
DESTDIR ?=
# hicolor PNG sizes shipped on Linux (#395). Keep in sync with
# build/linux/install.sh ICON_SIZES and .github/workflows/release.yml.
ICON_SIZES ?= 32 48 64 128 256

# Platform detection
UNAME_S := $(shell uname -s)
Expand Down Expand Up @@ -193,7 +196,10 @@ endif
install-linux: build
@echo "Installing Aerion to $(DESTDIR)$(PREFIX)..."
install -Dm755 build/bin/aerion "$(DESTDIR)$(PREFIX)/bin/aerion"
install -Dm644 build/appicon.png "$(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/io.github.hkdb.Aerion.png"
@for sz in $(ICON_SIZES); do \
install -Dm644 "build/linux/icons/$${sz}x$${sz}/io.github.hkdb.Aerion.png" \
"$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${sz}x$${sz}/apps/io.github.hkdb.Aerion.png"; \
done
install -Dm644 build/linux/aerion.desktop "$(DESTDIR)$(PREFIX)/share/applications/io.github.hkdb.Aerion.desktop"
@echo "Updating icon cache..."
-gtk-update-icon-cache -f -t "$(DESTDIR)$(PREFIX)/share/icons/hicolor" 2>/dev/null || true
Expand All @@ -208,7 +214,9 @@ install-linux: build
uninstall-linux:
@echo "Uninstalling Aerion from $(DESTDIR)$(PREFIX)..."
rm -f "$(DESTDIR)$(PREFIX)/bin/aerion"
rm -f "$(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/io.github.hkdb.Aerion.png"
@for sz in $(ICON_SIZES); do \
rm -f "$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${sz}x$${sz}/apps/io.github.hkdb.Aerion.png"; \
done
rm -f "$(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/aerion.png" # Remove old name if it exists
rm -f "$(DESTDIR)$(PREFIX)/share/applications/io.github.hkdb.Aerion.desktop"
rm -f "$(DESTDIR)$(PREFIX)/share/applications/aerion.desktop" # Remove old name if it exists
Expand Down
Binary file modified build/appicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions build/flatpak/flathub/io.github.hkdb.Aerion-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ modules:
- desktop-file-edit --set-key=Icon --set-value=io.github.hkdb.Aerion /app/share/applications/io.github.hkdb.Aerion.desktop
- desktop-file-edit --set-key=Exec --set-value=aerion /app/share/applications/io.github.hkdb.Aerion.desktop

# Install icon with correct app ID
- install -Dm644 build/appicon.png /app/share/icons/hicolor/256x256/apps/io.github.hkdb.Aerion.png
# Install themed icons (32–256). 256-only is skipped by hicolor MinSize=64 (#395).
- |
for sz in 32 48 64 128 256; do
install -Dm644 "build/linux/icons/${sz}x${sz}/io.github.hkdb.Aerion.png" \
"/app/share/icons/hicolor/${sz}x${sz}/apps/io.github.hkdb.Aerion.png"
done

# Install metainfo (AppStream metadata)
- install -Dm644 build/flatpak/io.github.hkdb.Aerion.metainfo.xml /app/share/metainfo/io.github.hkdb.Aerion.metainfo.xml
Expand Down
8 changes: 6 additions & 2 deletions build/flatpak/flathub/io.github.hkdb.Aerion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ modules:
# Install desktop file with correct app ID
- install -Dm644 build/linux/aerion.desktop /app/share/applications/io.github.hkdb.Aerion.desktop

# Install icon with correct app ID
- install -Dm644 build/appicon.png /app/share/icons/hicolor/256x256/apps/io.github.hkdb.Aerion.png
# Install themed icons (32–256). 256-only is skipped by hicolor MinSize=64 (#395).
- |
for sz in 32 48 64 128 256; do
install -Dm644 "build/linux/icons/${sz}x${sz}/io.github.hkdb.Aerion.png" \
"/app/share/icons/hicolor/${sz}x${sz}/apps/io.github.hkdb.Aerion.png"
done

# Install metainfo (AppStream metadata)
- install -Dm644 build/flatpak/io.github.hkdb.Aerion.metainfo.xml /app/share/metainfo/io.github.hkdb.Aerion.metainfo.xml
Expand Down
8 changes: 6 additions & 2 deletions build/flatpak/io.github.hkdb.Aerion-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ modules:
- desktop-file-edit --set-key=Icon --set-value=io.github.hkdb.Aerion /app/share/applications/io.github.hkdb.Aerion.desktop
- desktop-file-edit --set-key=Exec --set-value='aerion %U' /app/share/applications/io.github.hkdb.Aerion.desktop

# Install icon
- install -Dm644 build/appicon.png /app/share/icons/hicolor/256x256/apps/io.github.hkdb.Aerion.png
# Install themed icons (32–256). 256-only is skipped by hicolor MinSize=64 (#395).
- |
for sz in 32 48 64 128 256; do
install -Dm644 "build/linux/icons/${sz}x${sz}/io.github.hkdb.Aerion.png" \
"/app/share/icons/hicolor/${sz}x${sz}/apps/io.github.hkdb.Aerion.png"
done

# Install metainfo (AppStream metadata)
- install -Dm644 build/flatpak/io.github.hkdb.Aerion.metainfo.xml /app/share/metainfo/io.github.hkdb.Aerion.metainfo.xml
Expand Down
Binary file modified build/linux/aerion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/linux/icons/32x32/io.github.hkdb.Aerion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/linux/icons/48x48/io.github.hkdb.Aerion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/linux/icons/64x64/io.github.hkdb.Aerion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 41 additions & 15 deletions build/linux/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,36 @@ if [[ ! -f "io.github.hkdb.Aerion.desktop" ]]; then
exit 1
fi

# Check if icon exists
if [[ ! -f "io.github.hkdb.Aerion.png" ]]; then
print_error "io.github.hkdb.Aerion.png icon not found in current directory"
echo "Please ensure the icon file is in the same directory as this script"
# hicolor sizes launchers actually request. 256-only is skipped by
# [256x256/apps] MinSize=64 when the lookup asks for ~48px (see #395).
ICON_SIZES=(32 48 64 128 256)

icon_source_for_size() {
local sz="$1"
local sized="icons/${sz}x${sz}/io.github.hkdb.Aerion.png"
if [[ -f "$sized" ]]; then
printf '%s\n' "$sized"
return 0
fi
if [[ "$sz" == "256" && -f "io.github.hkdb.Aerion.png" ]]; then
printf '%s\n' "io.github.hkdb.Aerion.png"
return 0
fi
return 1
}

if [[ -d icons ]]; then
for sz in "${ICON_SIZES[@]}"; do
if [[ ! -f "icons/${sz}x${sz}/io.github.hkdb.Aerion.png" ]]; then
print_error "missing icons/${sz}x${sz}/io.github.hkdb.Aerion.png"
exit 1
fi
done
fi

if ! icon_source_for_size 256 >/dev/null; then
print_error "Aerion icon not found (io.github.hkdb.Aerion.png or icons/256x256/)"
echo "Please run this script from the directory containing the release files"
exit 1
fi

Expand All @@ -78,15 +104,15 @@ while true; do
INSTALL_TYPE="system"
BIN_DIR="/usr/local/bin"
APPS_DIR="/usr/share/applications"
ICONS_DIR="/usr/share/icons/hicolor/256x256/apps"
HICOLOR_DIR="/usr/share/icons/hicolor"
NEEDS_SUDO=true
break
;;
2)
INSTALL_TYPE="user"
BIN_DIR="$HOME/.local/bin"
APPS_DIR="$HOME/.local/share/applications"
ICONS_DIR="$HOME/.local/share/icons/hicolor/256x256/apps"
HICOLOR_DIR="$HOME/.local/share/icons/hicolor"
NEEDS_SUDO=false
break
;;
Expand Down Expand Up @@ -121,7 +147,6 @@ fi
print_info "Creating directories..."
run_cmd mkdir -p "$BIN_DIR"
run_cmd mkdir -p "$APPS_DIR"
run_cmd mkdir -p "$ICONS_DIR"

# Install binary
print_info "Installing binary to $BIN_DIR..."
Expand All @@ -131,17 +156,18 @@ run_cmd install -Dm755 aerion "$BIN_DIR/aerion"
print_info "Installing desktop file to $APPS_DIR..."
run_cmd install -Dm644 io.github.hkdb.Aerion.desktop "$APPS_DIR/io.github.hkdb.Aerion.desktop"

# Install icon
print_info "Installing icon to $ICONS_DIR..."
run_cmd install -Dm644 io.github.hkdb.Aerion.png "$ICONS_DIR/io.github.hkdb.Aerion.png"
# Install themed icons (sized PNGs + 256 fallback for older tarballs).
# install -D creates the hicolor/<size>/apps directory.
print_info "Installing icons to $HICOLOR_DIR..."
for sz in "${ICON_SIZES[@]}"; do
if src=$(icon_source_for_size "$sz"); then
run_cmd install -Dm644 "$src" "$HICOLOR_DIR/${sz}x${sz}/apps/io.github.hkdb.Aerion.png"
fi
done

# Update icon cache
print_info "Updating icon cache..."
if [[ "$INSTALL_TYPE" == "system" ]]; then
run_cmd gtk-update-icon-cache -f -t /usr/share/icons/hicolor 2>/dev/null || true
else
gtk-update-icon-cache -f -t "$HOME/.local/share/icons/hicolor" 2>/dev/null || true
fi
run_cmd gtk-update-icon-cache -f -t "$HICOLOR_DIR" 2>/dev/null || true

# Update desktop database
print_info "Updating desktop database..."
Expand Down
25 changes: 11 additions & 14 deletions build/linux/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ while true; do
INSTALL_TYPE="system"
BIN_DIR="/usr/local/bin"
APPS_DIR="/usr/share/applications"
ICONS_DIR="/usr/share/icons/hicolor/256x256/apps"
HICOLOR_DIR="/usr/share/icons/hicolor"
NEEDS_SUDO=true
break
;;
2)
INSTALL_TYPE="user"
BIN_DIR="$HOME/.local/bin"
APPS_DIR="$HOME/.local/share/applications"
ICONS_DIR="$HOME/.local/share/icons/hicolor/256x256/apps"
HICOLOR_DIR="$HOME/.local/share/icons/hicolor"
NEEDS_SUDO=false
break
;;
Expand Down Expand Up @@ -136,13 +136,14 @@ if remove_file "$APPS_DIR/aerion.desktop.backup" "backup desktop file"; then
REMOVED_COUNT=$((REMOVED_COUNT + 1))
fi

# Remove icon
if remove_file "$ICONS_DIR/io.github.hkdb.Aerion.png" "icon"; then
REMOVED_COUNT=$((REMOVED_COUNT + 1))
fi

# Remove old icon name if it exists
if remove_file "$ICONS_DIR/aerion.png" "old icon"; then
# Remove themed icons (all shipped sizes + leftover 256-only / old name)
ICON_SIZES=(32 48 64 128 256)
for sz in "${ICON_SIZES[@]}"; do
if remove_file "$HICOLOR_DIR/${sz}x${sz}/apps/io.github.hkdb.Aerion.png" "icon (${sz}x${sz})"; then
REMOVED_COUNT=$((REMOVED_COUNT + 1))
fi
done
if remove_file "$HICOLOR_DIR/256x256/apps/aerion.png" "old icon"; then
REMOVED_COUNT=$((REMOVED_COUNT + 1))
fi

Expand All @@ -153,11 +154,7 @@ if [[ $REMOVED_COUNT -gt 0 ]]; then
print_info "Updating system caches..."

# Update icon cache
if [[ "$INSTALL_TYPE" == "system" ]]; then
run_cmd gtk-update-icon-cache -f -t /usr/share/icons/hicolor 2>/dev/null || true
else
gtk-update-icon-cache -f -t "$HOME/.local/share/icons/hicolor" 2>/dev/null || true
fi
run_cmd gtk-update-icon-cache -f -t "$HICOLOR_DIR" 2>/dev/null || true

# Update desktop database
if [[ "$INSTALL_TYPE" == "system" ]]; then
Expand Down