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

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
Know Your Adversary
Know Your Adversary
Security Archives - TechRepublic
Security Archives - TechRepublic
Security Latest
Security Latest
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
AI
AI
O
OpenAI News
M
MIT News - Artificial intelligence
Scott Helme
Scott Helme
U
Unit 42
P
Proofpoint News Feed
罗磊的独立博客
C
Check Point Blog
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
Apple Machine Learning Research
Apple Machine Learning Research
T
The Exploit Database - CXSecurity.com
I
InfoQ
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
Webroot Blog
Webroot Blog
P
Palo Alto Networks Blog
C
Cybersecurity and Infrastructure Security Agency CISA
N
News and Events Feed by Topic
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
A
About on SuperTechFans
美团技术团队
J
Java Code Geeks
T
Tenable Blog
L
LINUX DO - 最新话题
NISL@THU
NISL@THU
G
Google Developers Blog
Forbes - Security
Forbes - Security
爱范儿
爱范儿
S
Security @ Cisco Blogs
Project Zero
Project Zero
有赞技术团队
有赞技术团队

博客园 - 毕海

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