Release builds on Gitea Actions: macOS app, Ubuntu, headless Linux, server
- .gitea/workflows/release.yml: on a v* tag, a Linux runner builds and
packages the Ubuntu, headless and server bundles; a Mac runner makes
AnyBot.app. Both attach their files to the tag's release.
- deploy/ci: the Linux build image (Ubuntu 22.04), packaging, release
upload, runner settings, and a server bundle that runs the prebuilt
binaries (no compiling on the server).
- deploy/mac/bundle.sh: AnyBot.app with its icon, signed ad hoc, zipped.
- relay/Dockerfile: copy src/wire.rs too (the relay needs it since the
lasting connection).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 14:07:46 +00:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
# Make AnyBot.app from the release build and zip it (run from app/ on a Mac, after
|
|
|
|
|
|
# `cargo build --release`): deploy/mac/bundle.sh 1.2.0 → dist/AnyBot-1.2.0-macos-<arch>.zip
|
make, README and docs: build and install from source
- Makefile: make / run / install / uninstall / deps / test / serve / setup /
hands / relay-run / server / dist / clean (macOS and Linux).
- README.md and docs/: install (all platforms, data locations, troubleshooting),
multi-device (brain, hands, screens, pairing, what the offline messages mean),
architecture (layers, data, security, sync, keys, hands, picture helper),
protocol (relay and AnyBot endpoints, WebSocket frames, sync ops), release
(packaging, Gitea Actions, Linux and Mac runners).
- install.sh --deps-only, bundle.sh KEEP_APP=1 (used by make deps / install).
- FEATURES.md: the multi-device part is done.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 14:16:45 +00:00
|
|
|
|
# With KEEP_APP=1 it leaves dist/AnyBot.app instead of zipping it (make install).
|
Release builds on Gitea Actions: macOS app, Ubuntu, headless Linux, server
- .gitea/workflows/release.yml: on a v* tag, a Linux runner builds and
packages the Ubuntu, headless and server bundles; a Mac runner makes
AnyBot.app. Both attach their files to the tag's release.
- deploy/ci: the Linux build image (Ubuntu 22.04), packaging, release
upload, runner settings, and a server bundle that runs the prebuilt
binaries (no compiling on the server).
- deploy/mac/bundle.sh: AnyBot.app with its icon, signed ad hoc, zipped.
- relay/Dockerfile: copy src/wire.rs too (the relay needs it since the
lasting connection).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 14:07:46 +00:00
|
|
|
|
# Signed ad hoc (no Apple developer account): the first time, right-click › 打開.
|
|
|
|
|
|
set -e
|
|
|
|
|
|
VERSION=${1:?version}
|
|
|
|
|
|
BIN=${CARGO_TARGET_DIR:-target}/release/anybot
|
|
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
|
OUT=dist
|
|
|
|
|
|
APP="$OUT/AnyBot.app"
|
|
|
|
|
|
rm -rf "$APP" && mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
|
|
|
|
|
|
cp "$BIN" "$APP/Contents/MacOS/AnyBot"
|
|
|
|
|
|
|
|
|
|
|
|
# The icon: every size the system asks for.
|
|
|
|
|
|
SET=$(mktemp -d)/AnyBot.iconset
|
|
|
|
|
|
mkdir -p "$SET"
|
|
|
|
|
|
for s in 16 32 128 256 512; do
|
|
|
|
|
|
"$BIN" --write-icon "$SET/icon_${s}x${s}.png" $s
|
|
|
|
|
|
"$BIN" --write-icon "$SET/icon_${s}x${s}@2x.png" $((s * 2))
|
|
|
|
|
|
done
|
|
|
|
|
|
iconutil -c icns "$SET" -o "$APP/Contents/Resources/AnyBot.icns"
|
|
|
|
|
|
|
|
|
|
|
|
cat > "$APP/Contents/Info.plist" <<PLIST
|
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
|
|
<plist version="1.0"><dict>
|
|
|
|
|
|
<key>CFBundleName</key><string>AnyBot</string>
|
|
|
|
|
|
<key>CFBundleDisplayName</key><string>AnyBot</string>
|
|
|
|
|
|
<key>CFBundleIdentifier</key><string>net.30cm.anybot</string>
|
|
|
|
|
|
<key>CFBundleExecutable</key><string>AnyBot</string>
|
|
|
|
|
|
<key>CFBundleIconFile</key><string>AnyBot</string>
|
|
|
|
|
|
<key>CFBundlePackageType</key><string>APPL</string>
|
|
|
|
|
|
<key>CFBundleShortVersionString</key><string>$VERSION</string>
|
|
|
|
|
|
<key>CFBundleVersion</key><string>$VERSION</string>
|
|
|
|
|
|
<key>LSMinimumSystemVersion</key><string>12.0</string>
|
|
|
|
|
|
<key>NSHighResolutionCapable</key><true/>
|
|
|
|
|
|
<key>NSMicrophoneUsageDescription</key><string>語音聊天時,聽你說話。</string>
|
|
|
|
|
|
<key>NSAppleEventsUsageDescription</key><string>讓 Bot 在你允許時操作其他 App。</string>
|
|
|
|
|
|
</dict></plist>
|
|
|
|
|
|
PLIST
|
|
|
|
|
|
codesign --force --deep -s - "$APP"
|
make, README and docs: build and install from source
- Makefile: make / run / install / uninstall / deps / test / serve / setup /
hands / relay-run / server / dist / clean (macOS and Linux).
- README.md and docs/: install (all platforms, data locations, troubleshooting),
multi-device (brain, hands, screens, pairing, what the offline messages mean),
architecture (layers, data, security, sync, keys, hands, picture helper),
protocol (relay and AnyBot endpoints, WebSocket frames, sync ops), release
(packaging, Gitea Actions, Linux and Mac runners).
- install.sh --deps-only, bundle.sh KEEP_APP=1 (used by make deps / install).
- FEATURES.md: the multi-device part is done.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 14:16:45 +00:00
|
|
|
|
if [ "${KEEP_APP:-}" = 1 ]; then
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
fi
|
Release builds on Gitea Actions: macOS app, Ubuntu, headless Linux, server
- .gitea/workflows/release.yml: on a v* tag, a Linux runner builds and
packages the Ubuntu, headless and server bundles; a Mac runner makes
AnyBot.app. Both attach their files to the tag's release.
- deploy/ci: the Linux build image (Ubuntu 22.04), packaging, release
upload, runner settings, and a server bundle that runs the prebuilt
binaries (no compiling on the server).
- deploy/mac/bundle.sh: AnyBot.app with its icon, signed ad hoc, zipped.
- relay/Dockerfile: copy src/wire.rs too (the relay needs it since the
lasting connection).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 14:07:46 +00:00
|
|
|
|
ditto -c -k --norsrc --keepParent "$APP" "$OUT/AnyBot-$VERSION-macos-$ARCH.zip"
|
|
|
|
|
|
rm -rf "$APP"
|
|
|
|
|
|
ls -la "$OUT"
|