mirror of
https://github.com/mileswolfallen2/OmniEmu2.0.git
synced 2026-12-05 08:10:41 +00:00
still workign to make it this is just a back up
This commit is contained in:
1 parent
e1ee2173d2
commit
59cd586e3b
18 files changed
+798
-567
No files matched your search
+22
-11
@@ -3,27 +3,38 @@ set -euo pipefail
|
||||
|
||||
# Build OmniEmu for macOS
|
||||
# Usage: ./scripts/build-mac.sh [arch]
|
||||
# arch: x64 | arm64 (default: current arch)
|
||||
# arch: x64 | arm64 | universal (default: universal)
|
||||
# Requires: Node.js 20+, npm
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
cd "$PROJECT_DIR"
|
||||
|
||||
ARCH="${1:-$(uname -m)}"
|
||||
case "$ARCH" in
|
||||
x86_64) ARCH_FLAG="x64" ;;
|
||||
arm64) ARCH_FLAG="arm64" ;;
|
||||
*) echo "Unknown arch: $ARCH"; exit 1 ;;
|
||||
esac
|
||||
ARCH="${1:-universal}"
|
||||
|
||||
echo "==> Installing dependencies..."
|
||||
npm install
|
||||
|
||||
echo "==> Building for macOS ($ARCH_FLAG)..."
|
||||
echo "==> Building..."
|
||||
npm run build
|
||||
|
||||
echo "==> Packaging for macOS ($ARCH_FLAG)..."
|
||||
npx electron-builder --mac --arm64="$([ "$ARCH_FLAG" = "arm64" ] && echo true || echo false)" --x64="$([ "$ARCH_FLAG" = "x64" ] && echo true || echo false)"
|
||||
echo "==> Packaging for macOS ($ARCH)..."
|
||||
case "$ARCH" in
|
||||
universal)
|
||||
npx electron-builder --mac --universal
|
||||
;;
|
||||
x64)
|
||||
npx electron-builder --mac --x64
|
||||
;;
|
||||
arm64)
|
||||
npx electron-builder --mac --arm64
|
||||
;;
|
||||
*)
|
||||
echo "Unknown arch: $ARCH (use: x64, arm64, universal)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "==> Done! Artifacts in ./release/"
|
||||
ls -lh release/*.dmg release/*.zip 2>/dev/null || true
|
||||
Reference in new issue
Block a user