Files
clawpanel/scripts/dev.sh
晴天 53f46d8ef2 feat: Windows 兼容性全面改进
- Windows Gateway 启动改为前台 spawn 模式(绕过 schtasks 管理员权限)
- 添加全局 Gateway 未启动引导横幅(黄色提示条 + 一键启动按钮)
- 所有页面加载动画改为脉冲效果
- 统一 Windows cmd /c 调用加 CREATE_NO_WINDOW 标志
- 托盘菜单复用 service.rs 逻辑
- 新增 utils.rs 封装 openclaw_command
- 修复 config 文件 UI 字段污染问题
- 添加 dev.ps1 启动脚本
2026-03-02 13:00:16 +08:00

44 lines
1.1 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# ClawPanel 开发模式启动脚本
# 用法: ./scripts/dev.sh [web|tauri]
# web - 仅启动 Vite 前端浏览器调试mock 数据)
# tauri - 启动完整 Tauri 桌面应用(默认)
set -e
cd "$(dirname "$0")/.."
MODE="${1:-tauri}"
# 清理旧进程
cleanup() {
echo "🧹 清理旧进程..."
pkill -f "vite.*clawpanel" 2>/dev/null || true
pkill -f "target/debug/clawpanel" 2>/dev/null || true
lsof -ti:1420 | xargs kill -9 2>/dev/null || true
sleep 0.5
}
cleanup
case "$MODE" in
web)
echo "🌐 启动 Vite 前端开发服务器(浏览器模式)..."
echo " 地址: http://localhost:1420"
echo " 使用 mock 数据,适合调试前端逻辑"
echo ""
npx vite --port 1420
;;
tauri)
echo "🖥️ 启动 Tauri 桌面应用(完整模式)..."
echo " Vite + Rust 后端"
echo ""
npm run tauri dev
;;
*)
echo "用法: $0 [web|tauri]"
echo " web - 仅 Vite 前端(浏览器调试)"
echo " tauri - Tauri 桌面应用(默认)"
exit 1
;;
esac