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

推荐订阅源

S
SegmentFault 最新的问题
Security Latest
Security Latest
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
MyScale Blog
MyScale Blog
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
博客园 - 叶小钗
H
Help Net Security
大猫的无限游戏
大猫的无限游戏
U
Unit 42
G
Google Developers Blog
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
PCI Perspectives
PCI Perspectives
The Last Watchdog
The Last Watchdog
有赞技术团队
有赞技术团队
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Application and Cybersecurity Blog
Application and Cybersecurity Blog
雷峰网
雷峰网
SecWiki News
SecWiki News
Google Online Security Blog
Google Online Security Blog
S
Security @ Cisco Blogs
N
News | PayPal Newsroom
The Hacker News
The Hacker News
月光博客
月光博客
T
Threatpost
B
Blog
P
Proofpoint News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
L
LangChain Blog
Scott Helme
Scott Helme
Last Week in AI
Last Week in AI
C
Check Point Blog
P
Privacy International News Feed

博客园 - 毕海

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