-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·29 lines (23 loc) · 886 Bytes
/
Copy pathdev.sh
File metadata and controls
executable file
·29 lines (23 loc) · 886 Bytes
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
#!/bin/bash
# Grafium Dev Launch Script
# Handles all the Linux/WebKitGTK gotchas automatically:
# 1. Kills any existing instances
# 2. Rebuilds dist/ (required by Tauri's generate_context! macro)
# 3. Launches tauri dev with proper GTK/WebKit env vars
# 4. incognito: true in tauri.conf.json prevents WebKitGTK disk caching
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
UI_DIR="$SCRIPT_DIR/ui"
echo "==> Killing existing instances..."
pkill -9 -f "target/debug/grafium" 2>/dev/null || true
pkill -9 -f "vite" 2>/dev/null || true
lsof -ti:5173 2>/dev/null | xargs kill -9 2>/dev/null || true
sleep 0.5
echo "==> Building frontend dist (required for Tauri compile)..."
cd "$UI_DIR"
npx vite build 2>&1 | tail -3
echo "==> Launching tauri dev..."
export GDK_BACKEND=x11
export WEBKIT_DISABLE_DMABUF_RENDERER=1
export WEBKIT_DISABLE_COMPOSITING_MODE=1
exec npm run tauri -- dev