- scripts/build-wx-macos.sh: static, monolithic, universal (arm64 + x86_64) wxOSX/Cocoa 3.3.3 from the vendored tree, with wx's bundled image/zlib/regex/expat so the app links only system frameworks. Minimum macOS 11.0: current SDKs' libc++ supports nothing older. - scripts/build-gui-macos.sh: builds both Rust targets against that prefix and merges them with lipo. - ci/package-macos.py: "Alkane Toolkit.app" (Info.plist, icon, local network usage string), ad-hoc signed, zipped with ditto as alkane-toolkit-vX.Y.Z-macos-universal.zip with LICENSE and README. - crates/alkane-gui/macos: app icon (.icns) from the same glyph as the Windows icon, plus the script that makes it. - wx-rs patch 0009: macOS goes through wx-config (drops the universal -arch flags, maps -framework), reports logical sizes like GTK/MSW instead of narrowing floats to ints, and links clang's compiler runtime for wxOSX's @available checks. - docs/macos.md, README and the manual's install chapter. Verified on an M1 running macOS 27.0.1: both slices build, all workspace unit tests pass, and the headless UI self-test passes 52/52 on arm64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.6 KiB
Bash
Executable File
35 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
# Regenerate alkane-toolkit.icns (the macOS app icon) from the in-repo
|
|
# microchip glyph: the same white chip on a rounded amber tile as the Windows
|
|
# icon, at the sizes macOS asks for (16-1024 px). Needs rsvg-convert,
|
|
# ImageMagick and python3; the .icns is committed, so a build never runs this.
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
GLYPH=../assets/icons/microchip-solid-full.svg
|
|
TMP=$(mktemp -d)
|
|
trap 'rm -rf "$TMP"' 0
|
|
sed 's/currentColor/#ffffff/g; s/<svg /<svg fill="#ffffff" /' "$GLYPH" > "$TMP/glyph.svg"
|
|
for s in 16 32 64 128 256 512 1024; do
|
|
# Apple's grid: the tile fills ~80% of the canvas, centred.
|
|
t=$((s * 80 / 100)); m=$(((s - t) / 2)); r=$((t * 22 / 100))
|
|
g=$((t * 60 / 100)); o=$(((s - g) / 2))
|
|
rsvg-convert -w "$g" -h "$g" "$TMP/glyph.svg" -o "$TMP/g$s.png"
|
|
convert -size "${s}x${s}" xc:none -fill '#d9822b' \
|
|
-draw "roundrectangle $m,$m $((m + t - 1)),$((m + t - 1)) $r,$r" \
|
|
"$TMP/g$s.png" -geometry "+$o+$o" -composite "PNG32:$TMP/i$s.png"
|
|
done
|
|
python3 - "$TMP" alkane-toolkit.icns <<'PY'
|
|
import pathlib, struct, sys
|
|
tmp, out = pathlib.Path(sys.argv[1]), sys.argv[2]
|
|
# ICNS element types that hold PNG data, by pixel size.
|
|
types = [("icp4", 16), ("icp5", 32), ("icp6", 64), ("ic07", 128), ("ic08", 256),
|
|
("ic09", 512), ("ic10", 1024), ("ic11", 32), ("ic12", 64), ("ic13", 256),
|
|
("ic14", 512)]
|
|
body = b""
|
|
for kind, size in types:
|
|
data = (tmp / f"i{size}.png").read_bytes()
|
|
body += kind.encode() + struct.pack(">I", len(data) + 8) + data
|
|
pathlib.Path(out).write_bytes(b"icns" + struct.pack(">I", len(body) + 8) + body)
|
|
PY
|
|
echo "wrote $(pwd)/alkane-toolkit.icns"
|