-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-dev.sh
More file actions
executable file
·90 lines (79 loc) · 2.09 KB
/
Copy pathsetup-dev.sh
File metadata and controls
executable file
·90 lines (79 loc) · 2.09 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
#!/bin/bash
set -e
echo "=========================================="
echo "FlowSight Development Environment Setup"
echo "=========================================="
echo ""
# Check if running on Linux
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
echo "Error: This script is designed for Linux systems"
exit 1
fi
# Install Rust
echo "[1/4] Installing Rust..."
if ! command -v rustc &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
echo "✓ Rust installed successfully"
else
echo "✓ Rust already installed ($(rustc --version))"
fi
# Install Node.js (if not present)
echo ""
echo "[2/4] Checking Node.js..."
if ! command -v node &> /dev/null; then
echo "Error: Node.js not found. Please install Node.js 20+ first"
echo "Visit: https://nodejs.org/"
exit 1
else
echo "✓ Node.js found ($(node --version))"
fi
# Install pnpm
echo ""
echo "[3/4] Installing pnpm..."
if ! command -v pnpm &> /dev/null; then
npm install -g pnpm
echo "✓ pnpm installed successfully"
else
echo "✓ pnpm already installed ($(pnpm --version))"
fi
# Install system dependencies for Tauri
echo ""
echo "[4/4] Installing system dependencies..."
echo "This step requires sudo privileges"
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
echo ""
echo "=========================================="
echo "Installing project dependencies..."
echo "=========================================="
# Load Rust environment
source "$HOME/.cargo/env"
# Install frontend dependencies
echo ""
echo "Installing frontend dependencies..."
cd app
pnpm install
cd ..
# Build Rust workspace
echo ""
echo "Building Rust workspace..."
cargo build --workspace
echo ""
echo "=========================================="
echo "✓ Setup completed successfully!"
echo "=========================================="
echo ""
echo "To start development:"
echo " cd app"
echo " pnpm tauri dev"
echo ""