#!/bin/bash set -euo pipefail cd "$(dirname "$0")" # One-click builder for BibleApp macOS app # 1) Installs dependencies # 2) Packages Electron app for Intel and Apple Silicon # 3) Opens the dist folder echo "=== BibleApp macOS Builder ===" if ! command -v node >/dev/null 2>&1; then echo "Node.js is not installed. Install from https://nodejs.org and run again." exit 1 fi # Install deps (safe to re-run) echo -e "\nInstalling dependencies..." npm install --no-audit --no-fund # Package (both archs) echo -e "\nPackaging app (darwin x64, arm64)..." ./node_modules/.bin/electron-packager . BibleApp \ --platform=darwin \ --arch=x64,arm64 \ --out=dist \ --overwrite # Open dist echo -e "\nBuild complete. Opening dist folder..." open dist