惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
GbyAI
GbyAI
C
CERT Recently Published Vulnerability Notes
S
Security @ Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
S
Securelist
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
Latest news
Latest news
T
Tor Project blog
T
Threat Research - Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Spread Privacy
Spread Privacy
K
Kaspersky official blog
T
The Exploit Database - CXSecurity.com
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
V2EX - 技术
V2EX - 技术
L
Lohrmann on Cybersecurity
Google Online Security Blog
Google Online Security Blog
Cyberwarzone
Cyberwarzone
Help Net Security
Help Net Security
The Last Watchdog
The Last Watchdog
C
Cybersecurity and Infrastructure Security Agency CISA
Attack and Defense Labs
Attack and Defense Labs
大猫的无限游戏
大猫的无限游戏
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
O
OpenAI News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
AI
AI
H
Hacker News: Front Page
博客园_首页
博客园 - 【当耐特】
L
LINUX DO - 最新话题
MyScale Blog
MyScale Blog
量子位
Vercel News
Vercel News
C
Cisco Blogs
L
LINUX DO - 热门话题
Y
Y Combinator Blog
T
Threatpost
爱范儿
爱范儿
P
Privacy & Cybersecurity Law Blog

博客园 - 毕海

golang的cgo支持调用C++的方法 [原]zeromq框架测试报告 [转]linux下查看进程内存使用情况 程序员必读系列 python 不同版本下载资源 提示“load System.Core failed” phpwind主要表结构的研究随笔[1] [转]Python快速教程 [转]80个Python经典资料(教程+源码+工具)汇总——下载目录 [转]一位大牛整理的python资源 [转]使用PyInstaller2将Python脚本转化为可执行文件(下-进阶使用) [转]使用PyInstaller2将Python脚本转化为可执行文件(上-安装部分) [转]使用PyInstaller2将Python脚本转化为可执行文件(中-使用部分) [转]Nginx安装 [转]Centos 5.5 卸载与安装java1.7环境 在win8 x64上安装Scrapy mongodb协议透传 mongodb的监控与性能优化 记一次MongoDB性能问题
[转]PyInstaller2的信息文件Version的生成
毕海 · 2013-05-28 · via 博客园 - 毕海

上一篇博文 
使用PyInstaller2将Python脚本转化为可执行文件(下-进阶使用) 
http://www.cnblogs.com/balian/archive/2013/02/17/2915077.html

提到了version.txt文件。大家可能想知道version.txt文件(或者至少格式)是怎么得来的。PyInstaller2提供了一个组件(GrabVersion.py)来分析Windows系统中某个可执行文件,从而生成version.txt文件。不过,要使这个组件能正常工作,需要做些工作。本文博客园balian原创,欢迎转载,转载请说明原作者。

假设PyInstaller2文件夹是在C盘根目录。文件GrabVersion.py就在C:\pyinstaller2\utils文件夹中。但却是无法直接执行的,请看下图。这里假设是来分析文件C:\Windows\System32\cmd.exe的版本和版权信息。

image

系统提示错误“No module named PyInstaller”。

将文件GrabVersion.py拷贝到C:\pyinstaller2\文件夹可以修复这个问题,但又有了新问题。如下图:

image

系统提示C:\pyinstaller2\PyInstaller\utils\versioninfo.py需要修改。修改这个文件并不复杂。如下图,添加一系列str()在相应位置。

image

重新运行命令

C:\pyinstaller2>python GrabVersion.py "C:\Windows\System32\cmd.exe"


就能得到我们需要的version信息了。

image

*** *** ***

安装PyInstaller2步骤请见: 
使用PyInstaller2将Python脚本转化为可执行文件(上-安装部分) 
http://www.cnblogs.com/balian/archive/2012/11/21/2780503.html

一些基本的使用步骤请见: 
使用PyInstaller2将Python脚本转化为可执行文件(中-使用部分) 
http://www.cnblogs.com/balian/archive/2012/11/22/2782308.html

自定义图标和版本信息请见: 
使用PyInstaller2将Python脚本转化为可执行文件(下-进阶使用) 
http://www.cnblogs.com/balian/archive/2013/02/17/2915077.html

转自:http://www.cnblogs.com/balian/archive/2013/02/18/2915105.html