完成初步框架
This commit is contained in:
51
start.sh
Executable file
51
start.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Video Player Start Script
|
||||
echo "🎥 Video Player - Starting..."
|
||||
|
||||
# Check if Node.js is installed
|
||||
if ! command -v node &> /dev/null; then
|
||||
echo "❌ Node.js is not installed. Please install Node.js first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if pnpm is installed
|
||||
if ! command -v pnpm &> /dev/null; then
|
||||
echo "❌ pnpm is not installed. Please install pnpm first."
|
||||
echo "Run: npm install -g pnpm"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if Rust is installed
|
||||
if ! command -v cargo &> /dev/null; then
|
||||
echo "❌ Rust is not installed. Please install Rust first."
|
||||
echo "Run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install dependencies if node_modules doesn't exist
|
||||
if [ ! -d "node_modules" ]; then
|
||||
echo "📦 Installing dependencies..."
|
||||
pnpm install
|
||||
fi
|
||||
|
||||
# Check Rust code
|
||||
echo "🔍 Checking Rust code..."
|
||||
cd src-tauri && cargo check
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "❌ Rust code check failed. Please fix the errors first."
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
|
||||
echo "✅ All checks passed!"
|
||||
echo ""
|
||||
echo "🚀 Starting Video Player..."
|
||||
echo "📡 WebSocket server will be available at ws://127.0.0.1:8080"
|
||||
echo "🎮 Use the test_websocket.js script in another terminal to test commands"
|
||||
echo ""
|
||||
echo "Press Ctrl+C to stop the player"
|
||||
echo ""
|
||||
|
||||
# Start the application
|
||||
pnpm tauri:dev
|
Reference in New Issue
Block a user