-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_all.sh
More file actions
executable file
·170 lines (154 loc) · 4.38 KB
/
build_all.sh
File metadata and controls
executable file
·170 lines (154 loc) · 4.38 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/bash
# VoxPlayer Cross-Platform Build Script
# Builds VoxPlayer for all supported platforms
set -e
echo "========================================"
echo "VoxPlayer Cross-Platform Builder"
echo "========================================"
echo ""
# Detect current platform
case "$OSTYPE" in
darwin*)
PLATFORM="macos"
echo "Detected platform: macOS"
;;
linux-gnu*)
PLATFORM="linux"
echo "Detected platform: Linux"
;;
msys*|cygwin*|win32*)
PLATFORM="windows"
echo "Detected platform: Windows"
;;
*)
echo "WARNING: Unknown platform: $OSTYPE"
PLATFORM="unknown"
;;
esac
echo ""
# Function to check if command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Function to build for current platform
build_current_platform() {
case $PLATFORM in
"macos")
echo "Building for macOS..."
if [ -f "build_macos.sh" ]; then
chmod +x build_macos.sh
./build_macos.sh
else
echo "ERROR: build_macos.sh not found"
return 1
fi
;;
"linux")
echo "Building for Linux..."
if [ -f "build_debian.sh" ]; then
chmod +x build_debian.sh
./build_debian.sh
fi
if [ -f "build_rpm.sh" ]; then
chmod +x build_rpm.sh
./build_rpm.sh
fi
if [ -f "build_arch.sh" ]; then
chmod +x build_arch.sh
./build_arch.sh
fi
;;
"windows")
echo "Building for Windows..."
if [ -f "build_simple.bat" ]; then
./build_simple.bat
else
echo "ERROR: build_simple.bat not found"
return 1
fi
;;
*)
echo "ERROR: Unsupported platform for building"
return 1
;;
esac
}
# Function to build source distribution
build_source() {
echo "Building source distribution..."
if [ -f "build_source.sh" ]; then
chmod +x build_source.sh
./build_source.sh
else
echo "ERROR: build_source.sh not found"
return 1
fi
}
# Main build process
echo "Starting build process..."
# Always build source distribution
build_source
# Build for current platform
if [ "$PLATFORM" != "unknown" ]; then
build_current_platform
else
echo "WARNING: Cannot build for current platform"
fi
echo ""
echo "========================================"
echo "Build process completed!"
echo "========================================"
echo ""
# List created files
echo "Created files:"
ls -la *.tar.gz *.deb *.rpm *.dmg *.exe *.pkg.tar.zst 2>/dev/null || echo "No platform-specific packages found"
echo ""
echo "Installation instructions:"
echo ""
# Source distribution
if [ -f "VoxPlayer-1.0.0.tar.gz" ]; then
echo "Source Distribution:"
echo " pip install VoxPlayer-1.0.0.tar.gz"
echo ""
fi
# Platform-specific instructions
case $PLATFORM in
"macos")
if [ -f "VoxPlayer-1.0.0-macOS.dmg" ]; then
echo "macOS:"
echo " Double-click VoxPlayer-1.0.0-macOS.dmg"
echo " Drag VoxPlayer.app to Applications folder"
echo ""
fi
;;
"linux")
if [ -f "voxplayer_1.0.0_amd64.deb" ]; then
echo "Debian/Ubuntu:"
echo " sudo dpkg -i voxplayer_1.0.0_amd64.deb"
echo " sudo apt-get install -f # Fix dependencies if needed"
echo ""
fi
if [ -f "voxplayer-1.0.0-1.x86_64.rpm" ]; then
echo "Fedora/CentOS/RHEL:"
echo " sudo dnf install voxplayer-1.0.0-1.x86_64.rpm"
echo " # or sudo yum install voxplayer-1.0.0-1.x86_64.rpm"
echo ""
fi
if [ -f "voxplayer-1.0.0-1-x86_64.pkg.tar.zst" ]; then
echo "Arch Linux:"
echo " sudo pacman -U voxplayer-1.0.0-1-x86_64.pkg.tar.zst"
echo ""
fi
;;
"windows")
if [ -f "dist/VoxPlayer.exe" ]; then
echo "Windows:"
echo " Run dist/VoxPlayer.exe"
echo " Run register_file_associations.bat as Administrator"
echo ""
fi
;;
esac
echo "For more information, see README.md"
echo ""
echo "Build completed successfully! 🎬✨"