go交叉编译脚本命令

::只显示echo
@echo off
::设置DOS环境的字体颜色
@color 06


::设置GOPATH路径和golandIDE相同
SET projectName=apetboss
SET projectPath=F:\project\h5gamesvr
SET GOPATH=%projectPath%

;SET CGO_ENABLED=0
;SET GOOS=linux
;SET GOARCH=amd64
;go build  -v -o build/%projectName% %CD%\src\server\main.go
echo "--------- %DATE%%TIME% Build For %projectName% Success!"

SET CGO_ENABLED=0
SET GOOS=windows
SET GOARCH=386
go build  -v -o build/%projectName%.exe %CD%\src\server\main.go
echo "--------- %DATE%%TIME% Build For %projectName%.exe Success!"
pause

你可能感兴趣的:(go交叉编译脚本命令)