On fresh MacBook installs, the bundled qmd binary fails to run due to: missing execute permissions, macOS quarantine attributes, and no fallback when qmd is completely absent. This fix addresses all three issues: - Runtime: ensure +x permissions and remove quarantine on bundled qmd - Runtime: auto-install qmd via bun when binary not found anywhere - Build: ad-hoc code-sign qmd and .dylib files in bundle-qmd.sh - Build: create placeholder resource dirs so fresh clones build cleanly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
548 B
Rust
14 lines
548 B
Rust
fn main() {
|
|
// Ensure resource directories exist for the Tauri build.
|
|
// These are gitignored and populated by scripts (bundle-qmd.sh, bundle-mcp-server.mjs).
|
|
// Without a placeholder, `tauri build` / `cargo test` fails if the scripts haven't run.
|
|
for dir in ["resources/qmd", "resources/mcp-server"] {
|
|
let path = std::path::Path::new(dir);
|
|
if !path.exists() {
|
|
std::fs::create_dir_all(path).ok();
|
|
std::fs::write(path.join(".placeholder"), "").ok();
|
|
}
|
|
}
|
|
tauri_build::build()
|
|
}
|