没有所谓的捷径
一切都是时间最平凡的累积

python开发的应用程序如何添加程序详细信息

可执行程序鼠标右击属性-详细信息可以看到程序的一些版本,描述,说明等详细信息,如何添加这些信息呢?

1.准备一个模版信息,可以直接复制以下内容,保存到file_version_info.txt

# UTF-8
#pyinstaller -F -w -i 64x64.ico --version-file file_version_info.txt westfast.py
# For more details about fixed file info 'ffi' see:
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
VSVersionInfo(
  ffi=FixedFileInfo(
    # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
    # Set not needed items to zero 0.
    filevers=(1, 1, 3, 0),
    prodvers=(1, 1, 3, 0),
    # Contains a bitmask that specifies the valid bits 'flags'r
    mask=0x3f,
    # Contains a bitmask that specifies the Boolean attributes of the file.
    flags=0x0,
    # The operating system for which this file was designed.
    # 0x4 - NT and there is no need to change it.
    OS=0x4,
    # The general type of file.
    # 0x1 - the file is an application.
    fileType=0x1,
    # The function of the file.
    # 0x0 - the function is not defined for this fileType
    subtype=0x0,
    # Creation date and time stamp.
    date=(0, 0)
    ),
  kids=[
    StringFileInfo(
      [
      StringTable(
        u'040904b0',
        [StringStruct(u'FileDescription', u'westfast by ssc'),
        StringStruct(u'FileVersion', u'1.1.3'),
        StringStruct(u'InternalName', u'WESTFAST'),
        StringStruct(u'LegalCopyright', u'WESTFAST Copyright 2019-2020 SSC'),
        StringStruct(u'OriginalFilename', u'WESTFAST.EXE'),
        StringStruct(u'ProductName', u'WESTFAST Application'),
        StringStruct(u'ProductVersion', u'1.1.3')])
      ]), 
    VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
  ]
)

将其中的信息改为您自己的

2.打包时带上模版文件,比如用pyinstaller

pyinstaller -F -w -i 64x64.ico --version-file file_version_info.txt westfast.py

赞(0) 打赏
声明:本站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,若涉及侵权请及时告知,将会在第一时间删除,联系邮箱:lwarm@qq.com。文章观点不代表本站立场。本站原创内容未经允许不得转载,或转载时需注明出处:红岩子 » python开发的应用程序如何添加程序详细信息
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

今天所做的努力都是在为明天积蓄力量

联系我们赞助我们