-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
67 lines (54 loc) · 1.52 KB
/
Makefile
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
.PHONY: dev build clean
# 默认目标
all: build
# 开发模式
dev:
wails dev
# 构建项目
build:
wails build
# 清理构建文件
clean:
rm -rf build/
cd frontend && rm -rf dist/ node_modules/
# 安装依赖
install:
cd frontend && npm install
# 更新依赖
update:
cd frontend && npm update
go get -u ./...
# 运行测试
test:
go test ./...
# 生成 Windows 版本
build-windows:
wails build -platform windows/amd64
# 生成 macOS 版本
build-mac:
wails build -platform darwin/universal
# 生成 Linux 版本
build-linux:
wails build -platform linux/amd64
# 生成 macOS DMG 安装包
build-mac-dmg:
wails build -platform darwin/universal
ls -la build/bin
hdiutil create -volname "Smart Clipboard" -srcfolder "build/bin/Smart Clipboard.app" -ov -format UDZO "Smart Clipboard.dmg"
build-mac-intel-dmg:
wails build -platform darwin/amd64
ls -la build/bin
hdiutil create -volname "Smart Clipboard" -srcfolder "build/bin/Smart Clipboard.app" -ov -format UDZO "Smart Clipboard-intel.dmg"
# 帮助信息
help:
@echo "可用的命令:"
@echo " make dev - 运行开发模式"
@echo " make build - 构建项目"
@echo " make clean - 清理构建文件"
@echo " make install - 安装依赖"
@echo " make update - 更新依赖"
@echo " make test - 运行测试"
@echo " make build-windows - 构建 Windows 版本"
@echo " make build-mac - 构建 macOS 版本"
@echo " make build-linux - 构建 Linux 版本"
@echo " make build-mac-dmg - 构建 macOS DMG 安装包"