如何设置“文件版本” EXE文件PE头中的字段? [英] How to set the "file version" field in PE header of EXE files?

查看:164
本文介绍了如何设置“文件版本” EXE文件PE头中的字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 go build 来构建 exe文件。然后我查看文件的属性(右键单击文件 - >属性),在详细信息选项卡中,该文件的版本为空。

我如何设置版本的 exe 档案。



解决方案

EXE文件版本和其他信息嵌入为资源,这些资源特定于Windows,因此不受Go编译器支持。您可以使用包GoVersionInfo 来完成此操作(它也支持嵌入图标)。我没有自己尝试过,但看起来很有前途,并且有很好的记录。


I use go build to build a exe file.Then i view the property of the file(Right click the file -> property),In detail tab,the file's version is empty.

How i to set the version of the exe file.

解决方案

The EXE file version and other info are embedded as resources, which are specific to Windows and thus not supported by the Go compiler. You can use the package GoVersionInfo to accomplish this (it also supports embedding an icon). I haven't tried it myself, but it looks promising and well documented.

这篇关于如何设置“文件版本” EXE文件PE头中的字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆