mirror of
https://github.com/InstanceBrick/nightcap.git
synced 2026-10-21 22:01:07 +02:00
Rename the desktop entry, metainfo, icons, Flatpak manifest, and SDL app identity so Nightcap installs side by side with upstream. Build a signed Flatpak on v* tags, publish the OSTree repo and landing page to GitHub Pages, and attach the bundle to the release. Release creation tolerates the AppImage and Flatpak workflows racing on the same tag.
28 lines
1.0 KiB
Bash
Executable File
28 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Modified by vii from komaruworld/mocktail. See README "About this fork".
|
|
# Copyright 2026 Mocktail Project Authors
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -euo pipefail
|
|
|
|
readonly project_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
readonly source_icon="${project_root}/packaging/io.github.CoderDayton.nightcap.svg"
|
|
readonly output_root="${project_root}/packaging/icons/hicolor"
|
|
readonly icon_name="io.github.CoderDayton.nightcap.png"
|
|
readonly icon_sizes=(16 22 24 32 36 48 64 72 96 128 192 256 512)
|
|
|
|
if ! command -v magick >/dev/null 2>&1; then
|
|
printf 'ImageMagick 7 (magick) is required to regenerate desktop icons\n' >&2
|
|
exit 1
|
|
fi
|
|
|
|
for size in "${icon_sizes[@]}"; do
|
|
destination="${output_root}/${size}x${size}/apps/${icon_name}"
|
|
mkdir -p -- "$(dirname -- "${destination}")"
|
|
magick -background none "${source_icon}" -alpha on -filter Lanczos \
|
|
-resize "${size}x${size}" -depth 8 -strip "PNG32:${destination}"
|
|
done
|
|
|
|
printf 'Generated %d hicolor icons from %s\n' \
|
|
"${#icon_sizes[@]}" "${source_icon}"
|