-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 1.11 KB
/
Makefile
File metadata and controls
56 lines (44 loc) · 1.11 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
.PHONY: all build dev frontend-install frontend-build clean run mac-app dev-mac
# 默认目标
all: build
# 安装前端依赖
frontend-install:
@echo "Installing frontend dependencies..."
cd frontend && npm install
# 构建前端
frontend-build:
@echo "Building frontend..."
cd frontend && npm run build
# 开发模式 - 运行 Wails 开发服务器
dev: frontend-install
@echo "Starting Wails development mode..."
wails3 dev
# 构建整个应用
build: frontend-build
@echo "Building application..."
go build -o keyview
# 构建 macOS 应用
mac-app:
@echo "Building macOS application..."
wails3 package
@echo "✅ macOS app built successfully!"
@echo "📍 Location: bin/KeyView.app"
@echo ""
@echo "Run with: make run-mac or open bin/KeyView.app"
# 运行应用
run: build
@echo "Running application..."
./keyview
# 运行构建好的 macOS 应用
run-mac: mac-app
@echo "Running macOS application..."
open bin/KeyView.app
# 格式化代码
fmt:
@echo "Formatting code..."
go fmt ./...
cd frontend && npx prettier --write "src/**/*.{js,vue,css}"
# 测试
test:
@echo "Running tests..."
go test ./...