videogen/scripts/generate-app-icons.sh
caelum0x d56639a594
Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

56 lines
2.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Derive platform assets from the selected, immutable Menivor source artwork.
# Requires ImageMagick plus the repository Python/Pillow environment.
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo_dir="$(cd "${script_dir}/.." && pwd)"
source_icon="${repo_dir}/brand/out/menivor/app-icon-source.png"
source_foreground="${repo_dir}/brand/out/menivor/app-icon-foreground-clean.png"
mobile_dir="${repo_dir}/apps/mobile/assets"
desktop_macos_dir="${repo_dir}/apps/desktop/packaging/macos"
desktop_windows_dir="${repo_dir}/apps/desktop/packaging/windows"
desktop_linux_dir="${repo_dir}/apps/desktop/packaging/linux"
icon_python="${repo_dir}/.venv/bin/python"
for required in magick; do
if ! command -v "${required}" >/dev/null 2>&1; then
echo "missing required icon tool: ${required}" >&2
exit 1
fi
done
if [[ ! -x "${icon_python}" ]]; then
echo "missing repository Python environment: ${icon_python}" >&2
exit 1
fi
for source in "${source_icon}" "${source_foreground}"; do
if [[ ! -s "${source}" ]]; then
echo "missing Menivor icon source: ${source}" >&2
exit 1
fi
done
mkdir -p \
"${mobile_dir}" \
"${desktop_macos_dir}" \
"${desktop_windows_dir}" \
"${desktop_linux_dir}"
magick "${source_icon}" -resize 1024x1024! -strip "${mobile_dir}/icon.png"
# The reviewed clean foreground is already the canonical 1024px PNG; byte-copy
# it so alpha-bearing outputs remain reproducible (some ImageMagick builds add
# non-deterministic PNG chunks while re-encoding transparency).
cp "${source_foreground}" "${mobile_dir}/adaptive-icon.png"
cp "${source_foreground}" "${mobile_dir}/splash-icon.png"
magick "${source_icon}" -resize 48x48! -strip "${mobile_dir}/favicon.png"
magick "${source_icon}" -resize 1024x1024! -strip \
"${desktop_macos_dir}/Menivor-1024.png"
magick "${source_icon}" -resize 512x512! -strip \
"${desktop_linux_dir}/menivor.png"
"${icon_python}" "${repo_dir}/scripts/build-icon-containers.py" \
"${source_icon}" \
"${desktop_macos_dir}/Menivor.icns" \
"${desktop_windows_dir}/Menivor.ico"