下载安装 go-sciter 和rice包

go get github.com/sciter-sdk/go-sciter
go get github.com/GeertJohan/go.rice

编译rice执行程序,生成了rice.exe,把这个exe移动到自己的项目根目录下

cd github.com\GeertJohan\go.rice\rice
go build .

执行命令将资源文件合并到自己的exe中(重复执行不会有改变),成功后exe体积增大

rice.exe append /exec 自己项目执行程序.exe

PS:不能用upx压缩工具,否则运行exe后不正常。