-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathlaunch_in_terminal.sh
More file actions
executable file
·55 lines (47 loc) · 2.55 KB
/
launch_in_terminal.sh
File metadata and controls
executable file
·55 lines (47 loc) · 2.55 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
#!/bin/bash
# ---------------------------------------------------------------------------
# AceForge - Backend Server Runner
# This script runs the AceForge backend in a Terminal window
# ---------------------------------------------------------------------------
# Get the directory where this script lives
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# The AceForge binary is in the same directory as this script
# when running from the app bundle (Contents/MacOS/)
# NOTE: The binary is named AceForge_bin (not AceForge) because:
# - macos_terminal_launcher.sh is copied as the main "AceForge" executable in Contents/MacOS/
# - The wrapper uses AppleScript to open Terminal.app and execute this script
# - This script then executes the actual PyInstaller binary (AceForge_bin)
# This naming scheme is coordinated with CDMF.spec and macos_terminal_launcher.sh
EXEC_PATH="${SCRIPT_DIR}/AceForge_bin"
clear
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo " 🎵 AceForge - AI Music Generation Server"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Starting AceForge server..."
echo ""
echo "📋 Instructions:"
echo " • Your browser will open automatically when the server is ready"
echo " • To stop AceForge: Press Ctrl+C or use the 'Exit' button in browser"
echo " • This terminal window MUST stay open while using AceForge"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Run the AceForge executable
"$EXEC_PATH"
# Capture exit status
EXIT_CODE=$?
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
if [ $EXIT_CODE -eq 0 ]; then
echo " ✅ AceForge stopped gracefully"
else
echo " ⚠️ AceForge exited with code: $EXIT_CODE"
fi
echo ""
echo " You can now close this window"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Keep window open so user can see the message
read -n 1 -s -r -p "Press any key to close this window..."
echo ""