Skip to content

Commit

Permalink
多平台编译
Browse files Browse the repository at this point in the history
  • Loading branch information
kagurazakayashi committed Jul 14, 2022
1 parent dd39c5a commit 06d70f3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ Thumbs.db
*.txt
*.csv
*.syso
*.xz
*.7z
*.cab
mqtt-test-server
MqttClientTestTool*
tmp/go-link 000000.o
24 changes: 24 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SET name=bin\MqttClientTestTool_v1.0.0_
DEL /Q bin\*
SET CGO_ENABLED=0
SET GOARCH=amd64
go generate
SET GOOS=windows
go build -o %name%Windows64.exe .
DEL /Q *.syso
SET GOOS=linux
go build -o %name%Linux64 .
SET GOOS=darwin
go build -o %name%macOS64 .
SET GOARCH=386
go generate
SET GOOS=windows
go build -o %name%Windows32.exe .
DEL /Q *.syso
SET GOOS=linux
go build -o %name%Linux32 .
SET name=
SET CGO_ENABLED=
SET GOARCH=
SET GOOS=
xz -z -e -9 -T 0 -v bin/*
2 changes: 2 additions & 0 deletions desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=rc.ico,0

0 comments on commit 06d70f3

Please sign in to comment.