admin管理员组文章数量:1406177
I have a problem versioning my Windows executables created with go.
Here is my main.go
package main
import (
"fmt"
)
func main() {
fmt.Println("hello world")
}
Here is winres/winres.json:
{
"RT_VERSION": {
"#1": {
"0000": {
"fixed": {
"file_version": "1.0.250651.0",
"product_version": "1.0.250651.0"
}
}
}
}
}
Here is my go.mod
module helloworld
go 1.24
And here is my build script I run in git bash on my windows laptop:
#!/bin/bash
go-winres make
GOOS=windows GOARCH=amd64 go build
powershell.exe -Command "[System.Diagnostics.FileVersionInfo]::GetVersionInfo(\"helloworld.exe\")"
Unfortunately, this is the output:
ProductVersion FileVersion FileName
-------------- ----------- --------
So I created syso files based version info but apparently, my build does not include it in the right way to make sure my executable is correctly versioned.
What am i doing wrong? Executables and syso files are created. So I really do not understand. Help me solving this.
本文标签: How do I version my go executable for windowsStack Overflow
版权声明:本文标题:How do I version my go executable for windows? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744972804a2635334.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论