Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
SHELL := /bin/zsh

.PHONY: help mac-intel-init mac-intel-doctor gui-build-mac-intel gui-run-mac-intel

help:
@echo "Reco Video Stitcher Make targets"
@echo " make mac-intel-init Install Intel macOS build dependencies"
@echo " make mac-intel-doctor Print toolchain and pkg-config status"
@echo " make gui-build-mac-intel Build reco-gui release binary (no ORT defaults)"
@echo " make gui-run-mac-intel Run reco-gui release binary"

mac-intel-init:
@command -v brew >/dev/null || { echo "Homebrew is required: https://brew.sh"; exit 1; }
brew update
brew install ffmpeg pkgconf rustup-init
@RUSTUP_BIN="$$(command -v rustup 2>/dev/null || true)"; \
if [ -z "$$RUSTUP_BIN" ] && [ -x "$$(brew --prefix rustup)/bin/rustup" ]; then \
RUSTUP_BIN="$$(brew --prefix rustup)/bin/rustup"; \
fi; \
if [ -z "$$RUSTUP_BIN" ] && [ -x "$$HOME/.cargo/bin/rustup" ]; then \
RUSTUP_BIN="$$HOME/.cargo/bin/rustup"; \
fi; \
if [ -z "$$RUSTUP_BIN" ]; then \
echo "rustup is not available in PATH. Add $$(brew --prefix rustup)/bin to PATH and retry."; \
exit 1; \
fi; \
Comment on lines +15 to +26
Comment on lines +16 to +26
"$$RUSTUP_BIN" toolchain install 1.92.0; \
"$$RUSTUP_BIN" override set 1.92.0
@echo "Intel macOS environment initialized."

mac-intel-doctor:
@echo "=== Toolchain ==="
@rustc --version || true
@cargo --version || true
@if command -v rustup >/dev/null; then \
rustup show active-toolchain; \
elif [ -x "$$(brew --prefix rustup)/bin/rustup" ]; then \
"$$(brew --prefix rustup)/bin/rustup" show active-toolchain; \
elif [ -x "$$HOME/.cargo/bin/rustup" ]; then \
"$$HOME/.cargo/bin/rustup" show active-toolchain; \
else \
echo "rustup not found in PATH"; \
fi
@echo "=== Brew ==="
@brew --version | head -n 1 || true
@echo "=== FFmpeg pkgconfig path ==="
@echo "$$(brew --prefix ffmpeg)/lib/pkgconfig"
@echo "=== pkg-config libavutil ==="
@PKG_CONFIG_PATH="$$(brew --prefix ffmpeg)/lib/pkgconfig:$${PKG_CONFIG_PATH}" \
pkg-config --modversion libavutil || { echo "libavutil not found (run: make mac-intel-init)"; exit 1; }

gui-build-mac-intel:
@RUSTUP_BIN="$$(command -v rustup 2>/dev/null || true)"; \
if [ -z "$$RUSTUP_BIN" ] && [ -x "$$(brew --prefix rustup)/bin/rustup" ]; then \
RUSTUP_BIN="$$(brew --prefix rustup)/bin/rustup"; \
fi; \
if [ -z "$$RUSTUP_BIN" ] && [ -x "$$HOME/.cargo/bin/rustup" ]; then \
RUSTUP_BIN="$$HOME/.cargo/bin/rustup"; \
fi; \
if [ -z "$$RUSTUP_BIN" ]; then \
echo "rustup is required (brew install rustup-init)."; \
exit 1; \
fi; \
Comment on lines +53 to +63
PKG_CONFIG_PATH="$$(brew --prefix ffmpeg)/lib/pkgconfig:$${PKG_CONFIG_PATH}" \
"$$RUSTUP_BIN" run 1.92.0 cargo build --release -p reco-gui --no-default-features

gui-run-mac-intel: gui-build-mac-intel
./target/release/reco-gui
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,26 @@ brew install ffmpeg pkg-config
cargo build --release
```

### Intel Mac setup and GUI build via Make

Use the root [Makefile](Makefile) to bootstrap dependencies and build the GUI on x86_64 macOS.

```bash
# Install dependencies and pin workspace Rust toolchain
make mac-intel-init

# Verify ffmpeg/pkg-config and Rust are visible
make mac-intel-doctor
Comment on lines +126 to +127

# Build GUI for Intel macOS (avoids default ORT backend)
make gui-build-mac-intel

# Run GUI
make gui-run-mac-intel
```

Why no default features on Intel macOS GUI build: current ORT prebuilt availability can fail for this target/feature combination, so the Intel Make target compiles the GUI without default ORT/autocam features.

### Feature flags

| Feature | Crate | Purpose |
Expand Down
Loading