Files
sundynix-agentix/Makefile
T
Blizzard 7a4133773c feat(desktop): 真实 Wails 桌面应用可构建可运行
把 Wails 壳从编译不过的桩做成能启动的原生桌面应用。

- main.go: 真实 Wails v2 入口(import wails + assetserver + AssetServer 嵌入 dist +
  深色背景 #0b0d12 + OnStartup + Bind)
- app.go: App.startup 注入 ctx; ReadLocalFile 做真(os.ReadFile, 本地文件 I/O) + Ping 探活
- go.mod: GOWORK=off go mod tidy 拉全 wails v2.12 依赖树
- Makefile: desktop=GOWORK=off wails dev(原生窗口热重载); desktop-build=wails build(打包.app)
  — 用 GOWORK=off 让自包含的 desktop 独立构建,不污染后端 go.work
- .gitignore: 忽略 wails 生成物(build/ wailsjs/ package.json.md5)
- 验证: go build 出 5.7MB 原生二进制(含 webkit cgo); wails build 全过 →
  build/bin/sundynix_desktop.app(生成绑定/编译前端/编译应用/打包/自签名)
- 运行: make desktop(开发窗口) 或 make desktop-build(打包); 桌面端前端经 HTTP 连
  Gateway:8080(CORS 已放开), 需先起后端 + 配模型

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 17:33:49 +08:00

50 lines
1.9 KiB
Makefile
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.
.PHONY: infra infra-down devnats demo e2e gateway dispatcher mcp-go mcp-py mcp-py-setup web admin desktop desktop-build tidy
infra: ## 启动基础设施 (NATS / Postgres / Redis / Milvus / Neo4j)
docker compose up -d
infra-down:
docker compose down
devnats: ## 启动内嵌 JetStream NATS(无 Docker 本地联调)
cd sundynix-shared && go run ./cmd/devnats
demo: ## 一键演示 Gateway→NATS→Dispatcher 任务流(无需 Docker
bash scripts/demo.sh
e2e: ## 跑共享 bus 的端到端测试(内嵌 NATS):任务流 / 工具调用 / Token 流
cd sundynix-shared && go test ./bus/ -run 'TestTaskRoundTrip|TestToolCallRoundTrip|TestTokenStreamRoundTrip' -v
gateway:
cd sundynix-gateway && go run ./cmd/server
dispatcher:
cd sundynix-dispatcher && go run ./cmd/dispatcher
mcp-go:
cd sundynix-mcp-go && go run ./cmd/server
mcp-py-setup: ## 创建 venv 并安装 mcp-py 依赖(首次运行 mcp-py 前执行)
cd sundynix-mcp-py && python3 -m venv .venv && .venv/bin/pip install -q -e .
mcp-py: ## 运行 Python 算法型 MCP 工具服务(缺 venv 则自动 setup
cd sundynix-mcp-py && [ -x .venv/bin/python ] || $(MAKE) mcp-py-setup
cd sundynix-mcp-py && .venv/bin/python -m sundynix_mcp_py.main
web: ## 桌面端前端 devVite :5173,连本地 Gateway:8080
cd sundynix-desktop/frontend && npm install && npm run dev
admin: ## 运维控制台 devVite :5174,配置 LLM 模型等控制面)
cd sundynix-admin && npm install && npm run dev
desktop: ## 真实桌面端开发模式(Wails 原生窗口 + 热重载;需先 make infra + 后端 + 配模型)
cd sundynix-desktop && GOWORK=off wails dev
desktop-build: ## 打包桌面端为原生应用(产物在 sundynix-desktop/build/bin/
cd sundynix-desktop && GOWORK=off wails build
tidy:
cd sundynix-gateway && go mod tidy
cd sundynix-dispatcher && go mod tidy
cd sundynix-mcp-go && go mod tidy