-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_mac.sh
More file actions
executable file
·47 lines (40 loc) · 1.26 KB
/
Copy pathbuild_mac.sh
File metadata and controls
executable file
·47 lines (40 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
echo "========================================"
echo " OpenROM Build Script - macOS"
echo " M5 Dev"
echo "========================================"
set -e
ARCH=$(uname -m)
echo "Detected architecture: $ARCH"
# Install dependencies
echo "[1/4] Installing dependencies..."
pip install -r requirements.txt
pip install "pyinstaller>=6.0.0"
# Build Python core executable
echo "[2/4] Building openrom-core executable..."
pyinstaller \
--noconfirm \
--onefile \
--name "openrom-core" \
--add-data "assets:assets" \
--target-arch "$ARCH" \
core/cli.py
# Build Flutter desktop application
echo "[3/4] Building Flutter desktop application..."
cd openrom_flutter
flutter build macos --release
cd ..
# Package release files
echo "[4/4] Packaging release..."
mkdir -p dist/release
cp -r openrom_flutter/build/macos/Build/Products/Release/*.app dist/release/
APP_BUNDLE=$(ls -d dist/release/*.app | head -n 1)
if [ -n "$APP_BUNDLE" ]; then
cp dist/openrom-core "$APP_BUNDLE/Contents/MacOS/"
fi
cp dist/openrom-core dist/release/
if [ -d "themes" ]; then cp -r themes dist/release/; fi
if [ -d "assets" ]; then cp -r assets dist/release/; fi
cd dist/release
zip -r "OpenROM_macOS_${ARCH}.zip" .
echo "📦 dist/release/OpenROM_macOS_${ARCH}.zip is ready for release!"