-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-mac.sh
More file actions
57 lines (46 loc) · 1.17 KB
/
build-mac.sh
File metadata and controls
57 lines (46 loc) · 1.17 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
#!/bin/bash
# Multi-File Player macOS Build Script
echo "==============================="
echo "Multi-File Player macOS Build"
echo "==============================="
echo ""
echo "Checking prerequisites..."
# Check if Node.js is installed
if ! command -v node &> /dev/null
then
echo "Error: Node.js not found. Please install Node.js first."
exit 1
fi
# Check Node.js version
NODE_VERSION=$(node --version)
echo "Node.js version: $NODE_VERSION"
# Check if npm is installed
if ! command -v npm &> /dev/null
then
echo "Error: npm not found. Please install Node.js and npm first."
exit 1
fi
NPM_VERSION=$(npm --version)
echo "npm version: $NPM_VERSION"
echo ""
echo "Installing dependencies..."
npm install
if [ $? -ne 0 ]; then
echo "Error: Failed to install dependencies!"
exit 1
fi
echo ""
echo "Building application for macOS..."
npm run dist-mac
if [ $? -ne 0 ]; then
echo "Error: macOS build failed!"
exit 1
fi
echo ""
echo "==============================="
echo "macOS build completed successfully!"
echo "Application package is located in the dist folder"
echo "==============================="
echo ""
echo "Press any key to exit..."
read -n 1 -s