Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
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.
57 lines
2.4 KiB
Bash
Executable File
57 lines
2.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Assemble a Menivor.app with a verified, self-contained media toolchain.
|
|
# Usage: packaging/macos/bundle.sh --ffmpeg /path/ffmpeg --ffprobe /path/ffprobe [--sign "Developer ID Application: …"]
|
|
set -euo pipefail
|
|
here="$(cd "$(dirname "$0")" && pwd)"
|
|
root="$(cd "$here/../../../.." && pwd)"
|
|
bin="$root/target/release/reelforge-desktop"
|
|
app="$root/target/Menivor.app"
|
|
ffmpeg=""
|
|
ffprobe=""
|
|
sign_id=""
|
|
|
|
while [ "$#" -gt 0 ]; do
|
|
case "$1" in
|
|
--ffmpeg) [ "$#" -ge 2 ] || { echo "--ffmpeg needs a path" >&2; exit 2; }; ffmpeg="$2"; shift 2 ;;
|
|
--ffprobe) [ "$#" -ge 2 ] || { echo "--ffprobe needs a path" >&2; exit 2; }; ffprobe="$2"; shift 2 ;;
|
|
--sign) [ "$#" -ge 2 ] || { echo "--sign needs an identity" >&2; exit 2; }; sign_id="$2"; shift 2 ;;
|
|
*) echo "unknown argument: $1" >&2; exit 2 ;;
|
|
esac
|
|
done
|
|
|
|
[ -n "$ffmpeg" ] && [ -n "$ffprobe" ] || { echo "--ffmpeg and --ffprobe are required" >&2; exit 2; }
|
|
[ -f "$bin" ] || { echo "build first: cargo build --release -p reelforge-desktop"; exit 1; }
|
|
"$here/../verify-media-toolchain.sh" "$ffmpeg" "$ffprobe"
|
|
|
|
# A release binary linked directly to a developer machine's Homebrew/MacPorts
|
|
# prefix is not portable. System libraries and loader-relative dependencies are
|
|
# safe; everything else must be bundled and rewritten before this script runs.
|
|
for media_bin in "$ffmpeg" "$ffprobe"; do
|
|
while IFS= read -r dependency; do
|
|
case "$dependency" in
|
|
""|/System/Library/*|/usr/lib/*) ;;
|
|
*) echo "non-portable dependency in $media_bin: $dependency" >&2; exit 1 ;;
|
|
esac
|
|
done < <(otool -L "$media_bin" | tail -n +2 | awk '{print $1}')
|
|
done
|
|
|
|
rm -rf "$app"
|
|
mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources/bin"
|
|
cp "$here/Info.plist" "$app/Contents/Info.plist"
|
|
cp "$bin" "$app/Contents/MacOS/reelforge-desktop"
|
|
cp "$ffmpeg" "$app/Contents/Resources/bin/ffmpeg"
|
|
cp "$ffprobe" "$app/Contents/Resources/bin/ffprobe"
|
|
chmod 755 "$app/Contents/Resources/bin/ffmpeg" "$app/Contents/Resources/bin/ffprobe"
|
|
[ -f "$here/Menivor.icns" ] && cp "$here/Menivor.icns" "$app/Contents/Resources/"
|
|
|
|
if [ -n "$sign_id" ]; then
|
|
codesign --force --options runtime --sign "$sign_id" "$app/Contents/Resources/bin/ffmpeg"
|
|
codesign --force --options runtime --sign "$sign_id" "$app/Contents/Resources/bin/ffprobe"
|
|
codesign --force --options runtime \
|
|
--entitlements "$here/entitlements.plist" \
|
|
--sign "$sign_id" "$app"
|
|
codesign --verify --deep --strict "$app"
|
|
echo "signed + verified"
|
|
fi
|
|
echo "built $app"
|