-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·99 lines (96 loc) · 2.62 KB
/
build.sh
File metadata and controls
executable file
·99 lines (96 loc) · 2.62 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
#!/bin/bash
set -e
TARGET=${1:-linux}
echo "🔨 Vortex Build System"
echo ""
case $TARGET in
linux)
echo "📦 Building for Linux..."
cargo build --release --features tor -p vortex-desktop
echo "✅ Built: target/release/libvortex_desktop.so"
ls -lh target/release/libvortex_desktop.so | awk '{print " Size:", $5}'
;;
deb)
echo "📦 Building .deb package..."
./build-deb.sh
;;
appimage)
echo "📦 Building AppImage..."
./build-appimage.sh
;;
windows)
echo "📦 Building for Windows..."
cargo build --release --features tor -p vortex-desktop --target x86_64-pc-windows-gnu
echo "✅ Built: target/x86_64-pc-windows-gnu/release/vortex_desktop.dll"
;;
web)
echo "🎨 Building Web Frontend..."
cd web
if command -v pnpm &> /dev/null; then
pnpm install
pnpm build
elif command -v npm &> /dev/null; then
npm install
npm run build
else
echo "❌ Node.js not found"
exit 1
fi
echo "✅ Built: web/dist/"
cd ..
;;
android)
echo "📱 Building for Android..."
cargo build --release --features tor -p vortex-shared --target aarch64-linux-android
cargo build --release --features tor -p vortex-shared --target armv7-linux-androideabi
echo "✅ Built Android libs"
;;
test)
echo "🧪 Running tests..."
cargo test --lib --workspace --release
echo "✅ All tests passed"
;;
test-tor)
echo "🧪 Running Tor tests..."
cargo test --lib --features tor -p vortex-shared -- --ignored --nocapture
echo "✅ Tor tests passed"
;;
bench)
echo "⚡ Running benchmarks..."
cargo bench -p vortex-shared
;;
packages)
echo "📦 Building all packages..."
$0 deb
$0 appimage
echo ""
echo "🎉 All packages built!"
echo ""
echo "Packages:"
ls -lh target/*.deb target/*.AppImage 2>/dev/null | awk '{print " ", $9, "-", $5}'
;;
all)
$0 test
$0 linux
$0 web
echo ""
echo "🎉 Full build complete!"
;;
*)
echo "Usage: ./build.sh [target]"
echo ""
echo "Targets:"
echo " linux - Build desktop library (default)"
echo " deb - Build .deb package"
echo " appimage - Build AppImage"
echo " windows - Cross-compile for Windows"
echo " web - Build Vue frontend"
echo " android - Build for Android"
echo " test - Run all tests"
echo " test-tor - Run Tor integration tests"
echo " bench - Run benchmarks"
echo " packages - Build .deb + AppImage"
echo " all - Build everything"
exit 1
;;
esac