forked from dualshock-tools/dualshock-tools.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-dev.sh
More file actions
executable file
·72 lines (60 loc) · 1.73 KB
/
setup-dev.sh
File metadata and controls
executable file
·72 lines (60 loc) · 1.73 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
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# DualShock Calibration GUI - Development Setup Script
echo "🎮 DualShock Calibration GUI - Development Setup"
echo "================================================"
echo ""
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed"
echo "💡 Please install Node.js (v16 or higher) from https://nodejs.org/"
exit 1
fi
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2)
MAJOR_VERSION=$(echo $NODE_VERSION | cut -d'.' -f1)
if [ "$MAJOR_VERSION" -lt 16 ]; then
echo "❌ Node.js version $NODE_VERSION is too old"
echo "💡 Please upgrade to Node.js v16 or higher"
exit 1
fi
echo "✅ Node.js version: $NODE_VERSION"
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed"
echo "💡 npm should come with Node.js installation"
exit 1
fi
echo "✅ npm version: $(npm -v)"
echo ""
# Install dependencies
echo "📦 Installing dependencies..."
if npm install; then
echo "✅ Dependencies installed successfully"
else
echo "❌ Failed to install dependencies"
exit 1
fi
echo ""
# Build the application
echo "🔨 Building application..."
if npm run build; then
echo "✅ Application built successfully"
else
echo "❌ Failed to build application"
exit 1
fi
echo ""
echo "🎉 Setup complete!"
echo ""
echo "🚀 To start development:"
echo " npm run dev:full"
echo ""
echo "📱 The app will be available at:"
echo " https://localhost:8443"
echo ""
echo "💡 You may need to accept the SSL certificate warning in your browser"
echo "💡 Use Chrome or Edge for full WebHID support"
echo ""
echo "📚 For more information, see:"
echo " - README.md"
echo " - DEVELOPMENT.md"