-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·61 lines (53 loc) · 2.5 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·61 lines (53 loc) · 2.5 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Run with: bash build.sh or ./build.sh
# Do NOT run with python3 — this is a shell script.
set -e
echo ""
echo "╔══════════════════════════════════════╗"
echo "║ ØJE CUE MONITOR — Build ║"
echo "║ macOS .app bundle ║"
echo "╚══════════════════════════════════════╝"
echo ""
# ── Check PyInstaller ─────────────────────────────────────────────────────────
if ! python3 -c "import PyInstaller" 2>/dev/null; then
echo "▶ Installing PyInstaller..."
pip3 install pyinstaller
else
echo "▶ PyInstaller: OK"
fi
# ── Clean previous build ──────────────────────────────────────────────────────
echo "▶ Cleaning previous build..."
rm -rf build dist
# ── Build ─────────────────────────────────────────────────────────────────────
echo ""
echo "▶ Building .app bundle..."
python3 -m PyInstaller OJECueMonitor.spec --noconfirm
# ── Result ────────────────────────────────────────────────────────────────────
APP="dist/ØJE CUE MONITOR.app"
if [ -d "$APP" ]; then
SIZE=$(du -sh "$APP" | cut -f1)
echo ""
echo "══════════════════════════════════════════"
echo " ✓ Build successful!"
echo ""
echo " App : $APP"
echo " Size: $SIZE"
echo ""
echo " To open:"
echo " open \"$APP\""
echo ""
echo " To copy to Applications:"
echo " cp -r \"$APP\" /Applications/"
echo ""
# Optional: open the dist folder in Finder
read -p " Open dist/ folder in Finder? [y/N] " ans
if [[ "$ans" =~ ^[Yy]$ ]]; then
open dist/
fi
else
echo ""
echo " ✗ Build failed — check errors above."
exit 1
fi
echo "══════════════════════════════════════════"
echo ""