VT_Player/scripts/run.sh
2025-12-04 05:03:02 -05:00

33 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# VT Player Run Script
# Builds (if needed) and runs the application
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
BUILD_OUTPUT="$PROJECT_ROOT/VTPlayer"
echo "════════════════════════════════════════════════════════════════"
echo " VT Player - Run Script"
echo "════════════════════════════════════════════════════════════════"
echo ""
# Check if binary exists
if [ ! -f "$BUILD_OUTPUT" ]; then
echo "⚠️ Binary not found. Building..."
echo ""
bash "$PROJECT_ROOT/scripts/build.sh"
echo ""
fi
# Verify binary exists
if [ ! -f "$BUILD_OUTPUT" ]; then
echo "❌ ERROR: Build failed, cannot run."
exit 1
fi
echo "🚀 Starting VT Player..."
echo "════════════════════════════════════════════════════════════════"
echo ""
# Run the application
"$BUILD_OUTPUT" "$@"