c701f0f480
Money path: - Scoped, unbonded Nym exit for the money-path relay: the wallet dials a relay operator's co-located exit over a MixnetStream (src/nym/streamexit.rs) which pipes to its one relay; hostname-validated TLS end to end, no public DNS. Anchor + fallback (never pin-only): any exit failure degrades to the smolmix tunnel. relay.goblin.st's exit address is pinned in the relay pool (src/nostr/pool.rs) and the maintainer gist so it bootstraps offline. - STREAM_SETTLE bridges the open-before-accept gap so the first TLS byte is not dropped into a stalled handshake. - Verified end to end: two wallets complete a real gift-wrapped Grin payment through relay.goblin.st over the exit, finalized + posted on mainnet (src/wallet/e2e.rs, ignored live test). Encryption: - Adopt NIP-44 v3 for the NIP-17 gift-wrap path (G4): src/nostr/wrapv3.rs, nip44 path dep; v3<->v3 and v3->v2 interop. Also: mix-DNS (src/nym/dns.rs), full localization pass, GUI polish, avatar-ring example, Android icon/script updates, GRIM deviation notes, xrelay + connect-timing tests.
58 lines
2.7 KiB
Bash
Executable File
58 lines
2.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Regenerate EVERY platform's app icon from two canonical sources:
|
|
# img/goblin-icon.png the gradient app icon (yellow gradient + black mascot)
|
|
# img/goblin-mark-black.svg the black mascot mark, vector, transparent bg
|
|
# (mirror of site/assets/goblin-mark-black.svg)
|
|
#
|
|
# Square icons (desktop window, Linux AppImage, Android launcher, Windows .ico,
|
|
# macOS .icns) come from the gradient PNG. The Android *adaptive* foreground is
|
|
# the black mascot on transparency, composited by the OS over the yellow
|
|
# background color (res/values/ic_launcher_background.xml = #FFD60A) — which
|
|
# reproduces the gradient icon's look.
|
|
#
|
|
# Requires ImageMagick (magick) and python3 (for the .icns container).
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
ICON=img/goblin-icon.png
|
|
MARK=img/goblin-mark-black.svg
|
|
RES=android/app/src/main/res
|
|
|
|
# --- Desktop window icon (egui, src/main.rs) + Linux AppImage AppDir icon ---
|
|
magick "$ICON" -resize 256x256 PNG32:img/icon.png
|
|
cp img/icon.png linux/Goblin.AppDir/goblin.png
|
|
|
|
# --- Android launcher icons (gradient square) + adaptive foreground (mascot) ---
|
|
declare -A SIZES=( [mdpi]=48 [hdpi]=72 [xhdpi]=96 [xxhdpi]=144 [xxxhdpi]=192 )
|
|
declare -A FG_SIZES=( [mdpi]=108 [hdpi]=162 [xhdpi]=216 [xxhdpi]=324 [xxxhdpi]=432 )
|
|
for d in mdpi hdpi xhdpi xxhdpi xxxhdpi; do
|
|
s=${SIZES[$d]}; fg=${FG_SIZES[$d]}
|
|
# Mascot fills ~60% of the adaptive canvas — inside the ~61% safe zone, so no
|
|
# launcher mask (circle/squircle) ever clips it.
|
|
art=$(( fg * 60 / 100 ))
|
|
magick "$ICON" -resize "${s}x${s}" PNG32:"$RES/mipmap-$d/ic_launcher.png"
|
|
magick "$ICON" -resize "${s}x${s}" PNG32:"$RES/mipmap-$d/ic_launcher_round.png"
|
|
magick -background none "$MARK" -resize "${art}x${art}" \
|
|
-gravity center -extent "${fg}x${fg}" PNG32:"$RES/mipmap-$d/ic_launcher_foreground.png"
|
|
done
|
|
|
|
# --- Android notification (status-bar) icon: white-on-transparent mascot ---
|
|
# Android renders ic_stat_name as an alpha-only silhouette, so the RGB channels
|
|
# are forced to pure white; ~90% of the canvas matches the old asset's padding.
|
|
declare -A STAT_SIZES=( [mdpi]=24 [hdpi]=36 [xhdpi]=48 [xxhdpi]=72 [xxxhdpi]=96 )
|
|
for d in mdpi hdpi xhdpi xxhdpi xxxhdpi; do
|
|
s=${STAT_SIZES[$d]}
|
|
art=$(( s * 9 / 10 ))
|
|
magick -background none img/goblin-logo2.svg -resize "${art}x${art}" \
|
|
-gravity center -extent "${s}x${s}" \
|
|
-channel RGB -evaluate set 100% +channel PNG32:"$RES/drawable-$d/ic_stat_name.png"
|
|
done
|
|
|
|
# --- Windows installer + file-type icon (WiX wix/Product.ico) ---
|
|
magick "$ICON" -define icon:auto-resize=256,128,64,48,32,24,16 wix/Product.ico
|
|
|
|
# --- macOS app bundle icon (Goblin.app) ---
|
|
python3 scripts/make-icns.py "$ICON" macos/Goblin.app/Contents/Resources/AppIcon.icns
|
|
|
|
echo "icons generated from $ICON + $MARK"
|