forked from kingparks/cursor-vip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
28 lines (26 loc) · 1.53 KB
/
build.sh
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
#!/bin/bash
# garble混淆安装: go install mvdan.cc/garble@latest
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_darwin_amd64;
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_darwin_arm64;
# rsrc 应用程序图标安装: go install github.com/akavel/rsrc@latest
rsrc -arch amd64 -ico rsrc.ico -o rsrc.syso;
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o build/cursor-vip_windows_amd64.exe;
rm rsrc.syso;
rsrc -arch arm -ico rsrc.ico -o rsrc.syso;
GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-w -s" -o build/cursor-vip_windows_arm64.exe;
rm rsrc.syso;
rsrc -arch 386 -ico rsrc.ico -o rsrc.syso;
GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -ldflags "-w -s" -o build/cursor-vip_windows_386.exe;
rm rsrc.syso;
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_linux_amd64;
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_linux_arm64;
GOOS=linux GOARCH=386 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_linux_386;
chmod +x build/install.sh;
chmod +x build/cursor-vip_darwin_amd64;
chmod +x build/cursor-vip_darwin_arm64;
chmod +x build/cursor-vip_windows_amd64.exe;
chmod +x build/cursor-vip_windows_arm64.exe;
chmod +x build/cursor-vip_windows_386.exe;
chmod +x build/cursor-vip_linux_amd64;
chmod +x build/cursor-vip_linux_arm64;
chmod +x build/cursor-vip_linux_386;